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

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.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-12-03
DOI
https://doi.org/10.5281/zenodo.24772323
Primary Topic
Smart Agriculture and AI
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

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

Muhammad Mozzam
Zenodo (CERN European Organization for Nuclear Research)
Smart Agriculture and AI
preprint

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

Muhammad Mozzam
preprint en

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.

Zenodo (CERN European Organization for Nuclear Research)
Smart Agriculture and AI
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon