How spmohanty/plantvillage-dataset works
PlantVillage is a plant-leaf image dataset for disease-diagnosis research. The main user workflow is to load a color, grayscale, or segmented configuration, have the Hugging Face builder obtain the image archive and split metadata, and receive labeled examples enriched with crop, disease, and leaf identifiers. The repository also includes leaf-grouping metadata preparation, documented dataset-generation scripts, and a Hub upload utility. The loader and upload paths are sampled; generation-script wiring is not, so those links are omitted.
Main entry points: plant_village.py Example generation · upload_to_hf.py Hub upload utility · leaf-map.json Leaf ID map · aggregate_map.py Map aggregation
Components 16
Dataset access
- Dataset builder
plant_village.py - Example schema
plant_village.py - Split retrieval
plant_village.py - Example generation
plant_village.py - Leaf images
raw - Train/test splits
scripts
Leaf metadata
- Leaf ID map
leaf_grouping/leaf-map.json - Map aggregation
leaf_grouping/aggregate_map.py - Filtered leaf maps
leaf_grouping/filtered_leafmaps - Count CSV conversion
leaf_grouping/create_map.py - Leaf count workbooks
leaf_grouping/leaf_maps
Dataset operations
- Dataset generation
scripts - Image variants
raw - Hub upload utility
scripts/upload_to_hf.py
Other components
- Dataset user
- Hugging Face Hub
Connections 17
- Dataset user → Dataset builder: loads dataset
- Dataset builder → Split retrieval: selects splits
- Dataset builder → Hugging Face Hub: downloads archive and metadata
- Split retrieval → Hugging Face Hub: downloads split lists
- Split retrieval → Example generation: provides file lists
- Dataset builder → Example generation: generates examples
- Example generation → Leaf images: reads image paths
- Example generation → Leaf ID map: looks up leaf IDs
- Example generation → Example schema: yields records
- Count CSV conversion → Leaf count workbooks: reads workbooks
- Map aggregation → Filtered leaf maps: reads CSV maps
- Map aggregation → Leaf ID map: writes ID map
- Dataset generation → Image variants: generates variants
- Hub upload utility → Leaf images: archives images
- Hub upload utility → Leaf ID map: uploads metadata
- Hub upload utility → Hugging Face Hub: uploads dataset files
- Train/test splits → Split retrieval: downloaded split inputs