Custom YOLO Model for fast Vegetable Recognition

Inspired by the video Why This Robot Kills Weeds With Lasers by Leo Abram, I embarked on a small personal project to familiarize myself with YOLO (You Only Look Once) by training it on a custom dataset of vegetables. This endeavour allowed me to delve into object detection and gain hands-on experience with data annotation and model training.

Project Overview

  • Objective: Develop a YOLO model capable of real-time vegetable detection.

  • Data Preparation: Utilized Roboflow to create and annotate a custom dataset of fruits and vegetables, ensuring accurate labeling and preprocessing.

  • Training Environment: Leveraged Google Colab for model training, taking advantage of its GPU acceleration to optimize performance.

  • Model Selection: Employed the YOLOv11 architecture, known for its efficiency in object detection tasks.

YOLO processes images in a single forward pass, framing object detection as a regression problem to predict bounding boxes and class probabilities directly from the image. This approach enables rapid and accurate detections, making it suitable for real-time applications like vegetable recognition.

The code for this project is available on GitHub: https://github.com/BrandtBrandtBrandt/YOLO-vegetables.git

while the model performs pretty well, expanding the dataset could enhance detection accuracy and generalization across diverse vegetable types. As this was just a small project, to familiarize myself with YOLO, i didn’t put more effort into enhancing the detection. This will be a project for the future.

Previous
Previous

Simple Color Tracking with OpenCV and Pillow