Object Detection |
! If any of the files is showing any type of error, you can also use this Drive Link given here.
Dataset used for these Projects (Kaggle)
This dataset, contains 5000 images with bounding box annotations in the PASCAL VOC format for these 3 classes:
They're [helmet, head & person], but mainly to predict helmet because the data is heavily imbalanced.
As you can see from the histogram above, almost 75% of the occurences in the Dataset is of helmet class. |
We've used pre-trained Faster R-CNN Model with Resnet50 backbone fine-tuned on this Dataset's Train Split.
Then we evaluated the model on the test split. The Results are like :
We've used the standard mAP@0.5 Performance Metric (where 0.5 denotes the IoU Threshold Value taken) for evaluation.
We've also calculated the Precision & Recall Values for each class though.
We've used the SOTA Model YOLOv8 (Medium Version) fine-tuned on the same dataset.
And the Results & the speed of inference were quite Promising. Have a look :
Here also we've used the mAP@0.5 Performance Metric for evaluation & comparision b/w the 2 Models.
Here again also, we've calculated the Precision & Recall Values for each class.
*YOLOv8, the new State of the Art Model is quite accurate & fast comparative to the conventional models used for Object Detection Models, like here we used *Faster R-CNN. And the results are quite astonishing.
While the Faster R-CNN struggled a bit giving a quite low mAP @0.5 value as "25.34%", on the other hand, YOLOv8 totally outperformed the former model by giving the same value as **"63.40%".
Also due to its rapid processing speed, it takes around only 10ms on an avg. for an image prediction while the latter one takes around 142ms for the same.
Almost 15x times faster.
So, It easily surpasses the criteria of 24fps for a model to be run on Video. (YOLOv8 FPS = 83FPS)
diff
- It can be used conveniently for REAL-TIME Detection & this leads to many Real-World Applications.
output_1.1.mp4
A smaller yet powerful Project build using YOLOv8 to showcase one out of many real-world applications.
This tool simply plots the bounding boxes of Helmets without confidence score (else it will become clumsy, just to look clean) and displays the current count of Helmets in the videos.
This tool can be very useful for real-time video surveillance, traffic monitoring, and autonomous systems.
You can also use more features like ability to track objects, maintain identities, handle occlusions and noise in this tool.
For giving you just a simple example, Traffic Camera - this tool can be implemented in city surveillance cameras to give an automated estimate of how well are the traffic rules being followed (if helmets are mandatory).
Ayush Raj
Vikash Kumar Thakur