OneScience-Group/FireCubeNet
<p align="center"> <strong><span style="font-size: 30px;">FireCubeNet</span></strong> </p>
Model Introduction
FireCubeNet addresses next-day danger prediction for large wildfires by combining meteorological, vegetation, soil-moisture, human-activity, terrain, and land-cover conditions to identify areas at risk of severe fire. It is primarily intended to generate wildfire-danger probabilities, identify important drivers of fire ignition and spread, and support wildfire warning, risk assessment, and emergency-resource planning.
Paper: Wildfire Danger Prediction and Understanding With Deep Learning https://doi.org/10.1029/2022GL099368
Model Description
FireCubeNet was proposed by research teams from the National Observatory of Athens, Universitat de València, Max Planck Institute for Biogeochemistry, and Universidade Nova de Lisboa. The paper trained and validated the models with ERA5-Land, MODIS, European Drought Observatory, WorldPop, Copernicus EU-DEM, CORINE Land Cover, EFFIS, and MODIS active-fire data. The model supports next-day wildfire-danger prediction, spatiotemporal fire-driver modeling, and large-wildfire risk assessment.
Use Cases
Usage Instructions
1.OneCode
Experience intelligent, one-click AI4S programming through the OneCode online environment:
Try intelligent, one-click AI4S programming
2. Download and Installation
hf download OneScience-Group/FireCubeNet --local-dir ./FireCubeNet
cd FireCubeNetEnvironment Dependencies
Hardware Requirements
- A GPU or DCU is recommended.
- A CPU can be used for connectivity validation with the default small-sample configuration.
- DCU users must install DTK first. DTK 25.04.2 or later, or the OneScience-recommended version matching the cluster, is recommended.
DCU Environment
# Activate DTK and Conda first
conda create -n onescience311 python=3.11 -y
conda activate onescience311
pip install onescience[earth-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.aiGPU Environment
# Activate Conda first
conda create -n onescience311 python=3.11 -y libstdcxx-ng=12 libgcc-ng=12 gcc_linux-64=12 gxx_linux-64=12
conda activate onescience311
pip install onescience[earth-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.aiTraining Data
The default synthetic dataset has few samples but preserves the real 10×25×25×25 input dimensions. It includes persistent weather, progressive drying, spatial hotspots, and physically correlated variables; static fields repeat through time, and the ten land-cover fractions sum to exactly one at every pixel. Synthetic labels validate engineering connectivity only and do not represent the official data distribution or paper performance.
python scripts/fake_data.pyTraining
For single-device training, use:
python scripts/train.pyFor multi-GPU training, use:
torchrun --nproc_per_node=8 --nnodes=1 --rdzv_id=1000 --rdzv_backend=c10d --max_restarts=0 --master_addr="localhost" --master_port=29500 scripts/train.pyTraining results include model parameters for inference and loss metrics for each training epoch. The results are saved to:
result/checkpoints/firecubenet.pt
result/training/metrics.jsonTrained Weights
No trained weights are bundled under weight/. The paper provides no confirmed official checkpoint, and the engineering checkpoint is not claimed to be compatible with external weights.
Inference
python scripts/inference.pyInference results contain next-day wildfire-danger probabilities, reference labels, and the corresponding temporal and spatial location information, and are saved to result/output/predictions.npz.
Evaluation and Visualization
python scripts/result.pyEvaluation reports Precision, Recall, F1, AUROC, and the confusion matrix in result/evaluation/metrics.json. It also generates the wildfire-danger probability and ROC comparison figure result/evaluation/wildfire_danger.png. Synthetic-data results are only for engineering-workflow validation and do not represent paper performance on the real test set.
Official OneScience Information
Citation and License
This repository is an independent engineering reproduction of the public FireCubeNet paper specifications.
Use of this repository's code, official model weights, and data remains subject to the licenses and terms of their respective projects.
