iNatAg: Multi-Class Classification Models Enabled by a Large-Scale Benchmark Dataset with 4.7M Images of 2,959 Crop and Weed Species

Naitik Jain, Amogh Joshi, Mason Earles
3/25/2025
cs.CV

Official code: Project-AgML/AgML (302 stars, Apache-2.0, PyTorch, last commit 2026-05-02).

Abstract

Accurate identification of crop and weed species is critical for precision agriculture and sustainable farming. However, it remains a challenging task due to a variety of factors -- a high degree of visual similarity among species, environmental variability, and a continued lack of large, agriculture-specific image data. We introduce iNatAg, a large-scale image dataset which contains over 4.7 million images of 2,959 distinct crop and weed species, with precise annotations along the taxonomic hierarchy from binary crop/weed labels to specific species labels. Curated from the broader iNaturalist database, iNatAg contains data from every continent and accurately reflects the variability of natural image captures and environments. Enabled by this data, we train benchmark models built upon the Swin Transformer architecture and evaluate the impact of various modifications such as the incorporation of geospatial data and LoRA finetuning. Our best models achieve state-of-the-art performance across all taxonomic classification tasks, achieving 92.38\% on crop and weed classification. Furthermore, the scale of our dataset enables us to explore incorrect misclassifications and unlock new analytic possiblities for plant species. By combining large-scale species coverage, multi-task labels, and geographic diversity, iNatAg provides a new foundation for building robust, geolocation-aware agricultural classification systems. We release the iNatAg dataset publicly through AgML (https://github.com/Project-AgML/AgML), enabling direct access and integration into agricultural machine learning workflows.

View on arXivView PDF

Code Implementations(1)

Project-AgML/AgMLOfficial100%
PyTorchApache-2.0

AgML is a centralized framework for agricultural machine learning. AgML provides access to public agricultural datasets for common agricultural deep learning tasks, with standard benchmarks and pretrained models, as well the ability to generate synthetic data and annotations.

30246C++, CMakeOct 29, 20215 months agoApache-2.0
agriculturecomputer-visiondatasetdeep-learningimage-classification+4 more

Similar Papers

Cite this paper

@article{jain2025inatag,
  title  = {iNatAg: Multi-Class Classification Models Enabled by a Large-Scale Benchmark Dataset with 4.7M Images of 2,959 Crop and Weed Species},
  author = {Naitik Jain and Amogh Joshi and Mason Earles},
  year   = {2025},
  eprint = {2503.20068},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2503.20068v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2503.20068.svg)](https://codeofpaper.com/paper/2503.20068)

Discussion