Strawberry Image Analysis
Nov 2026

A personal project to discover computer vision. I took a public dataset (CC BY 4.0) of strawberry photos, 566 images and 1,734 strawberries each labelled ripe, intermediate or unripe, and trained two object detectors on it: YOLO26s from Ultralytics and RF-DETR Small from Roboflow.
Converting the dataset outlines
In the dataset, each strawberry is outlined with a polygon, but both detectors train on
boxes. So the first step is a script that turns every outline into its bounding box.
This job is done by the function polygons_to_box():
Running the experimentation
The images are then split: 70% into the training set, 15% into the validation set and 15% into the test set.
Both models were trained with the same settings and scored on the same test images.
The whole experiment was carried out in a Kaggle notebook on a Tesla T4.
Benchmarks
I trained each model five times, changing only the seed. Below is the average of those five runs, with the ± showing how much the score moved from one run to the next:
| Model | mAP50 | mAP50-95 | Latency |
|---|---|---|---|
| YOLO26s | 0.759 ± 0.017 | 0.643 ± 0.015 | 15.8 ms |
| RF-DETR Small | 0.806 ± 0.007 | 0.679 ± 0.008 | 50.2 ms |
For this task,