Machine learning platform for mangrove ecosystem monitoring from aerial and satellite imagery.
Developed by: Mangrove Monitoring Team, Engineers for Exploration (E4E), UC San Diego
This repository provides tools for:
- Pixel-level mangrove detection from drone imagery (~100 km² labeled data)
- Infrastructure detection (roads, buildings) threatening mangrove ecosystems
- ArcGIS Pro integration for environmental scientists
- Experimental architectures including state-space models (Mamba)
# Clone
git clone https://github.com/UCSD-E4E/ml-mangrove.git
cd ml-mangrove
# Setup environment
conda create -n mangrove python=3.11 -y
conda activate mangrove
# Install PyTorch (with CUDA if available)
# Follow https://pytorch.org/ to install torch for your OS
# Example for Windows: pip3 install torch torchvision --index-url https://download.pytorch.org/whl/cu126
pip install -r requirements.txtSee Environment Setup for detailed instructions.
ml-mangrove/
├── DroneClassification/ # Main ML pipeline
│ ├── data/ # Data processing & loading
│ ├── models/ # Model architectures & losses
│ ├── training_utils/ # Training framework
│ ├── experiments/ # Training outputs & logs
│ └── testing/ # Experimental work (Mamba integration)
├── ARC_Package/ # ArcGIS Pro toolbox
├── docs/ # Documentation
└── archive/ # Historical approaches (reference only)
| Model | Use Case | Performance |
|---|---|---|
| ResNet18-UNet | Mangrove detection | 82-85% IoU |
| SegFormer B0/B2 | Infrastructure detection | Fast / Accurate |
| DeepLabv3+ | Multi-class segmentation | 81-84% mIoU |
| MambaUNet | Experimental (state-space) | 25× smaller model |
| Guide | Description |
|---|---|
| Environment Setup | Python, CUDA, WSL2 configuration |
| ArcGIS Setup | Toolbox installation for ArcGIS Pro |
| Data Preparation | Processing geospatial imagery |
| Model Training | Training segmentation models |
| Inference | Running predictions |
| Model Architectures | Architecture details |
| Loss Functions | Available loss functions |
Full documentation: docs/index.md
- Data Processing: Tile GeoTIFFs, create train/val/test splits
- Model Training: Train with custom losses (Jaccard, Boundary IoU)
- Deployment: Package for ArcGIS Pro or run inference directly
| File | Purpose |
|---|---|
DroneClassification/data/utils.py |
Geospatial utilities |
DroneClassification/models/models.py |
Model architectures |
DroneClassification/models/loss.py |
Loss functions |
DroneClassification/training_utils/training_utils.py |
Training framework |
ARC_Package/SegmentationToolbox.pyt |
ArcGIS toolbox |
- Create a feature branch from
master - Follow existing code style
- Add tests for new functionality
- Submit PR with clear description
