I followed Ayoosh Kathuria's tutorial to understand how the YOLO Algorithm works.
The YOLO class of algorithms seek to detect objects, draw bounding boxes around them, and label them with their corresponding classes in real-time. YOLO v3 uses Darknet-106 for object detection, which makes it slower (<=30 FPS) but more accurate than YOLO v2. One major improvement of v3 is that it makes detections at three different scales, which makes it ideal for detecting small objects in real-time.
darknet.py - Code for Darknet-106
detector.py - Code for YOLO algorithm
dog-cycle-car.png - sample image to test the model. det folder also includes its predicted version
Download the official pre-trained weights here
It uses the official weights, which was then converted to .tflite. The code is taken from hunglc007's implementation. It has further improvements from v3 with faster FPS and improved accuracy. I simply followed Roboflow's tutorial.
It uses the official weights and adapted to Tencent's NCNN framework for Android deployment by nihui here. Currently, it only supports images, and I have yet to modify the code. YOLO v5 purportedly has better accuracy and speed than v4.
- Train v4 or v5 on Custom Labels
- Deploy v5 for real-time detection on Android (Currently facing FPS drops, but this implementation is promising). (Pytorch->ONNX->tflite)
- Wait for Pytorch Mobile to be able to deploy YOLO natively