CoolFace
Modelpublic

OneScience-Group/FireCubeNet

sourceHugging Facemitupdated 18d agoView on Hugging Face
0likes25downloads
README.md139 linesDownload Raw Back to root
1---2license: mit3language:4- en5tags:6- OneScience7- Earth Science8- Wildfire Danger Prediction9- ConvLSTM10frameworks: PyTorch11---12 13<p align="center">14  <strong><span style="font-size: 30px;">FireCubeNet</span></strong>15</p>16 17# Model Introduction18 19FireCubeNet 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.20 21Paper: Wildfire Danger Prediction and Understanding With Deep Learning  22https://doi.org/10.1029/2022GL09936823 24# Model Description25 26FireCubeNet 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.27 28# Use Cases29 30| Use Case | Description |31| :---: | :--- |32| Next-day wildfire danger | Estimate next-day large-fire danger from ten days and a 25 km neighborhood around a center pixel. |33| Spatiotemporal drivers | Combine weather, vegetation, wetness, socioeconomic, terrain, and land-cover variables. |34| ModelScope/OneCode execution | Validate training, inference, evaluation, visualization, and checkpoint workflows in ModelScope or OneCode. |35| Multi-GPU training | Run distributed data-parallel training with `torchrun`. |36 37# Usage Instructions38 39## 1.OneCode40 41Experience intelligent, one-click AI4S programming through the OneCode online environment:42 43[Try intelligent, one-click AI4S programming](https://web-2069360198568017922-iaaj.ksai.scnet.cn:58043/home)44 45## 2. Download and Installation46 47```bash48hf download OneScience-Group/FireCubeNet --local-dir ./FireCubeNet49cd FireCubeNet50```51 52### Environment Dependencies53 54**Hardware Requirements**55 56- A GPU or DCU is recommended.57- A CPU can be used for connectivity validation with the default small-sample configuration.58- DCU users must install DTK first. DTK 25.04.2 or later, or the OneScience-recommended version matching the cluster, is recommended.59 60**DCU Environment**61 62```bash63# Activate DTK and Conda first64conda create -n onescience311 python=3.11 -y65conda activate onescience31166pip install onescience[earth-dcu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai67```68 69**GPU Environment**70 71```bash72# Activate Conda first73conda create -n onescience311 python=3.11 -y libstdcxx-ng=12 libgcc-ng=12 gcc_linux-64=12 gxx_linux-64=1274conda activate onescience31175pip install onescience[earth-gpu] -i http://mirrors.onescience.ai:3141/pypi/simple/ --trusted-host mirrors.onescience.ai76```77 78### Training Data79 80The 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.81 82```bash83python scripts/fake_data.py84```85 86### Training87 88For single-device training, use:89 90```bash91python scripts/train.py92```93 94For multi-GPU training, use:95 96```bash97torchrun --nproc_per_node=8 --nnodes=1 --rdzv_id=1000 --rdzv_backend=c10d --max_restarts=0 --master_addr="localhost" --master_port=29500 scripts/train.py98```99 100Training results include model parameters for inference and loss metrics for each training epoch. The results are saved to:101 102```text103result/checkpoints/firecubenet.pt104result/training/metrics.json105```106 107### Trained Weights108 109No 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.110 111### Inference112 113```bash114python scripts/inference.py115```116 117Inference 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`.118 119### Evaluation and Visualization120 121```bash122python scripts/result.py123```124 125Evaluation 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.126 127# Official OneScience Information128 129| Platform | OneScience Main Repository | Skills Repository |130| --- | --- | --- |131| Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |132| GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |133 134# Citation and License135 136This repository is an independent engineering reproduction of the public FireCubeNet paper specifications.137 138Use of this repository's code, official model weights, and data remains subject to the licenses and terms of their respective projects.139