CoolFace
Apppublic

Vikctor/wildfire_disaster_management

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
App README

๐Ÿ”ฅ 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 validation
  • โ€”GET /model/info - Model information and required features
  • โ€”GET /api-info - Current API date range information
  • โ€”GET /date-info - Date parsing and information

๐Ÿ“Š Usage Examples

Coordinate-based Prediction

bash
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

bash
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

json
{
  "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)