Car detection in real time using Tensorflow Object Detection API and python-opencv (cv2)
Object detection is a popular use case of computer vision, and can be used to solve many real world problems. One use of object detection is car detection in real time, which, in turn, can help traffic flow analysis. Also, car detection in an essencial part of autonomous automobiles which assists them to detect other vehicles and navigate accordingly. Hence, I decided to build/fine-tune a Single Shot Detection (SSD) model to detect cars on the streets in real time.
First, the model is trained on google colab using Tensorflow Object Detection (TFOD) API, and then it is exported to Tensorflow saved model format after being evaluated. Next, using the python-opencv library and Tensorflow, the model is used to detect cars in real time video footage.
- Install required libraries
pip install tensorflow
pip install python-opencv
- Run the following command
python index.py