In this blog, we detail how to identify faded street signs using object detection and how to sort the images after detection.
After being able to identify a street sign, we decided to use image classification to grade the sign as reflective or faded.
For the purpose of the demo, we chose to use Stop signs because that object is already featured in the pre-trained object detection model by Google. It is part of Microsoft’s COCO Dataset so this saves us time for collecting data, annotating images, and training the object detection model as well.
From there, we put together a process:
- We first detected the presence of a stop sign using the trained object detection model by Google
- Cropped the area of interest in the image
Building the Image Classification Model
Training the classification model starts with data collection. With crafty keyword searches going on sites like Flickr and Shutterstock, we downloaded over 100 faded signs and 150 reflective signs for the model.
After collecting the images we cropped them to show only the stop signs, labeled, and split them across training and testing for model building.
We chose to use a Convolutional Neural Network with Relu activation and Adam Optimizer as the model architecture, which has been proven to be effective for image classification problems like this one.
Here are the results:
Even though we had limited images, the model results were accurate. To evaluate further, a second dataset was created to evaluate model performance.Let’s see how the model does on images not found in train or test:
Faded confidence: 0.979
Reflective confidence: 0.021
Faded confidence: 0.044
Reflective confidence: 0.956
The model did well because we used extreme examples with a clear separation. The real challenge would be to detect slightly faded signs and classify them correctly. This could be addressed in further model iterations.
SpringML delivers data-driven digital transformation outcomes with an experimentation and design thinking mindset. We are a premier Google Cloud consulting and implementation partner with a focus on industry-specific solutions. We have Google Cloud specializations in Security, Data Management, Application Development, Data Analytics, Machine Learning and Marketing Analytics.