--- pretty_name: LeafBench license: mit task_categories: - image-text-to-text - visual-question-answering size_categories: - 10K}`. The path is the SHA256 of the image bytes and points into a zip shard through `images/path_to_shard.parquet`. - `id`: `leafbench_train_`, 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.