Crop-weed classification using deep learning: a comparative study of CNNs, vision transformers, and interpretable models

Accurate discrimination between crops and weeds was considered essential for precision agriculture, as it supports targeted interventions and efficient resource management. However, practical deployment remained challenging due to label noise, varying illumination, domain shifts, and diverse imaging conditions. In this study, five deep learning models such as ResNet50, ResNet101, Vision Transformer (ViT), CLIP, and the prototype-based PIPNet were evaluated for crop-weed classification using two datasets that differed in acquisition conditions and annotation quality. The results showed a strong influence of data quality on model performance. Models trained on clean, well separated images consistently outperformed those trained on field-collected data, with improvements of approximately 25-30% across architectures. Cross-dataset evaluation revealed a marked decline in performance, with accuracy dropping by up to 50%, indicating limited generalization under domain shift. Among the evaluated approaches, CLIP and PIPNet maintained relatively stable performance and showed greater robustness to common image corruptions. These models appeared to benefit from semantically meaningful and structured feature representations. PIPNet achieved the highest accuracy on the clean dataset while also providing interpretable predictions through learned visual prototypes. Overall, the findings highlighted the importance of high-quality annotations and the need for models that can adapt to changing field conditions. Approaches that incorporate semantic understanding and interpretability showed greater potential for reliable crop-weed classification in practical agricultural environments.

Authors

Institutions

Publication Details

Journal
Scientific Reports
Published
2026-06-29
DOI
https://doi.org/10.1038/s41598-026-56488-4
Primary Topic
Smart Agriculture and AI
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Crop-weed classification using deep learning: a comparative study of CNNs, vision transformers, and interpretable models

Ved Prakash Chaudhary, Akshay Agarwal, Rishi Chaudhary
Scientific Reports
Smart Agriculture and AI
article

Crop-weed classification using deep learning: a comparative study of CNNs, vision transformers, and interpretable models

Ved Prakash Chaudhary, Akshay Agarwal, Rishi Chaudhary
article en

Abstract

Accurate discrimination between crops and weeds was considered essential for precision agriculture, as it supports targeted interventions and efficient resource management. However, practical deployment remained challenging due to label noise, varying illumination, domain shifts, and diverse imaging conditions. In this study, five deep learning models such as ResNet50, ResNet101, Vision Transformer (ViT), CLIP, and the prototype-based PIPNet were evaluated for crop-weed classification using two datasets that differed in acquisition conditions and annotation quality. The results showed a strong influence of data quality on model performance. Models trained on clean, well separated images consistently outperformed those trained on field-collected data, with improvements of approximately 25-30% across architectures. Cross-dataset evaluation revealed a marked decline in performance, with accuracy dropping by up to 50%, indicating limited generalization under domain shift. Among the evaluated approaches, CLIP and PIPNet maintained relatively stable performance and showed greater robustness to common image corruptions. These models appeared to benefit from semantically meaningful and structured feature representations. PIPNet achieved the highest accuracy on the clean dataset while also providing interpretable predictions through learned visual prototypes. Overall, the findings highlighted the importance of high-quality annotations and the need for models that can adapt to changing field conditions. Approaches that incorporate semantic understanding and interpretability showed greater potential for reliable crop-weed classification in practical agricultural environments.

Scientific Reports
Central Institute of Agricultural Engineering (IN), Shiv Nadar University (IN), Indian Institute of Science Education and Research, Bhopal (IN)
Zero hunger
Openalex Percentile: Top 10%
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.