|
Download README.md from Project-AgML/LeafNet2.0: direct link, hf CLI and curl.
- Browser
- Download file 8.88 kB
-
https://huggingface.co/datasets/Project-AgML/LeafNet2.0/resolve/main/README.md
- Command line
-
hf download hf://datasets/Project-AgML/LeafNet2.0/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Project-AgML/LeafNet2.0/resolve/main/README.md
8.88 kB
| pretty_name: LeafNet2.0 | |
| license: cc-by-4.0 | |
| task_categories: | |
| - image-text-to-text | |
| - visual-question-answering | |
| size_categories: | |
| - 100K<n<1M | |
| configs: | |
| - config_name: LeafNet2.0 | |
| default: true | |
| data_files: | |
| - split: train | |
| path: LeafNet2.0/train-0000-of-0001.parquet | |
| - config_name: captions_eval | |
| data_files: | |
| - split: train | |
| path: captions_eval/train-0000-of-0001.parquet | |
| dataset_info: | |
| - config_name: LeafNet2.0 | |
| features: | |
| - name: images | |
| list: | |
| - name: bytes | |
| dtype: 'null' | |
| - name: path | |
| dtype: string | |
| - name: id | |
| dtype: string | |
| - name: messages | |
| list: | |
| - name: role | |
| dtype: string | |
| - name: content | |
| list: | |
| - name: type | |
| dtype: string | |
| - name: text | |
| dtype: string | |
| - name: raw_metadata | |
| dtype: string | |
| splits: | |
| - name: train | |
| num_bytes: 1827097434 | |
| num_examples: 255825 | |
| download_size: 1827097434 | |
| dataset_size: 1827097434 | |
| - config_name: captions_eval | |
| features: | |
| - name: images | |
| list: | |
| - name: bytes | |
| dtype: 'null' | |
| - name: path | |
| dtype: string | |
| - name: id | |
| dtype: string | |
| - name: messages | |
| list: | |
| - name: role | |
| dtype: string | |
| - name: content | |
| list: | |
| - name: type | |
| dtype: string | |
| - name: text | |
| dtype: string | |
| - name: raw_metadata | |
| dtype: string | |
| splits: | |
| - name: train | |
| num_bytes: 59826371 | |
| num_examples: 6320 | |
| download_size: 59826371 | |
| dataset_size: 59826371 | |
| tags: | |
| - agriculture | |
| - leaf | |
| - vision-language | |
| - vqa | |
| - agvqa | |
| - leafnet | |
| # LeafNet2.0 | |
| LeafNet2.0 is an image and text dataset of plant leaf diseases for training vision-language models. It has about 256,000 leaf images from 37 crop species and 197 crop and disease classes, collected across 9 regions with tropical, subtropical and temperate climates. The authors point out that most earlier plant disease datasets are scattered and mostly taken in controlled settings, so LeafNet 2.0 gathers images from many sources and conditions, including phones and cameras with natural and plain backgrounds. | |
| Each image has a caption that names the crop, the disease and its pathogen, and describes the main symptoms, the lesion shapes, how the disease looks at early and late stages, and any leaf deformation. A set of 6,361 images was checked by hand and used to build LeafBench 2.0, a multiple-choice benchmark with 9 tasks. The authors tested 16 vision-language models on it. Gemini 2.5 Pro scored best with 67.78%, and models trained on agricultural data did better than several larger general models on symptom questions. | |
| LeafNet2.0 follows the first LeafNet, which had about 186,000 images in 97 classes. | |
| - Paper: [A multiregional image–text dataset and benchmark for vision-language modeling of plant diseases](https://doi.org/10.64898/2026.07.01.735881) (bioRxiv) | |
| - Related paper: [LeafNet: A Large-Scale Dataset and Comprehensive Benchmark for Foundational Vision-Language Understanding of Plant Diseases](https://arxiv.org/abs/2602.13662) | |
| - Original dataset: [enalis/LeafNet2.0](https://huggingface.co/datasets/enalis/LeafNet2.0) | |
| - Benchmark: [Project-AgML/LeafBenchV2](https://huggingface.co/datasets/Project-AgML/LeafBenchV2) | |
| - License: the original dataset card does not state a license. Access is gated, and users must agree to use the data for non-commercial purposes only (academic research or education). | |
| ## Configs | |
| | Config | Rows | Images | What it is | | |
| |---|---|---|---| | |
| | `LeafNet2.0` (default) | 255,825 | 187,441 | Every image with its caption | | |
| | `captions_eval` | 6,320 | 6,204 | Hand-checked captions for the benchmark images, with quality flags | | |
| The `captions_eval` images are the LeafBenchV2 images. Its 6,320 images include all 6,305 images named in LeafBench 2.0, and its captions were reviewed by hand, so they can differ from the captions of the same images in `LeafNet2.0`. | |
| ## Structure | |
| ``` | |
| LeafNet2.0/ | |
| train-0000-of-0001.parquet | |
| images/ | |
| image-LeafNet2.0-000-of-001.zip | |
| path_to_shard.parquet | |
| captions_eval/ | |
| train-0000-of-0001.parquet | |
| images/ | |
| image-captions_eval-000-of-001.zip | |
| path_to_shard.parquet | |
| ``` | |
| Each row has: | |
| - `images`: list with one `{"bytes": null, "path": <sha256>}`. The path is the SHA256 of the image bytes and points into a zip shard through `images/path_to_shard.parquet` in the same config folder. | |
| - `id`: `leafnet2_train_<counter>` in `LeafNet2.0` and `leafnet2_captions_eval_train_<counter>` in `captions_eval`. | |
| - `messages`: one user turn (the image only) and one assistant turn (the caption). | |
| - `raw_metadata`: JSON string. In `LeafNet2.0` it has the source `id`, `file_name`, `folder_name` and `raw_image_paths`. In `captions_eval` it has `folder_name`, `disk_folder_used`, the flags `background_flag`, `crop_flag`, `disease_flag`, `primary_symptom_flag`, `disease_stage_flag` and `revision_flag`, `notes` and `raw_image_paths`. | |
| Example from `LeafNet2.0`: | |
| ```json | |
| { | |
| "images": [{"bytes": null, "path": "0f46f8622183d8ca51d02ce786bc457b2ccc14aded6e955338e79a8d1d489840"}], | |
| "id": "leafnet2_train_0", | |
| "messages": [ | |
| {"role": "user", "content": [{"type": "image", "text": null}]}, | |
| {"role": "assistant", "content": [{"type": "text", "text": "A normal image of a Maize leaf infected with Cercospora leaf spot Gray leaf spot (caused by the fungal: *Cercospora zeae-maydis*). The primary symptoms include Small necrotic, halos, rectangular gray lesions, rectangular brown lesions, veins, distinct parallel edges, appearing as Oval shapes. Disease progression is distinct: initially, Lesions appear on lower leaves as tiny spots, often isolated and limited in size. However, as the infection matures, Lesions enlarge and merge, killing leaf tissue; leaves may appear gray due to fungal spores and large areas of necrosis. Structurally, the leaf exhibits leaf deformation (Minor leaf distortion possible)."}]} | |
| ], | |
| "raw_metadata": "{\"id\": 1, \"file_name\": \"Maize___Cercospora_leaf_spot Gray_leaf_spot_1115.JPG\", \"folder_name\": \"Maize___Cercospora_leaf_spot Gray_leaf_spot\", \"raw_image_paths\": [\"Maize___Cercospora_leaf_spot Gray_leaf_spot_1115.JPG\"]}" | |
| } | |
| ``` | |
| ### Changes from the original data | |
| - `LeafNet2.0` is built from the `image_caption_unified` source config, the one that pairs each image with its caption. All 255,825 rows are kept in the same order, in one `train` split. | |
| - The source has no question, only an image and a caption. No question was added: the user turn holds just the image, and the assistant turn is the caption, kept exactly as written. There are 178 different captions across 179 class folders. | |
| - `raw_metadata` keeps the source `id`, `file_name` and `folder_name`. The image's own path from the source parquet is kept in `raw_image_paths`. The caption is already in `messages`. | |
| - The images were stored inside the source parquet files. They are moved into zip shards and stored once per config, deduplicated by SHA256, which leaves 187,276 unique images for the `LeafNet2.0` rows. The `images` config (an image classification version with 255,990 rows) holds 165 more images that no caption row uses. They are packed too, for 187,441 unique images in total. | |
| - `captions_eval` is built from the `captions_eval` source config. All 6,320 rows are kept in the same order, in one `train` split. The source has no image bytes, so each image is taken from `image_caption_unified` by its file name. The caption and every other field are kept as written, including empty `notes`. The `image_name` column is kept in `raw_image_paths`. The 6,320 images hold 6,204 unique images, which are stored again in this config's own `images/` folder. | |
| - The other source configs are not included: `captions_full` (the same captions as `image_caption_unified`, without images), `country_info` (source datasets and their countries) and `literature_reference` (the disease reference table used to write the captions). | |
| ## Usage | |
| ```python | |
| from agml import loadImageTextToTextDataset | |
| dataset = loadImageTextToTextDataset("Project-AgML/LeafNet2.0", config="LeafNet2.0") | |
| captions_eval = loadImageTextToTextDataset("Project-AgML/LeafNet2.0", config="captions_eval") | |
| sample = dataset["train"][0] | |
| sample["images"] # list of PIL images | |
| sample["messages"] | |
| ``` | |
| ## Citation | |
| ```bibtex | |
| @article{nguyen2026leafnet2, | |
| title={A multiregional image--text dataset and benchmark for vision-language modeling of plant diseases}, | |
| author={Nguyen, Trang V. and Quoc, Khang Nguyen and Harwath, David and Quach, Luyl-Da and Dao, Phuong D.}, | |
| journal={bioRxiv}, | |
| year={2026}, | |
| doi={10.64898/2026.07.01.735881} | |
| } | |
| ``` | |
| This dataset is indexed and structured on https://project-agml.github.io/ as part of Project AgML @ UC Davis. This dataset was reformatted from its original format to match HuggingFace's Imagefolder standards but requires an external module (agml) that processes and returns a HF Dataset object faster than HF module functions. |