File size: 6,121 Bytes
2cf6b9a
 
ba0dae3
2cf6b9a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5d540b9
 
 
 
 
 
 
ba0dae3
 
2cf6b9a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5d540b9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
---
pretty_name: LeafBench
license: mit
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_examples: 13950
tags:
- agriculture
- vision-language
- vqa
- agvqa
- leafnet
- leafbench
language:
- en
---

# LeafBench

LeafBench is a multiple-choice visual question answering benchmark for testing how well vision-language models understand plant diseases. It was built from LeafNet, a dataset of about 186,000 leaf images from 22 crop species in 97 classes, collected in 7 countries. Every question asks about the leaf in the image and gives a closed set of answers, so the model must pick one instead of writing free text.

The questions cover 6 tasks, from telling healthy and diseased leaves apart to naming the disease, the crop, the pathogen type, the pathogen's scientific name and the main symptom. The authors tested 12 vision-language models zero-shot. Healthy or diseased questions were easy, with the best models above 90%, but pathogen and scientific name questions stayed below 65% even for frontier models. On the dataset card, GPT-4o averages 72.78%, SCOLD (the authors' own model trained on LeafNet) 72.38% and Gemini 2.5 Pro 69.18%.

- 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/LeafBench](https://huggingface.co/datasets/enalis/LeafBench)
- Image and caption dataset: [Project-AgML/LeafNet](https://huggingface.co/datasets/Project-AgML/LeafNet)
- Evaluation code: [EnalisUs/LeafBench](https://github.com/EnalisUs/LeafBench)
- License: the original dataset card is not consistent. Its metadata says `mit` and its text says CC BY 4.0. Access is gated, and users must agree to use the data for non-commercial purposes only (academic research or education).

## Tasks

| Task | `question_type` | Rows |
|---|---|---|
| Healthy-Diseased Classification | `HDC` | 2,580 |
| Disease Identification | `DC` | 2,580 |
| Crop Species Identification | `CSI` | 2,580 |
| Scientific Name Classification | `SNC` | 2,070 |
| Pathogen Classification | `PC` | 2,070 |
| Symptom Identification | `SI` | 2,070 |

The dataset card calls Disease Identification `DI`, but the data uses `DC`. Healthy-Diseased questions have two options (Yes or No). All other questions have four.

## 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`: `leafbench_train_<counter>`, for example `leafbench_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` and `raw_image_paths`.

Example:

```json
{
  "images": [{"bytes": null, "path": "37a342d681b968f2df2c18298560f39059aeed3fd6beae378addab30fd0076cd"}],
  "id": "leafbench_train_0",
  "messages": [
    {"role": "user", "content": [
      {"type": "image", "text": null},
      {"type": "text", "text": "Does the image show a diseased plant?\nA. Yes\nB. No"}
    ]},
    {"role": "assistant", "content": [{"type": "text", "text": "A. Yes"}]}
  ],
  "raw_metadata": "{\"question_id\": \"hdc::1\", \"question_type\": \"HDC\", \"raw_image_paths\": [\"f3ff804e-bca4-4a23-9af9-1f5b8c5c9980___JR_FrgE.S 3053.JPG\"]}"
}
```

### Changes from the original data

- Built from the 6 parquet files in `data/`. All 13,950 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`. Missing options (C and D in Healthy-Diseased questions) are left out. All text is kept exactly as written, including a leading space in the Scientific Name question and extra spaces in some options.
- Answers combine the answer letter and its option text, for example `A. Yes`.
- `raw_metadata` keeps `question_id` and `question_type`. The image's own path from the source parquet 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 2,506 different image files, which hold 2,535 unique images, because some different images share a file name. The dataset card says 2,910 images and the paper says 2,570.
- The tiny subset in `leafbench_tiny.csv` (880 questions) is not included. All of its questions are also in the full benchmark.

## Usage

```python
from agml import loadImageTextToTextDataset

dataset = loadImageTextToTextDataset("Project-AgML/LeafBench")

sample = dataset["train"][0]
sample["images"]    # list of PIL images
sample["messages"]
```

## Citation

```bibtex
@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.