How fiftyq/center-pivot-irrigation-yolo works
This repository is a collection of scripts for preparing Sentinel-style raster and farmland-vector data, training YOLO instance-segmentation models, and exporting predictions as GIS polygons. The main workflow prepares image tiles and labels, performs spatial dataset splitting and checks, trains a model, then runs tiled inference and vector export. Separate scripts provide label QA, demo prediction, threshold evaluation, and earlier GIS-prediction variants. Relationships are limited to those visible in excerpts; the README is empty, and some subsystem links are not shown.
Main entry points: data_prepare.py Tile dataset · best.pt Model weights · 04_train_seg.py YOLO training · 06_predict_to_gis.py GIS prediction v1
Components 16
Data Preparation
- Tile dataset
data_prepare.py - Random split
02_split_dataset.py - Spatial split
02_split_dataset_by_source.py
Dataset Quality
- Label check
03_check_labels.py - Label and leakage QC
08_label_qc.py
Model Training
- YOLO training
04_train_seg.py - Model weights
runs/segment/ordos_farmland_v2_clean_split/weights/best.pt
Prediction and GIS
- Demo prediction
05_predict_demo.py - GIS prediction v1
06_predict_to_gis.py - GIS prediction v2
06_predict_to_gis_v2.py - GIS prediction v3
06_predict_to_gis_v3.py - Threshold evaluation
06_predict_to_gis_v3.py - GIS polygon outputs
predict_results
Other components
- Operator
- Raster imagery
- Farmland vectors
Connections 26
- Operator → Tile dataset: prepares data
data_prepare.py - Raster imagery → Tile dataset: reads imagery
data_prepare.py - Farmland vectors → Tile dataset: labels tiles
data_prepare.py - Tile dataset → Random split: splits tiles
02_split_dataset.py - Tile dataset → Spatial split: reads tile index
02_split_dataset_by_source.py - Operator → Label check: checks labels
03_check_labels.py - Tile dataset → Label and leakage QC: checks dataset
08_label_qc.py - Random split → YOLO training: provides splits
- Spatial split → YOLO training: provides splits
- Operator → YOLO training: starts training
04_train_seg.py - YOLO training → Model weights: saves weights
- Operator → Demo prediction: runs prediction
05_predict_demo.py - Operator → GIS prediction v1: runs inference
06_predict_to_gis.py - Operator → GIS prediction v2: runs inference
06_predict_to_gis_v2.py - Operator → GIS prediction v3: runs inference
06_predict_to_gis_v3.py - Model weights → Demo prediction: loads weights
05_predict_demo.py - Raster imagery → GIS prediction v1: reads imagery
06_predict_to_gis.py - Raster imagery → GIS prediction v2: reads imagery
06_predict_to_gis_v2.py - Raster imagery → GIS prediction v3: reads imagery
06_predict_to_gis_v3.py - Model weights → GIS prediction v1: loads weights
- Model weights → GIS prediction v2: loads weights
- Model weights → GIS prediction v3: loads weights
- GIS prediction v1 → GIS polygon outputs: writes polygons
- GIS prediction v2 → GIS polygon outputs: writes polygons
06_predict_to_gis_v2.py - GIS prediction v3 → GIS polygon outputs: writes polygons
- Operator → Threshold evaluation: evaluates thresholds
06_predict_to_gis_v3.py