Dmmc123 / cvdl_homework2

Trained YOLOv4, YOLOv5, and Mask-RCNN models, and benchmarked them on Avocado-Cava dataset

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[CVDL] Training models to find πŸ₯‘ and 🐍

Hello! Here's a short story about how we trained YOLOv4, YOLOv5, and Mask-RCNN models, and benchmarked them on dataset of Avocados (πŸ₯‘) and Cavas (🐍).

Avocado contains more fat than any other vegetable πŸ₯‘

Datasets

Let's kick off by describing two types of datasets we had for training: one for YOLO family of models and one for Mask RCNN as it requires not just bounding boxes (as YOLO do) but actual segmentaion masks. Pictures of our lovely plushies were taken all around the University of Innopolis (dormitories included) πŸ—ΊοΈ.

YOLO models

For training YOLOv4 and YOLOv5 it was enough just to annotate bounding boxes with πŸ₯‘ and 🐍 on roboflow and use the download link in the Colab notebook to retrieve the dataset. It's labelled version looks like this:

image

Mask RCNN model

For this model we needed some instance segmentation labelling interface, and we gladly used label studio as it is free and allows cooperative labelling which made the work twice as fast. Labelled avocados πŸ₯‘ look somewhat like this:

image

Training

Very sequential and straightforward. Little changes were made to original notebooks πŸ‘.

Results

Legends say that metrics values are provided in the notebooks πŸ€“

No words needed. Let's just look at how trained models detected those cuties:

YOLOv4

image

YOLOv5

image

Mask RCNN

image

How to run

YOLOv4

No speacial things needed. Just download the notebook, and run all cells, shoud be ok πŸ€”.

YOLOv5

Yep. Nothing special needed too. All the links and downloads are provided in the ipynb πŸ€™.

Mask RCNN

Things get a bit tricky here as we didn't train it on dataset which was labeled on roboflow, we used label studio instead, and to have the notebook working, you need to have this dataset on your google drive. That's it πŸ™ƒ.

References

All models were training according to the official Colab tutorials on roboflow and PyTorch:

About

Trained YOLOv4, YOLOv5, and Mask-RCNN models, and benchmarked them on Avocado-Cava dataset


Languages

Language:Jupyter Notebook 100.0%