Python application for real time object detection and segmentation.
In previous article I walked through with you on using YOLOv5 for real time object detection. In this article let’s develop a Python application for real time object detection using Detectron2, which is a Facebook AI Research’s next generation software system that implements state-of-the-art object detection algorithms.
- Git clone the repository.
python setup.py install
- Install Detectron2 based on Python version and GPU availability
d2to start the application
qto exit the application
OpenCV is used to capture camera images. The application captures camera images in the main process, and spawns a separate process to detect objects in the image frame.
The application should work without GPU, but for better performance you should use a GPU machine.
The image with detected objects will be displayed in a separate frame.
You can find the full listing of the code below.