Datasets:
|
Download README.md from Project-AgML/LeafBenchV2: direct link, hf CLI and curl.
- Browser
- Download file 7.02 kB
-
https://huggingface.co/datasets/Project-AgML/LeafBenchV2/resolve/main/README.md
- Command line
-
hf download hf://datasets/Project-AgML/LeafBenchV2/README.md
-
curl -L -o README.md https://huggingface.co/datasets/Project-AgML/LeafBenchV2/resolve/main/README.md
7.02 kB
| pretty_name: LeafBenchV2 | |
| license: apache-2.0 | |
| task_categories: | |
| - image-text-to-text | |
| - visual-question-answering | |
| size_categories: | |
| - 10K<n<100K | |
| configs: | |
| - config_name: default | |
| data_files: | |
| - split: train | |
| path: train-0000-of-0001.parquet | |
| dataset_info: | |
| 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: 401694166 | |
| num_examples: 54580 | |
| download_size: 401694166 | |
| dataset_size: 401694166 | |
| tags: | |
| - agriculture | |
| - vision-language | |
| - vqa | |
| - agvqa | |
| - leaf | |
| - leafnet | |
| - leafbench | |
| # LeafBenchV2 | |
| LeafBenchV2 is a multiple-choice visual question answering benchmark for testing how well vision-language models understand plant diseases. It comes with LeafNet 2.0, an image and text dataset of 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 benchmark images are taken from the LeafNet2.0 evaluation subset of 6,361 images, which were checked by hand. | |
| Each image is asked up to 9 questions, one per task, ranging from simple checks such as healthy or diseased to fine-grained questions about the pathogen, its scientific name and the lesions. The authors tested 16 vision-language models. Gemini 2.5 Pro scored best overall with 67.78%, GPT-4o reached 64.72% and the best open model, Qwen3-VL-4B, reached 60.02%. Most models scored above 90% on healthy or diseased classification but dropped sharply on pathogen, scientific name and lesion questions. Models trained on agricultural data did better than several larger general models on symptom questions. | |
| LeafBenchV2 follows LeafBench from the first LeafNet paper, which had 13,950 questions over 6 tasks. | |
| - 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/LeafBenchV2](https://huggingface.co/datasets/enalis/LeafBenchV2) | |
| - Image and caption dataset: [Project-AgML/LeafNet2.0](https://huggingface.co/datasets/Project-AgML/LeafNet2.0) | |
| - Evaluation code: [EnalisUs/LeafBench](https://github.com/EnalisUs/LeafBench) | |
| ## Tasks | |
| | Task | `question_type` | Rows | | |
| |---|---|---| | |
| | Disease Identification | `DI` | 6,306 | | |
| | Pathogen Classification | `PC` | 6,306 | | |
| | Crop Species Identification | `CSI` | 6,306 | | |
| | Symptom Identification | `SI` | 6,306 | | |
| | Healthy/Diseased Classification | `HDC` | 6,306 | | |
| | Scientific Name Classification | `SNC` | 6,306 | | |
| | Leaf Symptom Detection | `LSD` | 6,282 | | |
| | Disease Severity Classification | `DSC` | 6,282 | | |
| | Lesion Identification | `LI` | 4,180 | | |
| Every question has four options, A to D. Healthy/Diseased and Disease Severity questions have only two real options, and their other options are the text `nan` in the source. | |
| ## Structure | |
| ``` | |
| train-0000-of-0001.parquet | |
| images/ | |
| image-train-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`. | |
| - `id`: `leafbenchv2_train_<counter>`, for example `leafbenchv2_train_0`. | |
| - `messages`: one user turn (image, then question with options) and one assistant turn (answer). | |
| - `raw_metadata`: JSON string with `question_id`, `question_type`, `image_folder` and `raw_image_paths`. | |
| Example: | |
| ```json | |
| { | |
| "images": [{"bytes": null, "path": "412729ce8fb7275534901ca894eae6e3220af05b1f154343fe288f7d5ee10881"}], | |
| "id": "leafbenchv2_train_0", | |
| "messages": [ | |
| {"role": "user", "content": [ | |
| {"type": "image", "text": null}, | |
| {"type": "text", "text": "What disease is shown on the Apple leaf in this image?\nA. Black rot\nB. Powdery mildew\nC. Narrow Brown Spot\nD. leaf blight"} | |
| ]}, | |
| {"role": "assistant", "content": [{"type": "text", "text": "A. Black rot"}]} | |
| ], | |
| "raw_metadata": "{\"question_id\": \"DI:1\", \"question_type\": \"DI\", \"image_folder\": \"Apple___Black_rot\", \"raw_image_paths\": [\"Apple___Black_rot_0156.JPG\"]}" | |
| } | |
| ``` | |
| ### Changes from the original data | |
| - Built from the 7 parquet files in `data/`. All 54,580 rows are kept in the same order. The source has one `test` split, which is stored here as `train`. | |
| - Options come from the `A` to `D` columns and are added to the question as lines like `A. text`. Option text is kept exactly as written, including extra spaces and the literal `nan` options. | |
| - Answers combine the answer letter and its option text, for example `A. Black rot`. In 2,705 rows the correct option is `nan`, mostly pathogen and scientific name questions on healthy leaves. These rows are kept as they are, so their answer reads like `C. nan`. | |
| - `raw_metadata` keeps `question_id`, `question_type` and `image_folder`. The `image_name` column is kept in `raw_image_paths`. The question, options and answer are already in `messages`. | |
| - The images were stored inside the source parquet files, once per question. They are moved into a zip shard and stored once, deduplicated by SHA256. The rows name 6,305 different images, which hold 6,189 unique images. The paper reports 6,361 benchmark images. | |
| - The images here are encoded differently from the same pictures in LeafNet 2.0, for example PNG instead of JPEG, so only 25 of them share a hash with LeafNet 2.0 images. | |
| ## Usage | |
| ```python | |
| from agml import loadImageTextToTextDataset | |
| dataset = loadImageTextToTextDataset("Project-AgML/LeafBenchV2") | |
| 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} | |
| } | |
| @article{quoc2026leafnet, | |
| title={LeafNet: A Large-Scale Dataset and Comprehensive Benchmark for Foundational Vision-Language Understanding of Plant Diseases}, | |
| author={Quoc, Khang Nguyen and Dao, Phuong D and Quach, Luyl-Da}, | |
| journal={arXiv preprint arXiv:2602.13662}, | |
| year={2026} | |
| } | |
| ``` | |
| 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. |