ML & Computer VisionCompleted2024

Multispectral UAV Crop Classification Pipeline

Complete ML/DL pipeline for crop classification using multispectral UAV orthoimages with temporal analysis and spatial-aware train/test splits.

Multispectral UAV Crop Classification Pipeline

Gallery

Multispectral UAV Crop Classification Pipeline - Image 1
Multispectral UAV Crop Classification Pipeline - Image 2
Multispectral UAV Crop Classification Pipeline - Image 3
Multispectral UAV Crop Classification Pipeline - Image 4
Multispectral UAV Crop Classification Pipeline - Image 5

Problem

Accurate crop type classification from UAV imagery requires handling multispectral data across multiple flight dates while ensuring spatial independence between training and test sets to prevent data leakage.

Approach

Built a modular pipeline with three stages: (1) patch extraction from multispectral orthoimages using field boundary vectors, (2) temporal stacking of multi-date observations into 4D arrays, (3) spatially-aware train/val/test splitting using zone masks. Implemented both Random Forest and deep learning classifiers.

Data

Multispectral UAV orthoimages (10 bands) from multiple flight dates over agricultural fields. GeoJSON field boundaries with crop labels. Spatial zone masks for split assignment.

Validation

Spatial cross-validation ensuring no geographic overlap between splits. Comprehensive per-class metrics, confusion matrices, and spatial error analysis.

Results

Classic ML models trained on hand-picked spectral features showed strong overfitting (high train/validation accuracy but noticeably lower test performance). Switching to a PCA-based feature representation improved generalization and stabilized test scores. A final comparison against a deep learning approach highlights where each method fails and succeeds on the held-out test set.

My Role

Lead developer. Designed architecture, implemented core modules (patch extraction, temporal stacking, spatial splitting), wrote ML training notebooks.

Next Steps

Add support for additional sensor types; implement online learning for new flight dates; deploy as web service.

Key Outcomes

  • End-to-end preprocessing pipeline
  • Spatially-aware data splitting
  • ML and DL training notebooks
  • Open-source on GitHub

Tech Stack

PythonPyTorchscikit-learnRasterioGeoPandasNumPy

Tags

classificationremote-sensinguavdeep-learninggeospatialpython