Coders Packet

Object Detection Using OpenCV

By Ajay Gupta

This Project is based on the deep learning concept. It can detect the objects. And for developing the project. I have used Python language and Jupyter NoteBook Editor.

About The Project

This Project is based on the deep learning concept because for image classification and for better object detection I used a single shot mobile net3 (SsdmobileNetv3) algorithm. YOLO is also used for object detection but ssdmobileNetv is most lightweight and faster one algorithm. As we know that object Detection is the combination of classification and localization. I also used a very beautiful concept image segmentation in which classifier will classify the each fixel rather than classifying the object. COCO 80 classes data set which is famous data set for object detection. SsdmobileNetv is the pre trained TensorFlow model which programmer can download and load them by using open-cv2 library. It has two things one is a configuration file and the second one is the frozen model. After the implementation, all these things I detected myself and It show, I am a person.


In this project, I used Python libraries cv2,matplotlib and numpy.

Open cv (cv2): Open cv library is used to do computer vision tasks it is also used for image reading and for opening the camera. In this project Cv2  for font-style, font-size and for box making and live video capturing also used.We can use this library in our project by writing ‘import cv2’ command

Matplotlib: Machine learning projects have data set with a large amount of data. So every time programmer can not analyze the data so in python by matplotlib library programmer can plot a lot of charts like bar plot, scatter plot, histogram, etc. Matplotlib is also known as a data visualization library.By this libaray programmer can show the image also.

Here I am showing the Labels and total number of labels.

Than I putting the image which cv2 show by default in bgr mode.

Converting the bgr Image in rgb.

Here Our Model detecting the car object as car which is right detection.

Output Screen Shot:

This is Video Demo.

It is detected me as a person.

Download project

Reviews Report

Submitted by Ajay Gupta (ajaygupta)

Download packets of source code on Coders Packet