- This project demonstrates object detection using SSD MobileNet v3 with pre-trained models on the COCO dataset. The code captures video from your webcam, detects objects in real time, and labels them with bounding boxes and confidence scores.
- Overview
- Requirements
- Setup
- Usage
- COCO Classes
- References
This project uses OpenCV's DNN module to detect objects in real-time using a pre-trained model on the COCO dataset. The detection process is powered by the SSD MobileNet v3 architecture.
- Real-time object detection from a webcam feed.
- Bounding boxes and confidence scores are displayed for detected objects.
- Utilizes pre-trained models for quick and accurate detection.
- Python 3.x
- OpenCV (cv2)
- Pre-trained weights and config files for SSD MobileNet v3
- COCO class names file
Install the required packages:
pip install opencv-python
Clone the repository or download the necessary files:
OD.py (Main Python script)
coco.names (COCO class labels)
frozen_inference_graph.pb (Pre-trained weights)
ssd_mobilenet_v3_large_coco_2020_01_14.pbtxt (defines a node in the neural network configuration. Specifically, it describes a FusedBatchNormV3 operation applied)
Place all the files in the same folder.
Make sure your webcam is connected and working. Tested on Python 3.7 and 3.12 It works great
python OD.py
-
The script will open a window showing the webcam feed, and detected objects will be highlighted with bounding boxes along with their labels and confidence scores.
-
Press q to quit the window.
The model is trained on the COCO dataset, which contains 80 common object classes such as:
-Person -Bicycle -Car -Dog etc.
- SSD MobileNet v3
- COCO Dataset
- OpenCV DNN module