|
--- |
|
license: apache-2.0 |
|
task_categories: |
|
- image-classification |
|
language: |
|
- en |
|
tags: |
|
- agriculture |
|
- plant |
|
- crop |
|
- weed |
|
- farm |
|
- food |
|
size_categories: |
|
- 100K<n<1M |
|
--- |
|
[iNatAg](https://huggingface.co/datasets/Project-AgML/iNatAg) is a large-scale dataset derived from the iNaturalist dataset, designed for species classification and crop/weed classification in agricultural and ecological applications. It consists of 2,959 species with a breakdown of 1,986 crop species and 973 weed species.The dataset contains a total of 4,720,903 images, making it one of the largest and most diverse datasets available for plant species identification and classification. |
|
|
|
We also developed a subset of the iNatAg dataset for smaller-scale applications, which we call **iNatAg-mini**. It contains 560,844 images, created by sampling up to 200 images per species from the full iNatAg dataset. These datasets can then be used in standard agricultural machine learning workflows, enabling the development of extensive applications using this data. |
|
|
|
iNatAg and iNatAg-mini are also released as part of the [AgML](https://github.com/Project-AgML/AgML) dataset collection, with support for filtering by species, genus, or family and direct data loading through a streamlined API. The associated paper can be found at https://www.arxiv.org/abs/2503.20068. |
|
|
|
## Installation |
|
|
|
To install the latest release of AgML, run the following command: |
|
|
|
```shell |
|
pip install agml |
|
``` |
|
## Quick Start |
|
|
|
The following code allows you to list available datasets within the iNatAg-mini dataset: |
|
```python |
|
# List iNatAg-mini species |
|
import agml |
|
print(agml.data.public_data_sources(parent_dataset='iNatAg-mini')) |
|
``` |
|
|
|
In line with our vision of providing data across the entire taxonomic hierarchy, we also provide the ability to load data specifically according to family or species, or even common name: |
|
```python |
|
# Load a collection by family names |
|
loader = agml.data.AgMLDataLoader.from_parent("iNatAg-mini", filters={"family_name": ["...", "..."]}) |
|
|
|
# Load by common names |
|
loader = agml.data.AgMLDataLoader.from_parent("iNatAg-mini", filters={"common_name": "..."}) |
|
``` |