DETECT LEAVES
This code is followed by: https://zenodo.org/records/20241355 The purpose of this code is to segment individual leaves. Datasets in LEAF_DATA have disparate sizes. To overcome this, all images are reduced to a 1024 pixel longest dimension size, recording the necessary transformation. Segme
This code is followed by: https://zenodo.org/records/20241355
The purpose of this code is to segment individual leaves. Datasets in LEAF_DATA have disparate sizes. To overcome this, all images are reduced to a 1024 pixel longest dimension size, recording the necessary transformation. Segmentation on uniform, reduced size images is carried out and leaf masks are projected back onto their original full size images. Individual leaf masks are then saved in a standardized 1024×1024 pixel size with all associated metadata.
DETECT_LEAVES/
├── 0_resize_LEAF_DATA.py # Script to standardize image dimensions
├── 1_prepare_training_data.py # Script to format data for YOLO training
├── 2_train_yolov26n-seg.py # Model training script
├── 3_infer_LEAF_DATA.py # Bulk inference on the LEAF_DATA directory
├── 4_infer_training_data.py # Inference on training data for next phase
├── 5_finalize_metadata.py # Merges image metadata with segmentation results
├── 6_figures_and_tables.py # Generates final summary stats and panel figures
├── dataset.yaml # YOLO configuration file for class names and paths
├── metadata_info/ # Directory containing variety keys and mapping CSVs for each dataset
├── training_data/ # Raw annotated images and labels used for model training
├── yolo26n-seg.pt # The weights of the trained segmentation model
├── runs/ # Training logs and model performance metrics, including best.pt
└── outputs/ # Resulting data, figures, and summaries
├── figures/ # Final panel figures and master statistics table
├── inference_full/ # Inference on reduced size images
├── infer_training_data/ # Inference results from the training dataset for the next phase
├── model_training_data/ # Splits (train/val/test) and training stats for YOLO model
└── reduced_training_data/ # Reduction of training data for model resolution
LEAF_DATA/ # Data to infer
📤 Share this page
Found this useful? Share it with your network.
Files are hosted on the source repository. Click download to access the full dataset.