/lemons-vs-apples-object-detection

Object detection using faster RCNN from detectron2 and YOLOV8

Primary LanguageJupyter Notebook

lemons-vs-apples-object-detection

What would you do if life gives you lemons? easy, make a photo session for some lemons and apples then see if a YOLOv8 and Faster-RCNN will be able to detect lemons from sweet-sweet apples.

1. Dataset Collection

  • There were two lemons and two apples, a green one and a red one in my humble fridge. so I took a 100 picture of them collectively. I made sure to take them under different light conditions and using different backgrounds
  • Then annonated the pictures using Roboflow
  • Applied resizing and rotation for data preprocessing and agumentation

2. Model Training and Inference

I used Faster-RCNN and YOLOV8 for this object detection task.

2.1 Faster-RCNN

You can find my notebook here for the source code.

Training, Inference and Metrics

  • I used detectron2 to load and train Faster-RCNN from detectron2 model zoo. You could find their official repo here also, this article was helfpul too
  • The training has taken 23 minutes with 300 epochs and 16 batch size
  • Metrics :
  • Samples detected :

2.2 YOLOv8

You can find my notebook here for the source code

Training, Inference and Metrics

  • I closely followed this article from roboflow.Inwhich

  • The training has taken less than 2 minutes with 25 epochs

  • Metrics :

  • Samples detected :