Uploading TomaMMU dataset with updated README.md and sample images
Browse files- README.md +98 -69
- static/TomaMMU_sample.webp +3 -0
README.md
CHANGED
|
@@ -1,102 +1,133 @@
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
| 3 |
task_categories:
|
| 4 |
-
- visual-question-answering
|
| 5 |
- image-text-to-text
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
-
|
| 9 |
-
|
| 10 |
-
-
|
| 11 |
-
-
|
| 12 |
-
|
| 13 |
configs:
|
| 14 |
-
- config_name:
|
| 15 |
data_files:
|
| 16 |
- split: train
|
| 17 |
path: train-0000-of-0001.parquet
|
| 18 |
dataset_info:
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
splits:
|
| 21 |
- name: train
|
|
|
|
| 22 |
num_examples: 213119
|
| 23 |
-
|
| 24 |
-
|
| 25 |
---
|
| 26 |
|
| 27 |
# TomaMMU
|
| 28 |
|
| 29 |
-
TomaMMU
|
| 30 |
|
| 31 |
-
|
| 32 |
|
| 33 |
-
-
|
| 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 |
-
|
| 38 |
|
| 39 |
-
|
|
|
|
|
|
|
|
|
|
| 40 |
|
| 41 |
-
|
| 42 |
|
| 43 |
-
| Level | Task
|
| 44 |
-
|---|---|
|
| 45 |
-
| 1
|
| 46 |
-
|
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
-
|
| 50 |
|
| 51 |
-
|
| 52 |
|
| 53 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
-
|
| 58 |
-
| Config | Rows (QA pairs) | Unique images | Image data |
|
| 59 |
-
|---|---|---|---|
|
| 60 |
-
| train | 213,119 | 28,112 | 0.31GB (1 shard) |
|
| 61 |
|
| 62 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
|
| 64 |
-
|
| 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 |
-
|
|
|
|
| 76 |
|
| 77 |
-
|
| 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 |
-
##
|
| 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 |
+

|
| 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
|