File size: 6,077 Bytes
79f21e9 044f78a 79f21e9 044f78a 0e330b9 519a27e 1ee2aac 0e330b9 519a27e 0e330b9 519a27e 0e330b9 519a27e 0e330b9 519a27e 0e330b9 519a27e 0e330b9 519a27e 0e330b9 519a27e 0e330b9 519a27e 1f9dca7 d882987 1f9dca7 519a27e 0e330b9 519a27e 0e330b9 519a27e 0e330b9 519a27e 0e330b9 519a27e 0e330b9 519a27e 0e330b9 519a27e 0e330b9 519a27e 0e330b9 519a27e 0e330b9 519a27e 0e330b9 1f9dca7 0e330b9 519a27e 0e330b9 519a27e 0e330b9 519a27e 0e330b9 519a27e 0e330b9 519a27e 0e330b9 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 |
---
title: Biomass Prediction Model
emoji: 🌳
colorFrom: green
colorTo: forest
sdk: gradio
sdk_version: 3.50.2
app_file: app.py
pinned: false
license: mit
---
# Biomass Prediction Model
[](https://huggingface.co/spaces/vertify/biomass-prediction-app)
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
## Overview
This model predicts above-ground biomass (AGB) in forest ecosystems using multi-spectral satellite imagery. Developed by vertify.earth for the GIZ Forest Forward initiative, this tool supports sustainable forest management and carbon monitoring efforts. Biomass estimation is a critical component for carbon stock assessment, ecosystem monitoring, and sustainable forest management.
## Model Details
- **Model Type**: StableResNet (Custom PyTorch architecture)
- **Task**: Regression (Biomass prediction in Mg/ha)
- **Input**: Multi-spectral satellite imagery (GeoTIFF format)
- **Output**: Biomass heatmap and statistics
- **Creator**: vertify.earth
- **Partner**: GIZ Forest Forward initiative
- **Date**: May 16, 2025
## Key Features
- **Multi-source Fusion**: Combines data from multiple satellite sensors (Sentinel-1, Sentinel-2, Landsat-8, PALSAR)
- **Advanced Feature Engineering**: Calculates spectral indices, texture features, and spatial context features
- **Stable Architecture**: Uses ResNet-inspired architecture with numerical stability improvements
- **Interactive Visualization**: Provides heatmaps and RGB overlays of biomass predictions
- **Comprehensive Statistics**: Calculates mean, median, min, max, and total biomass for the analyzed area
## Performance
| Metric | Value |
|--------|-----------|
| R² | 0.87 |
| RMSE | 28.7 Mg/ha |
| MAE | 19.5 Mg/ha |
## Use Cases
- **Carbon Stock Assessment**: Estimate carbon sequestration in forests
- **Biodiversity Monitoring**: Monitor forest structure as a proxy for habitat quality
- **Sustainable Forestry**: Plan and monitor sustainable timber harvesting
- **Land Use Change**: Detect and quantify forest degradation and regrowth
- **Climate Change Research**: Monitor changes in biomass over time
## Usage
### Gradio App
The easiest way to use this model is through the provided Gradio interface:
1. Upload a multi-band satellite image in GeoTIFF format
2. Select visualization type (heatmap or RGB overlay)
3. Click "Generate Biomass Prediction"
4. View the biomass map and statistics
### API Usage
```python
import requests
import io
from PIL import Image
# API endpoint
API_URL = "https://api-inference.huggingface.co/models/vertify/biomass-prediction"
headers = {"Authorization": f"Bearer {API_TOKEN}"}
def predict_biomass(filename):
with open(filename, "rb") as f:
data = f.read()
response = requests.post(API_URL, headers=headers, data=data)
return response.json()
# Example usage
result = predict_biomass("path/to/your/satellite_image.tif")
```
### Local Installation
```bash
# Clone the repository
git clone https://huggingface.co/vertify/biomass-prediction
cd biomass-prediction
# Install dependencies
pip install -r requirements.txt
# Run the Gradio app
python app.py
```
### Inference Script
This repository includes a full inference script (`predict_biomass.py`) that allows you to process satellite imagery in batch mode and generate biomass maps:
```bash
# Example usage
python predict_biomass.py --input_dir /path/to/satellite_images --output_dir /path/to/output --visualization_type heatmap
```
For full documentation on the inference script options, see the script header or run:
```bash
python predict_biomass.py --help
```
## Full Training Pipeline
The complete training pipeline, including data preprocessing, feature engineering, model training, and evaluation is available in our [GitHub repository](https://github.com/vertify-earth/biomass-dl-model-training). Please refer to the GitHub repository for detailed documentation on training your own biomass prediction models.
## Input Data Requirements
For optimal results, your satellite imagery should include:
- **Optical bands**: Blue, Green, Red, Near Infrared (NIR), SWIR1, SWIR2
- **Radar bands**: Sentinel-1 VV, VH polarizations (if available)
- **DEM**: Digital Elevation Model (if available)
- **Format**: GeoTIFF with proper georeferencing
The model has been trained on data from various forest types including tropical, temperate, and boreal forests, making it adaptable to different ecosystems.
## Limitations
- Performance may vary in extremely dense forests (>500 Mg/ha) due to saturation effects
- Model accuracy depends on the quality and consistency of input satellite data
- Cloud cover in optical imagery can reduce prediction quality
- Limited validation in certain ecosystem types (e.g., mangroves, wetlands)
## Citation
If you use this model in your research, please cite:
```
@misc{vertify2025biomass,
author = {vertify.earth},
title = {Biomass Prediction Model Using Multi-spectral Satellite Imagery},
year = {2025},
publisher = {HuggingFace},
note = {Developed for GIZ Forest Forward initiative},
howpublished = {\url{https://huggingface.co/spaces/vertify/biomass-prediction}}
}
```
## License
This project is licensed under the MIT License - see the LICENSE file for details.
## Acknowledgements
- Project developed by vertify.earth for the GIZ Forest Forward initiative
- Training data sources include field measurements from various research institutions
- Satellite imagery from ESA Copernicus Programme (Sentinel-1, Sentinel-2) and NASA/USGS (Landsat-8)
- Special thanks to the open-source community for tools and libraries used in this project
## Contact
For questions, feedback, or collaboration opportunities, please reach out via:
- HuggingFace: [@vertify](https://huggingface.co/vertify)
- GitHub: [vertify](https://github.com/vertify)
- Email: info@vertify.earth |