👉 In this project, I used YOLO-tiny algorithm trained on COCO dataset for object detection task. I used pretrained Yolov2 model which can downloaded from the official YOLO website.
👉 Based on the original object detection algorithm YOLOV2, Tiny YOLO was designed to create a smaller, faster, and more efficient model increasing the accessibility of real-time object detection to a variety of devices.
👉 TinyYOLO (also called tiny Darknet) is the light version of the YOLO(You Only Look Once) real-time object detection deep neural network. TinyYOLO is lighter and faster than YOLO while also outperforming other light model's accuracy.
👉 The following table presents a comparison between YOLO, Alexnet, SqueezeNet, and tinyYOLO.
Model | Ops | Size |
---|---|---|
Darknet | 0.81 Bn | 28 MB |
SqueezeNet | 2.17 Bn | 4.8 MB |
AlexNet | 2.27 Bn | 238 MB |
Tiny Darknet | 0.98 Bn | 4.0 MB |
Tiny YOLO operates on the same principles as YOLO but with a reduced number of parameters. It has only 9 convolutional layers, compared to YOLO's 24.
Just follow 6 simple steps :
- Clone repository to preserve directory structure
git clone https://github.com/Nisarg1112/Helmet-Detection-Using-YOLOv2.git
- Go to your favorite code editor and open Command Prompt (cmd) amd go to directory where you cloned this repo
- Run this command in cmd
pip install -r requirements.txt
- Go to
/darkflow-master
- If you want to run the model on a webcam, Run following command in cmd
python video.py
- If you want to run the model on Images run following command in cmd
python image.py
Note: Don't forget to change the image location in image.py file
If you face any problem like script not running in local environment or anything: You can reach out to me at anytime on following platforms!
The ideas presented in this repo came primarily from the two YOLO papers. The implementation here also took significant inspiration. The pretrained weights used in this project came from the official YOLO website.
- Joseph Redmon, Santosh Divvala, Ross Girshick, Ali Farhadi - You Only Look Once: Unified, Real-Time Object Detection (2015)
- Joseph Redmon, Ali Farhadi - YOLO9000: Better, Faster, Stronger (2016)
- The official YOLO website