This Machine Learning Challenge was given from TTH unit by TCS. There were four sub challenges. They are:
- Floor cleanliness index
- Flower freshness index
- Container filled index
- Baggage fitment index
I have attempted to solve two challenges which are Flower freshness index and Baggage fitment index.
In Hotels, flowers are kept in flowerpots to create ambient experience. This looks
good till the flowers are fresh. When flowers are wilted, the effect is reversed.. So it is important to check the
freshness and keep it changed to retain the high level customer experience. This manual task can be automated
using machine vision. Continuous monitoring can be done using camera feed instead of random checks carried
by human.
For challenge purpose, consider set of flowers and confirm the freshness index
- For this challenge a scraped various types of flowers image from google.
- I divided entire image into two classes fresh and wilted and three sets which are train, validation and test set.
- I built a CNN model which is then trained on train data and validated on the validation dataset.
- After hyperparameter tuning, I tried my best to reduce overfitting.
- Further, Model is tested on the test data and prediction was made.
Training Set Accuracy : 85.03%
Validation Set Accuracy : 83.99%
Test Set Accuracy : 77.5%
- Unzip the data file
- Upload whole folder to google drive
- Open notebook using Google Colab
- Turn on GPU acceleration
- Run the notebook
- Install all dependencies
- Unzip data file
- Launch Jupyter Notebook using Anaconda navigator
- Run the notebook
Normally overhead cabins in the aircraft are constrained by dimensions. So oversized baggage creates a lot of problems including delay when they are allowed to board the cabin. So before onboarding the passenger, baggage needs to be measured and indicate the customer to drop to luggage section. Few airports have physical model to do this task of fitment check. However it is cumbersome and time consuming, so it is advisable to use machine vision techniques so that customer need not do any additional task, thus creating superior customer experience.
For this challenge, assume two views of the camera are available.
For solving this problem it is assumed that there are two views of the camera which are perpendicular to each other. Let us assume there is a scenario where luggages are passed and two perpendicular views of the luggage is captured. Now for measuring the dimension, we have taken a reference object whose dimensions are already known. Now as we know the dimension of the reference object, other's dimensions can be calculated wrt to that.
To solve this problem, I have used opencv.
- First I applied Canny edge detection on the image.
- Found all the contours from the image
- Assumed the leftmost contour to be reference object and calculated pixelsPerMetric metric to calculate the dimensions.
- Calculated dimensions of all other contours.
- Assuming the baggage to be the largest object in the image. Dimensions of largest one is returned.
- From two images now we will have all the dimensions needed.
- These dimensions can be compared with the original constraints to see the baggage will fit or needs to be dropped.
Original Dimension : 18 x 6 x 5.5
Observed Dimension : 18.88 x 6.52 x 6.14
Result can be improved by adding margin of error to the reference object.
- Install all dependencies
- Write python final.py in command prompt, or
- Run the notebook using Anaconda
Both challenges were solved in a span of 7 days. For increasing accuracy more time needs to be invested. All above mentioned projects are good and can be taken as a capstone project and they will yield good results.