--- # For reference on dataset card metadata, see the spec: https://github.com/huggingface/hub-docs/blob/main/datasetcard.md?plain=1 # Doc / guide: https://huggingface.co/docs/hub/datasets-cards {} --- # Dataset Card for Beans ## Dataset Details ### Dataset Description The Beans dataset contains 1,296 images of bean plant leaves, categorized into three classes: - **Healthy** - **Angular Leaf Spot (disease)** - **Bean Rust (disease)** The images were collected in Ugandan fields by the Makerere AI Lab in collaboration with the National Crops Resources Research Institute (NaCRRI). Each image was annotated during data collection by agricultural experts. The dataset is intended for plant disease classification and can be used to develop machine learning models for mobile-based agricultural diagnostics. - **License:** MIT ### Dataset Sources - **Homepage:** https://github.com/AI-Lab-Makerere/ibean/ ## Dataset Structure Total images: 1,296 Classes: 3 - **Healthy leaves:** 428 images - **Angular Leaf Spot:** 432 images - **Bean Rust:** 436 images Image specs: JPEG format, RGB images ## Example Usage Below is a quick example of how to load this dataset via the Hugging Face Datasets library. ``` from datasets import load_dataset # Load the dataset dataset = load_dataset("randall-lab/beans", split="train", trust_remote_code=True) # dataset = load_dataset("randall-lab/beans", split="test", trust_remote_code=True) # dataset = load_dataset("randall-lab/beans", split="validation", trust_remote_code=True) # Access a sample from the dataset example = dataset[0] image = example["image"] label = example["label"] image.show() # Display the image print(f"Label: {label}") ``` ## Citation **BibTeX:** @misc{makerere2020beans, author = "{Makerere AI Lab}", title = "{Bean Disease Dataset}", year = "2020", month = "January", url = "https://github.com/AI-Lab-Makerere/ibean/" }