My Environment Python: 3.8.12 PyTorch: 1.10.2 OpenCV-Python: 4.5.5.62
In this code I am using YOLOv5 Algorithm to detect some objects and then finding their centroids. The centroids are in pixel coordinates. This code takes live camera feed from a USB webcam and then detect the objects and centroids in real-time. I have trainer the YOLO model using my custom dataset. To train your custom dataset please follow this guide: Train Custom Data