uchandar29 commited on
Commit
0e34491
·
verified ·
1 Parent(s): c0b4c01

Uploading AgroBench dataset with image shards and metadata files. Converted from parquet format to Zip Shard Format

Browse files
README.md ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: AgroBench
3
+ license: cc-by-nc-4.0
4
+ task_categories:
5
+ - image-text-to-text
6
+ - visual-question-answering
7
+ size_categories:
8
+ - 1K<n<10K
9
+ source_datasets:
10
+ - Perrenial plants detection
11
+ - CottonWeedDet3
12
+ - Open Plant Phenotype Database of Common Weeds in Denmark
13
+ - CropAndWeed Dataset
14
+ configs:
15
+ - config_name: default
16
+ data_files:
17
+ - split: train
18
+ path: train-0000-of-0001.parquet
19
+ dataset_info:
20
+ features:
21
+ - name: images
22
+ list:
23
+ - name: bytes
24
+ dtype: 'null'
25
+ - name: path
26
+ dtype: string
27
+ - name: id
28
+ dtype: string
29
+ - name: messages
30
+ list:
31
+ - name: role
32
+ dtype: string
33
+ - name: content
34
+ list:
35
+ - name: type
36
+ dtype: string
37
+ - name: text
38
+ dtype: string
39
+ - name: raw_metadata
40
+ dtype: string
41
+ splits:
42
+ - name: train
43
+ num_examples: 4342
44
+ ---
45
+
46
+ # AgroBench
47
+
48
+ ![AgroBench sample images](static/AgroBench.jpg)
49
+
50
+ AgroBench is a benchmark that tests vision-language models on agriculture. It has 4,342 multiple-choice questions across 7 topics, annotated by agriculture experts. It covers 203 crop categories, 682 disease categories, 134 pest categories and 108 weed categories.
51
+
52
+ The authors found that current models struggle with fine-grained identification. Weed identification is the hardest task, and most open-source models score close to random on it.
53
+
54
+ The weed images come from the 4 datasets listed in `source_datasets`. The other images come from websites supervised by plant pathologists and from Creative Commons or publicly available datasets.
55
+
56
+ - Paper: [AgroBench: Vision-Language Model Benchmark in Agriculture](https://arxiv.org/abs/2507.20519) (ICCV 2025)
57
+ - Original dataset: [risashinoda/AgroBench](https://huggingface.co/datasets/risashinoda/AgroBench)
58
+ - Code: [dahlian00/AgroBench](https://github.com/dahlian00/AgroBench)
59
+ - License: the authors do not state a license.
60
+
61
+ ## Tasks
62
+
63
+ | Task | `source` | Rows |
64
+ |---|---|---|
65
+ | Disease Identification | `did` | 1,502 |
66
+ | Pest Identification | `pid` | 544 |
67
+ | Weed Identification | `wid` | 609 |
68
+ | Crop Management | `cmn` | 411 |
69
+ | Disease Management | `dmn` | 569 |
70
+ | Machine Usage QA | `mqa` | 303 |
71
+ | Traditional Management | `tm` | 404 |
72
+
73
+ ## Structure
74
+
75
+ ```
76
+ train-0000-of-0001.parquet
77
+ images/
78
+ image-train-000-of-001.zip
79
+ path_to_shard.parquet
80
+ ```
81
+
82
+ Each row has:
83
+
84
+ - `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`.
85
+ - `id`: `agrobench_<source>_<counter>`, for example `agrobench_did_0`.
86
+ - `messages`: one user turn (image, then question with options) and one assistant turn (answer).
87
+ - `raw_metadata`: JSON string with the source fields `category`, `source`, `id` and `raw_image_paths`. Depending on the task it also has `crop`, `category2` and `reasoning` (a short explanation of the answer).
88
+
89
+ Example:
90
+
91
+ ```json
92
+ {
93
+ "id": "agrobench_did_0",
94
+ "messages": [
95
+ {"role": "user", "content": [
96
+ {"type": "image", "text": null},
97
+ {"type": "text", "text": "What disease is affecting the plant?\nA. Northern Leaf Blight\nB. Pythium root rot\nC. Witches'-broom\nD. Purple stain\nE. Bacterial dieback of nectarine"}
98
+ ]},
99
+ {"role": "assistant", "content": [{"type": "text", "text": "E. Bacterial dieback of nectarine"}]}
100
+ ],
101
+ "raw_metadata": "{\"category\": \"Bacteria\", \"crop\": \"Nectarine\", \"source\": \"did\", \"id\": \"729\", \"raw_image_paths\": [\"png/did_729.png\"]}"
102
+ }
103
+ ```
104
+
105
+ ### Changes from the original data
106
+
107
+ - Built from the original `dataset.jsonl` and `png/` files. They have the same rows and images as the original parquet files, plus the `reasoning` and `category2` fields.
108
+ - All 7 tasks are in one `train` split. The `source` field in `raw_metadata` gives the task.
109
+ - Options are added to the question as lines like `A. text`. All questions have 5 options except one, which has 6.
110
+ - Answers combine the letter and the option text, for example `E. Bacterial dieback of nectarine`. One question lists the correct answer twice (A and E), so `A` is used.
111
+ - 6 answers do not exactly match any option text. They are kept as in the source, without a letter.
112
+ - `raw_metadata` keeps the source fields except `question`, `options`, `answer` and `image`, which are already in `messages`. The image path is kept in `raw_image_paths`. The `reasoning` text stays in `raw_metadata` and is not added to the answer.
113
+ - Images are stored once, deduplicated by SHA256. The 4,342 rows use 3,742 unique images.
114
+
115
+ ## Usage
116
+
117
+ ```python
118
+ from agml import loadImageTextToTextDataset
119
+
120
+ dataset = loadImageTextToTextDataset("Project-AgML/AgroBench")
121
+
122
+ sample = dataset["train"][0]
123
+ sample["images"] # list of PIL images
124
+ sample["messages"]
125
+ ```
126
+
127
+ ## Citation
128
+
129
+ ```bibtex
130
+ @InProceedings{Shinoda_2025_ICCV,
131
+ author = {Shinoda, Risa and Inoue, Nakamasa and Kataoka, Hirokatsu and Onishi, Masaki and Ushiku, Yoshitaka},
132
+ title = {AgroBench: Vision-Language Model Benchmark in Agriculture},
133
+ booktitle = {Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV)},
134
+ month = {October},
135
+ year = {2025},
136
+ pages = {7634-7644}
137
+ }
138
+ ```
139
+
140
+ 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.
images/image-train-000-of-001.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b63a3ed7df28baec1d19a029e33a1d70d154fb54f8c907caea5c17dd26ea2782
3
+ size 1785015084
images/path_to_shard.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:769960335e0025ab876f0a9ba50f5ff7d12056809a44635355f1fbe383bbe082
3
+ size 238532
static/AgroBench.jpg ADDED

Git LFS Details

  • SHA256: 8f11a3d9b5c7f8ab53656d8f20781f0a9239ebb322bc5cb145785f354f32e40b
  • Pointer size: 131 Bytes
  • Size of remote file: 444 kB
train-0000-of-0001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0ad97c3b24b5e57e97e27debf6bf5d42b310d4a90fc2938a9af6b4760a03dc6b
3
+ size 920732