Skip to content
Apurbo Islam

fruit-detection-model

Custom-trained YOLOv8 model that detects apples, bananas, oranges, grapes and strawberries in real time.

Language
Python

What it does

Trained on 7,000+ images, semi-automatically labeled with YOLO-World. Reports 91% mAP50 on the validation set.

Two modes: a large model for GPU servers, and a small model at 320 px input that runs at 12–20 FPS on a laptop CPU.

Why I built it

I wanted to take an object detector through the whole path: building a labeled dataset, training, and trading accuracy for speed so it runs on ordinary hardware.

Install and use

install
git clone https://github.com/apurboislam/fruit-detection-model.git
cd fruit-detection-model
pip install ultralytics opencv-python
# download best.pt / best_small.pt from the v1.0 release
usage · sh
python main.py         # large model, needs a GPU
python main_small.py   # small model, runs on CPU

Live demo: not shipped yet

A browser demo of fruit-detection-model will live here. For now, see the repository.