--- pretty_name: LeafNet2.0 license: cc-by-4.0 task_categories: - image-text-to-text - visual-question-answering size_categories: - 100K}`. The path is the SHA256 of the image bytes and points into a zip shard through `images/path_to_shard.parquet` in the same config folder. - `id`: `leafnet2_train_` in `LeafNet2.0` and `leafnet2_captions_eval_train_` in `captions_eval`. - `messages`: one user turn (the image only) and one assistant turn (the caption). - `raw_metadata`: JSON string. In `LeafNet2.0` it has the source `id`, `file_name`, `folder_name` and `raw_image_paths`. In `captions_eval` it has `folder_name`, `disk_folder_used`, the flags `background_flag`, `crop_flag`, `disease_flag`, `primary_symptom_flag`, `disease_stage_flag` and `revision_flag`, `notes` and `raw_image_paths`. Example from `LeafNet2.0`: ```json { "images": [{"bytes": null, "path": "0f46f8622183d8ca51d02ce786bc457b2ccc14aded6e955338e79a8d1d489840"}], "id": "leafnet2_train_0", "messages": [ {"role": "user", "content": [{"type": "image", "text": null}]}, {"role": "assistant", "content": [{"type": "text", "text": "A normal image of a Maize leaf infected with Cercospora leaf spot Gray leaf spot (caused by the fungal: *Cercospora zeae-maydis*). The primary symptoms include Small necrotic, halos, rectangular gray lesions, rectangular brown lesions, veins, distinct parallel edges, appearing as Oval shapes. Disease progression is distinct: initially, Lesions appear on lower leaves as tiny spots, often isolated and limited in size. However, as the infection matures, Lesions enlarge and merge, killing leaf tissue; leaves may appear gray due to fungal spores and large areas of necrosis. Structurally, the leaf exhibits leaf deformation (Minor leaf distortion possible)."}]} ], "raw_metadata": "{\"id\": 1, \"file_name\": \"Maize___Cercospora_leaf_spot Gray_leaf_spot_1115.JPG\", \"folder_name\": \"Maize___Cercospora_leaf_spot Gray_leaf_spot\", \"raw_image_paths\": [\"Maize___Cercospora_leaf_spot Gray_leaf_spot_1115.JPG\"]}" } ``` ### Changes from the original data - `LeafNet2.0` is built from the `image_caption_unified` source config, the one that pairs each image with its caption. All 255,825 rows are kept in the same order, in one `train` split. - The source has no question, only an image and a caption. No question was added: the user turn holds just the image, and the assistant turn is the caption, kept exactly as written. There are 178 different captions across 179 class folders. - `raw_metadata` keeps the source `id`, `file_name` and `folder_name`. The image's own path from the source parquet is kept in `raw_image_paths`. The caption is already in `messages`. - The images were stored inside the source parquet files. They are moved into zip shards and stored once per config, deduplicated by SHA256, which leaves 187,276 unique images for the `LeafNet2.0` rows. The `images` config (an image classification version with 255,990 rows) holds 165 more images that no caption row uses. They are packed too, for 187,441 unique images in total. - `captions_eval` is built from the `captions_eval` source config. All 6,320 rows are kept in the same order, in one `train` split. The source has no image bytes, so each image is taken from `image_caption_unified` by its file name. The caption and every other field are kept as written, including empty `notes`. The `image_name` column is kept in `raw_image_paths`. The 6,320 images hold 6,204 unique images, which are stored again in this config's own `images/` folder. - The other source configs are not included: `captions_full` (the same captions as `image_caption_unified`, without images), `country_info` (source datasets and their countries) and `literature_reference` (the disease reference table used to write the captions). ## Usage ```python from agml import loadImageTextToTextDataset dataset = loadImageTextToTextDataset("Project-AgML/LeafNet2.0", config="LeafNet2.0") captions_eval = loadImageTextToTextDataset("Project-AgML/LeafNet2.0", config="captions_eval") sample = dataset["train"][0] sample["images"] # list of PIL images sample["messages"] ``` ## Citation ```bibtex @article{nguyen2026leafnet2, title={A multiregional image--text dataset and benchmark for vision-language modeling of plant diseases}, author={Nguyen, Trang V. and Quoc, Khang Nguyen and Harwath, David and Quach, Luyl-Da and Dao, Phuong D.}, journal={bioRxiv}, year={2026}, doi={10.64898/2026.07.01.735881} } ``` 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.