uchandar29 commited on
Commit
9d1ffc9
·
verified ·
1 Parent(s): 4f44983

Uploading TomaMMU dataset with updated README.md and sample images

Browse files
Files changed (2) hide show
  1. README.md +98 -69
  2. static/TomaMMU_sample.webp +3 -0
README.md CHANGED
@@ -1,102 +1,133 @@
1
  ---
2
- license: cc-by-nc-4.0
 
3
  task_categories:
4
- - visual-question-answering
5
  - image-text-to-text
6
- tags:
7
- - agriculture
8
- - plant-pathology
9
- - tomato
10
- - vqa
11
- - vision-language
12
- pretty_name: TomaMMU
13
  configs:
14
- - config_name: train
15
  data_files:
16
  - split: train
17
  path: train-0000-of-0001.parquet
18
  dataset_info:
19
- config_name: train
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  splits:
21
  - name: train
 
22
  num_examples: 213119
23
- size_categories:
24
- - 100K<n<1M
25
  ---
26
 
27
  # TomaMMU
28
 
29
- TomaMMU is a tomato leaf disease VQA dataset built by researchers at FPT University (Vietnam) and Korea University. The motivation behind it is pretty simple: most tomato disease models are trained and tested on clean, lab-quality images, but accuracy falls off a cliff (30-40%) once you point them at a real field photo with messy backgrounds and inconsistent lighting. TomaMMU tries to close that gap by pairing field- and lab-collected photos with human-annotated questions that go well beyond "sick or healthy" — asking models to identify the crop, count leaves, name the pathogen, and even give the scientific name of the disease.
30
 
31
- There are two papers behind this work. The first introduces the dataset and a benchmark (TomaBench) for evaluating VLMs on it. The second, SOLAR, builds a fine-tuned model on top of it.
32
 
