What the score
hides.
We ran our diagnostic on a public benchmark, the same way we would run it on a customer's model. The subject is a single-class Palmer amaranth detector (YOLOv8s) trained on 60 real images from PAGS8 (Coleman et al., 2024, CC BY 4.0). It is scored on a fixed test set of 153 images with 775 labelled weeds.
Why only 60 real images. A new crop, a new camera or a new growth stage usually starts with little labelled data. This example uses that case on purpose, so the absolute scores are low. The diagnostic is about where the model fails and why, not about its top score.
For reference, the PAGS8 authors report 67.05% mAP50–95 for single-class detection, with models trained on the full dataset. This page does not compare with that figure: the training set is much smaller, and the split and model differ.
Every figure below is a mean of three training seeds. Where a figure changed after review, we show the correction.
One accuracy number hid three findings. The model fails on small weeds for a scale reason, which the buyer can fix without new data. Its most confident mistakes are plants, not soil, and no pooled score shows that. Synthetic data helps, but it is the third lever, not the first.
One score, two different fields.
The test set holds two capture sessions. Their weeds differ in size by more than ten times, so one pooled score describes neither of them.
| Session | Images | Weeds | Median weed size |
|---|---|---|---|
| Cotton field, dense small weeds | 48 | 662 | 42 px |
| Fallow ground, large isolated weeds | 105 | 113 | 558 px |
Size = median box side at full camera resolution (3208 × 2200). The cotton-field session is the one a weeding implement meets. We report every result below per session where we measured it.
Input resolution is the cheapest fix.
At a 640 px input, a 42 px weed shrinks to about 8 px. We retrained the same real-only model at 1280 px and changed nothing else.
| Real-only model | Seed 0 | Seed 1 | Seed 2 | Mean mAP50 |
|---|---|---|---|---|
| Trained and scored at 640 | 0.187 | 0.259 | 0.244 | 0.230 |
| Trained and scored at 1280 | 0.290 | 0.390 | 0.338 | 0.339 |
| Change | +10.3 | +13.1 | +9.5 | +10.9 pp |
This is larger than any gain from synthetic data at 640. The fix has a condition: the model must be trained at the new size. When we only scored the 1280-trained models at a larger size, the score fell on every seed (real-only validation AP50–95: 50.2 at 1280, 40.2 at 2048, 19.4 at 3200).
Tiling helps small weeds and destroys large ones.
Tiling feeds the model full-resolution 640 px crops. The effect depends on the size of the weed compared with the tile.
| mAP50, 640 px input | Untiled | Tiled | Change | Seeds |
|---|---|---|---|---|
| Cotton field (small weeds) | 0.134 | 0.320 | +18.6 pp | 3 of 3 |
| Fallow ground (large weeds) | 0.771 | 0.060 | −71.2 pp | 3 of 3 |
| Pooled | 0.211 | 0.164 | −4.7 pp | 3 of 3 |
A small weed fills about 7% of a tile. A fallow-ground weed fills most of it, and 31% of those weeds are larger than the tile, so tiling cuts them apart. The pooled score makes a large gain and a large loss look like a small loss.
Cost matters too. At this camera height, tiling needs 20 tiles per frame, which took about 1.1 s per frame on a desktop RTX 4090. That is too slow for a moving machine. A lower camera sees larger weeds and needs less tiling. A deployed system needs scale-aware inference, not one fixed tile size.
The confident mistakes are plants.
We inspected the 40 most confident detections that match no labelled weed (confidence 0.80 to 0.96). None of them is soil, shadow or residue. All 40 are plants, in a cotton field.
The cause is in the labels. The benchmark labels only Palmer, and the model has only one class, so it is never taught what cotton is. Any plant that is not labelled Palmer counts as a false positive. For a weeding implement, a confident detection on the crop is the failure that matters most, and a pooled accuracy score does not show it. Separating crop from weed needs labelled crop.
We then tested two fixes. A second class for cotton, trained from synthetic labels, did not change Palmer accuracy (+0.5 pp, 1 of 3 seeds). The cotton class almost never fired on real images, because real training frames with unlabelled cotton teach the model that cotton is background. Automatic cotton labels on those frames brought the class back on all three seeds, but Palmer accuracy stayed the same (+0.7 pp, 2 of 3 seeds).
These detections come from the validation session, not the test set: 40 crops from one session. We have not yet confirmed the species of each plant. We make no crop-safety claim from this or any other result on this page.
Synthetic data adds about 7.5 points.
We added 500 procedural synthetic images to the same real training set, at 1280 px.
| mAP50 | Real only | Real + synthetic | Change |
|---|---|---|---|
| Whole test set | 0.320 | 0.395 | +7.5 pp |
| Cotton field | 0.291 | 0.391 | +10.0 pp |
| Fallow ground | 0.809 | 0.861 | +5.3 pp |
Correction. We first measured +15.4 points. On review, that real-only control was over-trained: it got the same number of training steps as the larger mixed set, which was 70 times more than it needed. A correctly trained control gives +7.5. The first number is withdrawn.
- Trained on synthetic images only, the model scores near zero on real images. Synthetic data adds to real data. It does not replace it.
- The corrected control drew a different 60 images for each seed, so this comparison is not exactly paired. Its seeds vary by about 4.6 points; the mixed model's vary by about 0.8.
- More renders did not always help: in a single-seed screen, a newer synthetic set did worse than the same controls.
Proceed, in this order.
- Match input scale to weed size. Train at a resolution where the smallest target weed is resolved, and use scale-aware inference. This costs no new data.
- Label real cotton in a subset of frames. Without it, no one can measure how often the model fires on the crop, and that is the number a buyer's acceptance test needs.
- Then add synthetic data, and measure it on a new real test set that no one has used for development.
If the first step had closed the gap, the recommendation would stop there. An unfavourable result is a completed diagnostic.
What this does not show.
- Small data: 60 real training images. Three seeds measure training randomness, not variation between fields.
- One stationary camera rig at 1.5 m. No motion blur, no rolling shutter. The numbers do not predict another camera or mount height.
- The cotton-field test session shares its capture date with a session in the training set. It is not an independent field.
- We designed the synthetic scenes with reference to PAGS8 images, including held-out sessions. This test set has now been used for development, so any new accuracy claim needs a fresh holdout.
- These are historical YOLOv8s results. Our current training pipeline uses RF-DETR, and these numbers are not RF-DETR results.
Each figure has a saved configuration, per-seed results and a run log. We give the same records to every diagnostic customer, so that your team can reproduce every number.
Run this on your model.
Tell us the crop, the camera and the failure you already know about.