LabelLens sticky-trap detector (YOLO26-s)
A YOLO26-s detector fine-tuned to find and classify insects on greenhouse yellow sticky traps. It is the project model of the sticky-trap case study in LabelLens, where it pre-labels whole 18-megapixel trap photos.
| Class | Role |
|---|---|
| whitefly | pest |
| macrolophus | beneficial predator |
| nesidiocoris | beneficial predator |
Results (43 unseen test traps, whole photos, tiled)
| mAP50 | mAP50-95 | AP50 whitefly | AP50 macrolophus | AP50 nesidiocoris |
|---|---|---|---|---|
| 0.844 | 0.360 | 0.737 | 0.868 | 0.926 |
At confidence 0.35, the AI's whitefly count is within 2 % of the true count (816 vs. 800), and a simulated annotator saves 59 % of the annotation time. Zero-shot YOLOE reaches only mAP50 0.03–0.05 on the same traps.
Training
- Data: Yellow Sticky Traps dataset (corrected version), split by image into 198 / 43 / 43 traps (train / val / test)
- Photos cut into 640 px tiles with 20 % overlap; 10 % of empty tiles kept as background
- COCO-pretrained YOLO26-s, 60 epochs, batch 16, horizontal and vertical flips, Colab T4 (about 2 h)
Usage
Photos are 5184 × 3456 px and whiteflies about 50 px, so run the model on 640 px tiles, not on the resized photo.
In LabelLens: Project settings → Project-specific model → upload sticky_detector.pt and tick Tiled detection.
In Python (one tile):
from ultralytics import YOLO
model = YOLO("sticky_detector.pt")
results = model.predict("tile_640.jpg", imgsz=640, conf=0.35)
The full tiled inference with NMS merging is predict_tiled in the LabelLens repository.
Credits
Dataset: Nieuwenhuizen et al. (2019), corrected by Deserno & Briassouli (2021), CC0. Model architecture and training: Ultralytics (AGPL-3.0).