33
- - [TomaMMU: A Comprehensive Multimodal Understanding Benchmark for Tomato Leaf Diseases](https://doi.org/10.48550/arXiv.2608.08727) — Truong, Quoc, Quach (arXiv:2608.08727)
34
- - [A Multi-Modal Generative Model for Tomato Disease Leaves Understanding](https://doi.org/10.48550/arXiv.2609.19555) — Quoc, Tran, Truong, Quach (arXiv:2609.19555) — the SOLAR model paper, trained on this dataset
35
- - Original repository: [huggingface.co/datasets/enalis/TomaMMU](https://huggingface.co/datasets/enalis/TomaMMU)
36
 
37
- ## What's in the papers
38
 
39
- The images come from LeafNet and TOM2024, mixing field shots with lab photos, and cover 15 disease categories (14 diseases plus healthy) with 25 distinct symptoms. Every question was human-annotated rather than machine-generated, which the authors call out as a deliberate contrast to lab-only benchmarks like PlantVillage.
 
 
 
40
 
41
- Questions fall into seven types, organized into three difficulty tiers:
42
 
43
- | Level | Task types |
44
- |---|---|
45
- | 1: Basic Perception | HDC (Healthy-Diseased Classification), LC (Leaf Count), CSI (Crop Species Identification) |
46
- | 2: Pathology Understanding | SI (Symptom Identification), PC (Pathogen Classification) |
47
- | 3: Expert Diagnosis | DC (Disease Classification), SNC (Scientific Name Classification) |
 
 
 
 
48
 
49
- The first paper's own eval setup (TomaBench) splits things into 124,367 pairs for fine-tuning plus a held-out set of 42,626 multiple-choice and 37,816 open-ended questions. They benchmarked a wide range of models — Gemini 2.0 Flash, InternVL3, Qwen2.5/3, Gemma4, SmolVLM2, LLaVA-1.5, LFM2.5-VL, plus CLIP-family models (CLIP-ViT-L-14, SigLIP2, BioCLIP, SCOLD). The best zero-shot model only hit 61.3% MCQ accuracy, and open-ended answers were a lot worse (~2.5/5 on GPT-graded scoring across the board). Fine-tuning closes most of that gap: their TomaLLaVA model reached 96.09% on the MCQ set.
50
 
51
- The second paper (SOLAR) picks up from there and builds an actual diagnostic model rather than just benchmarking existing ones — a vision encoder (SCOLD) feeding into a sparse mixture-of-experts layer that routes attention based on the question, then an LFM-VL 2.5 decoder for generating the answer. It hits 97.68% on TomaMMU and holds up reasonably (69% average) across three other external tomato-disease datasets it wasn't trained on. Interestingly, symptom identification is still the weakest link (7.8% error rate) and mistakes there tend to cascade into wrong disease/pathogen answers downstream — worth keeping in mind if you're using this data to train or evaluate something similar.
52
 
53
- Neither paper nor the original dataset card lists a license, so this repo's card leaves it as unspecified rather than guessing.
 
 
 
 
 
54
 
55
- ## What's standardized here
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
 
57
- This repo has the full 213,119-pair corpus in a single `train` config — it doesn't reproduce the paper's own 60/20/20 train/eval split, since the source CSV has no split column to begin with.
58
- | Config | Rows (QA pairs) | Unique images | Image data |
59
- |---|---|---|---|
60
- | train | 213,119 | 28,112 | 0.31GB (1 shard) |
61
 
62
- One thing worth flagging: the source `Tomato.csv` lists 36,993 distinct `image_path` strings, but a good chunk of those are just case differences (`Tomato___Bacterial_Floundering` vs `Tomato___Bacterial_floundering`) that point at the same file on a case-insensitive filesystem. Rather than dedup by path string, images here are keyed by a SHA256 hash of their actual bytes, which sidesteps the casing issue entirely. That's how 36,993 path strings end up as 28,112 unique stored images, matching the paper's reported 28,808 real files once you account for the hash collapsing true duplicates.
 
 
 
 
63
 
64
- Question type breakdown:
65
- | Question type | Options
66
- |---|---
67
- | SI (Symptom Identification) | 4
68
- | HDC (Healthy-Diseased Classification) | 2
69
- | CSI (Crop Species Identification) | 4
70
- | LC (Leaf Count) | 2 | 28,799 |
71
- | DC (Disease Classification) | 4
72
- | PC (Pathogen Classification) | 4
73
- | SNC (Scientific Name Classification) | 4
74
 
75
- All seven types are multiple-choice — there's no open-ended detection-style task in this corpus (unlike the paper's own OEQ eval set, which isn't part of what's standardized here).
 
76
 
77
- ## Layout
78
 
 
 
 
79
  ```
80
- train-0000-of-0001.parquet # metadata rows
81
- images/
82
- image-train-000-of-001.zip # image shard (ZIP_STORED, uncompressed)
83
- path_to_shard.parquet # maps image SHA256 hash -> shard_file
84
- ```
85
-
86
- Images sit uncompressed inside zip shards, keyed by hash, capped at 5GB per shard (this dataset only needed one).
87
 
88
- ## Schema
89
-
90
- | Column | Type | Description |
91
- |---|---|---|
92
- | `images` | `list<struct<bytes, path>>` | `bytes` is `null`; `path` is the SHA256 hash, looked up in `images/path_to_shard.parquet` |
93
- | `id` | `string` | `tomammu_train_<n>` |
94
- | `messages` | chat-style list | user turn is the image plus the question, with whichever lettered options are actually present in the source (some rows only have A/B); assistant turn combines the answer's letter with its text, e.g. `"B. Bacterial Floundering"`, rather than just the bare text |
95
- | `raw_metadata` | JSON string | `image_path` (the original source path), `question_id`, `question_type` |
96
-
97
- Each row is one image-question pair, so the same image shows up across as many as seven rows.
98
-
99
- ## Citations
100
 
101
  ```bibtex
102
  @article{truong2026tomammu,
@@ -114,6 +145,4 @@ Each row is one image-question pair, so the same image shows up across as many a
114
  }
115
  ```
116
 
117
- ---
118
-
119
- This dataset is indexed and structured on https://project-agml.github.io/ as part of the AgML python library. 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.
 
1
  ---
2
+ pretty_name: TomaMMU
3
+ license: other
4
  task_categories:
 
5
  - image-text-to-text
6
+ - visual-question-answering
7
+ size_categories:
8
+ - 100K<n<1M
9
+ source_datasets:
10
+ - LeafNet
11
+ - TOM2024
12
+ - In-house tomato leaf images (TomaMMU authors)
13
  configs:
14
+ - config_name: default
15
  data_files:
16
  - split: train
17
  path: train-0000-of-0001.parquet
18
  dataset_info:
19
+ features:
20
+ - name: images
21
+ list:
22
+ - name: bytes
23
+ dtype: 'null'
24
+ - name: path
25
+ dtype: string
26
+ - name: id
27
+ dtype: string
28
+ - name: messages
29
+ list:
30
+ - name: role
31
+ dtype: string
32
+ - name: content
33
+ list:
34
+ - name: type
35
+ dtype: string
36
+ - name: text
37
+ dtype: string
38
+ - name: raw_metadata
39
+ dtype: string
40
  splits:
41
  - name: train
42
+ num_bytes: 334409642
43
  num_examples: 213119
44
+ download_size: 334409642
45
+ dataset_size: 334409642
46
  ---
47
 
48
  # TomaMMU
49
 
50
+ ![TomaMMU sample images](static/TomaMMU_sample.webp)
51
 
52
+ TomaMMU is a visual question answering dataset about tomato leaf diseases. It has 213,119 question and answer pairs over 28,808 leaf images in 15 categories (14 diseases and healthy), covering 25 disease symptoms. The images come from LeafNet, TOM2024 and the authors' own collections, and include both field and lab photos. Human annotators reviewed and finalized every question and answer.
53
 
54
+ The questions cover 7 tasks at 3 levels. The authors tested 14 vision-language models; the best zero-shot model, Gemini 2.0 Flash, averaged 70.3% on the multiple-choice questions. Their fine-tuned model, TomaLLaVA, reached 96.09%.
 
 
55
 
56
+ A second paper from the same group trains SOLAR, a model for tomato leaf question answering, using this data.
57
 
58
+ - Paper: [TomaMMU: A Comprehensive Multimodal Understanding Benchmark for Tomato Leaf Diseases](https://arxiv.org/abs/2608.08727)
59
+ - Related paper: [A Multi-Modal Generative Model for Tomato Disease Leaves Understanding](https://arxiv.org/abs/2609.19555)
60
+ - Original dataset: [enalis/TomaMMU](https://huggingface.co/datasets/enalis/TomaMMU)
61
+ - License: the authors do not state a license.
62
 
63
+ ## Tasks
64
 
65
+ | Level | Task | `question_type` |
66
+ |---|---|---|
67
+ | 1. Basic Perception | Healthy-Diseased Classification | `HDC` |
68
+ | 1. Basic Perception | Leaf Classification | `LC` |
69
+ | 1. Basic Perception | Crop Species Identification | `CSI` |
70
+ | 2. Pathology Understanding | Symptom Identification | `SI` |
71
+ | 2. Pathology Understanding | Pathogen Classification | `PC` |
72
+ | 3. Expert Diagnosis | Disease Classification | `DC` |
73
+ | 3. Expert Diagnosis | Scientific Name Classification | `SNC` |
74
 
75
+ All rows are multiple-choice, with 2 or 4 options.
76
 
77
+ ## Structure
78
 
79
+ ```
80
+ train-0000-of-0001.parquet
81
+ images/
82
+ image-train-000-of-001.zip
83
+ path_to_shard.parquet
84
+ ```
85
 
86
+ Each row has:
87
+
88
+ - `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`.
89
+ - `id`: `tomammu_train_<counter>`, for example `tomammu_train_0`.
90
+ - `messages`: one user turn (image, then question with options) and one assistant turn (answer).
91
+ - `raw_metadata`: JSON string with `image_path`, `question_id` and `question_type`.
92
+
93
+ Example:
94
+
95
+ ```json
96
+ {
97
+ "images": [{"bytes": null, "path": "4a31a8b625ce2e767cd4ed8e54f9b7d0bf0e9fb843e16050b7679a6bc8f293c8"}],
98
+ "id": "tomammu_train_0",
99
+ "messages": [
100
+ {"role": "user", "content": [
101
+ {"type": "image", "text": null},
102
+ {"type": "text", "text": "Does the image show a diseased plant?\nA. Disease\nB. Healthy"}
103
+ ]},
104
+ {"role": "assistant", "content": [{"type": "text", "text": "A. Disease"}]}
105
+ ],
106
+ "raw_metadata": "{\"image_path\": \"val/Tomato___Bacterial_Floundering/1005963105_1668687142186_640x480.jpg\", \"question_id\": \"hdc::00001\", \"question_type\": \"HDC\"}"
107
+ }
108
+ ```
109
 
110
+ ### Changes from the original data
 
 
 
111
 
112
+ - Built from `Tomato.csv`, which has one row per question. The source has no split column, so all rows are in one `train` split. The paper's TomaBench split is not reproduced.
113
+ - Options come from the `A` to `D` columns and are added to the question as lines like `A. text`. Empty options are left out, so some questions show only A and B. Spaces around option text are trimmed.
114
+ - Answers combine the answer letter and the `correct_text` column, for example `A. Disease`.
115
+ - `raw_metadata` keeps `image_path`, `question_id` and `question_type`. The question, options and answer are already in `messages`.
116
+ - The CSV has 36,993 different image path strings, but many differ only in letter case and point to the same file. Images are stored once, deduplicated by SHA256, which leaves 28,112 unique images. Only images used by the rows are packed.
117
 
118
+ ## Usage
 
 
 
 
 
 
 
 
 
119
 
120
+ ```python
121
+ from agml import loadImageTextToTextDataset
122
 
123
+ dataset = loadImageTextToTextDataset("Project-AgML/TomaMMU")
124
 
125
+ sample = dataset["train"][0]
126
+ sample["images"] # list of PIL images
127
+ sample["messages"]
128
  ```
 
 
 
 
 
 
 
129
 
130
+ ## Citation
 
 
 
 
 
 
 
 
 
 
 
131
 
132
  ```bibtex
133
  @article{truong2026tomammu,
 
145
  }
146
  ```
147
 
148
+ 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.
 
 
static/TomaMMU_sample.webp ADDED

Git LFS Details

  • SHA256: fcbff311419c2b96bc340beac45e9f8bd1c976a897aae8fad4784bbb160766b6
  • Pointer size: 131 Bytes
  • Size of remote file: 164 kB