Work

Five local photos beat a foreign dataset: duplicates, background shortcuts and cross-country transfer in cotton leaf disease classification

Year: 2026
Type: preprint
Abstract: Published cotton leaf disease classifiers often report accuracies of 98–99%, almost always on a test split of the same dataset they were trained on. We asked whether such models would work in another country. Using three public datasets of smartphone photographs, one from Pakistan and two from different sites in Bangladesh, we kept only original images (4,021 photos; 11,963 pre-augmented copies excluded) and evaluated every source-to-target pair on the disease classes they share. A perceptual-hash audit with flip- and rotation-invariant hashing found that the 4,021 photos form only 2,401 unique groups, with 5,453 near-duplicate pairs and 30 pairs carrying conflicting labels; all splits were therefore made by duplicate group. With frozen features from four pretrained backbones (DINOv2, CLIP, BioCLIP and ImageNet EfficientNet-B0) and a logistic-regression classifier, in-dataset macro-F1 was 0.95–0.98, but cross-dataset macro-F1 ranged from 0.23 to 0.94, with the worst results from Bangladesh to Pakistan. Classifiers trained on background-only images, with the leaf masked out, reached 0.99 macro-F1 in one dataset, revealing a strong background shortcut; removing the background, however, did not improve transfer. Fine-tuning EfficientNet-B0 end to end gave high in-dataset scores (0.93–0.98) but transferred worse than every frozen backbone (mean cross-dataset macro-F1 0.58 versus 0.74 for DINOv2). Most strikingly, a classifier trained on just five labelled local photos per class outperformed one trained on the whole foreign dataset plus the same five local photos (0.86 versus 0.79 with DINOv2), a pattern that held for all four backbones. For a new region, a handful of local labels is worth more than a large dataset collected elsewhere. We release code and duplicate lists.
Language: English
Subfield: Plant Science
Open Access status: green
OpenAlex ID: W7242518830
Cites:
Cited by:
Related to: