Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- soil-organic-carbon
|
| 4 |
+
- remote-sensing
|
| 5 |
+
- xgboost
|
| 6 |
+
- sentinel-2
|
| 7 |
+
- sentinel-1
|
| 8 |
+
- geospatial
|
| 9 |
+
- northeast-india
|
| 10 |
+
library_name: xgboost
|
| 11 |
+
license: mit
|
| 12 |
+
metrics:
|
| 13 |
+
- r2
|
| 14 |
+
- rmse
|
| 15 |
+
pipeline_tag: tabular-regression
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
# Soil Organic Carbon (SOC) Estimation Model for Northeast India
|
| 19 |
+
|
| 20 |
+
## Model Description
|
| 21 |
+
This is an **XGBoost Regressor** trained to estimate **Soil Organic Carbon (SOC)** values (g/kg) across **Northeast India**.
|
| 22 |
+
|
| 23 |
+
It uses multi-source remote sensing data (Optical, Radar, Topography, and Climate) representing the year **2022**. The model is designed to handle diverse landscapes, including forests, agricultural land, water bodies, and urban areas.
|
| 24 |
+
|
| 25 |
+
* **Region:** Northeast India (89.4°E - 97.6°E).
|
| 26 |
+
* **Time Period:** 2022 (Annual Median).
|
| 27 |
+
* **Input Data:** Sentinel-2, Sentinel-1, SRTM Terrain, CHIRPS Rainfall, ERA5 Temperature.
|
| 28 |
+
* **Training Samples:** ~10,000 points (Random stratified sampling).
|
| 29 |
+
|
| 30 |
+
## Intended Use
|
| 31 |
+
* **Regional Soil Health Monitoring:** rapid assessment of SOC without lab tests.
|
| 32 |
+
* **Carbon Baseline Studies:** Establishing 2022 baselines for carbon projects.
|
| 33 |
+
* **Land Use Analysis:** Distinguishing between high-carbon forests and low-carbon degraded lands.
|
| 34 |
+
|
| 35 |
+
## Feature Inputs (16 Columns)
|
| 36 |
+
To use this model, your input dataframe must contain these **16 columns** in this exact order:
|
| 37 |
+
|
| 38 |
+
| Category | Features |
|
| 39 |
+
| :--- | :--- |
|
| 40 |
+
| **Sentinel-2 (Optical)** | `S2_B2`, `S2_B3`, `S2_B4`, `S2_B8`, `S2_B11`, `S2_NDVI` |
|
| 41 |
+
| **Sentinel-1 (Radar)** | `S1_VV`, `S1_VH` |
|
| 42 |
+
| **Terrain** | `elevation`, `slope`, `aspect` |
|
| 43 |
+
| **Climate** | `precip_annual`, `temp_mean` |
|
| 44 |
+
| **Soil/Location** | `soil_texture`, `latitude`, `longitude` |
|
| 45 |
+
|
| 46 |
+
## How to Use
|
| 47 |
+
```python
|
| 48 |
+
import xgboost as xgb
|
| 49 |
+
from huggingface_hub import hf_hub_download
|
| 50 |
+
import pandas as pd
|
| 51 |
+
|
| 52 |
+
# 1. Download Model
|
| 53 |
+
model_path = hf_hub_download(
|
| 54 |
+
repo_id="mona0125/soc-estimation-ne-india",
|
| 55 |
+
filename="soc_estimation_model_ne_india.json"
|
| 56 |
+
)
|
| 57 |
+
|
| 58 |
+
# 2. Load Model
|
| 59 |
+
model = xgb.XGBRegressor()
|
| 60 |
+
model.load_model(model_path)
|
| 61 |
+
|
| 62 |
+
# 3. Predict (Example Data)
|
| 63 |
+
# Ensure columns match the Feature Inputs list above!
|
| 64 |
+
data = pd.DataFrame({
|
| 65 |
+
'S2_B2': [0.03], 'S2_B3': [0.05], 'S2_B4': [0.04], 'S2_B8': [0.25], 'S2_B11': [0.15], 'S2_NDVI': [0.72],
|
| 66 |
+
'S1_VV': [-8.5], 'S1_VH': [-14.2],
|
| 67 |
+
'elevation': [150], 'slope': [5.5], 'aspect': [120],
|
| 68 |
+
'precip_annual': [1800], 'temp_mean': [24.5],
|
| 69 |
+
'soil_texture': [2], 'latitude': [26.1], 'longitude': [91.7]
|
| 70 |
+
})
|
| 71 |
+
|
| 72 |
+
prediction = model.predict(data)
|
| 73 |
+
print(f"Predicted SOC: {prediction[0]:.2f} g/kg")
|