Vikctor/wildfire_disaster_management
0
๐ฅ Wildfire Prediction API
An advanced ML-powered API for wildfire occurrence prediction and severity assessment using deep learning models.
๐ Features
- Wildfire Occurrence Prediction: Binary classification using neural networks
- Severity Assessment: Multi-class severity prediction (Low/Moderate/High)
- Weather Integration: Automatic weather data fetching from Open-Meteo API
- Enhanced Risk Analysis: Risk level interpretation with recommendations
- Batch Processing: Multiple location predictions in one request
- Historical & Forecast Data: Supports both historical (ERA5) and forecast weather data
๐ API Endpoints
Core Predictions
POST /predict- Predict using coordinates and date (auto-fetches weather)POST /predict/direct- Direct prediction with provided weather data
Utility Endpoints
GET /health- Health check with model validationGET /model/info- Model information and required featuresGET /api-info- Current API date range informationGET /date-info- Date parsing and information
๐ Usage Examples
Coordinate-based Prediction
curl -X POST "https://your-space-name.hf.space/predict" \
-H "Content-Type: application/json" \
-d '{
"lat": 40.7128,
"lon": -74.0060,
"date": "2024-07-15"
}'Direct Weather Data Prediction
curl -X POST "https://your-space-name.hf.space/predict/direct" \
-H "Content-Type: application/json" \
-d '{
"cloud_cover_mean": 45.0,
"dewpoint_mean": 18.5,
"evapotranspiration_total": 3.2,
"fire_weather_index": 12.5,
"humidity_min": 25.0,
"pressure_mean": 1015.3,
"solar_radiation_mean": 185.7,
"temp_mean": 28.5,
"temp_range": 12.3,
"wind_direction_mean": 225.0,
"wind_direction_std": 15.2,
"wind_speed_max": 18.5,
"daynight_N": 0,
"lat": 40.7128,
"lon": -74.0060,
"month": 7
}'๐ Response Format
{
"occurrence_probability": 0.75,
"occurrence_class": 1,
"severity_probabilities": [0.15, 0.35, 0.50],
"severity_class": 2
}๐ฏ Model Information
- Occurrence Model: Deep neural network for binary wildfire prediction
- Severity Model: Multi-class neural network for severity assessment
- Features: 23 engineered features including weather, location, and temporal data
- Weather Source: Open-Meteo API (ERA5 historical + forecast data)
๐ Supported Locations
Global coverage with weather data from:
- Historical: ERA5 data (1940-present)
- Forecast: Up to 14 days ahead
- Real-time: Current conditions
โ ๏ธ Important Notes
- Date Range: Historical data from 1940, forecast up to 14 days
- Weather API: Automatically switches between historical and forecast APIs
- Rate Limits: Respects Open-Meteo API rate limits
- Coordinates: Global coverage (latitude: -90 to 90, longitude: -180 to 180)
