Custom object detection classifier, detecting Potholes on roads. Used Tensorflow Object Detection API
This repository is the application of learned knowledge of 'Object Detection Using Tensorflow'. This repo is all about detecting Potholes on an image of a road having potholes and the process I followed in doing so.
This model is trained to detect and differentiate 4 different classes,namely
- Pothole
- Pothole Group (Having more than 2 potholes on the image or a Big Pothole. PS:Created this caz to escape labelling each and every tiny pothole in the image :P which is extremely a gruelling task)
- Car
- Auto
I had labelled and trained the model in such way that detecting Pothole and Pothole group is the main priority.
I had got the Pothole images dataset from Kaggle I had used LabelImg which is an open tool for labelling your images.
The TensorFlow Object Detection API requires using the specific directory structure provided in its GitHub repository. It also requires several additional Python packages, specific additions to the PATH and PYTHONPATH variables, and a few extra setup commands to get everything set up to run or train an object detection model.
After wasting a lot of time and efforts I went for training using TensorFlow v1.5 and this GitHub commit of the TensorFlow Object Detection API. You have to choose the correct vesion of Tensroflow and compatible Tensorflow object Detection API Git Commit.Otherwise your code may be end up with lot of errors and code breaks.
TensorFlow provides several object detection models (pre-trained classifiers with specific neural network architectures) in its model zoo
It is better you create a Anaconda virtual environment and do your stuff in there.
I had trained this model on my machine(4GB RAM) for like 50 hours.
This implimentation took a lot of inspiration from EdgeElectronics tutorial of training a custom object detection. (https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10#brief-summary)