Skip to content

Applied Machine Learning Assignment: Comparison of Faster RCNN and Yolovx

License

Notifications You must be signed in to change notification settings

AlekseyKorshuk/aml-faster-rcnn-vs-yolovx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Comparison of Faster RCNN vs Yolovx

The goal of this assignment is train both models on custom annotated dataset.

  1. Take photos of your environment of two or more objects. (at least 100 instances between all objects)

  2. Annotate them on roboflow.

  3. Train a Faster RCNN model using detectron2

  4. Train Yolov4/5/6/7/8 (only one of them of choice) the smallest size

  5. Evaluate both models based on mAP and speed and size.

Colab notebook

Open In Colab

Follow this link: link

Taking photos

I desided to detect spoon and fox. So here are example images:

FoxSpoon

Annotation with roboflow

This is very easy to annotate obhject detection dataset. Here is a screenshot from the roboflow ui:

Annotation

Faster RCNN using detectron2

Based on official documentation of detectron2 and roboflow I was able to train Faster RCNN with detectron2.

Sample predictions:

predspreds

Yolov8

With the usage of yolo client it was super smooth to train yolov8s on custom dataset:

Sample predictions:

preds

Comparison

  • Mean Average Precision
    • Faster RCNN: 72%
    • Yolov8: 84.3%
  • Speed:
    • Yolo is a lot faster and such speed gives a lot of betefits despite its size
    • Yolo training for 24 epochs done in 4 minutes, but Faster RCNN in 55 minutes
  • Size:
    • Faster RCNN model size: 796.5 Mb
    • Yolov8 model size: 21.46 Mb

Resources