Getting Started

Dependencies

Latest version of your favourite conda package manager (>= 4.6) needs to be installed. Please refer to conda docs for conda installation.

Setup

To be able to work in the project without any issues, create and activate your virtual working environment with the following commands:

conda env create -f environment.yml
conda activate wildfire

Warning: The next steps are explained assuming your virtual environment is active.

Running the Application

You can directly run the application, make predictions and have look at the evaluation results of the pre-trained model. By running the command below, you can run the application where you can access detailed information about the project, generate predictions on test data, view model details, and evaluate model performance:

streamlit run server.py

When the command is run, the application will automatically open a new tab in your default browser.

Warning: On your first try, you may encounter a Streamlit message asking for your e-mail. Skip this step by pressing 'Enter' without typing anything.

Custom Data Generation and Model Training (Optional)

The repository comes with a pre-trained model and a pre-generated test set. But if you want to make your own changes, start a jupyter server with the following command:

jupyter notebook

A new tab for the jupyter server will open in your default browser, go to the notebook folder. You can run all the necessary phases for the project by running the notebooks in their numbered order.

Warning: To run the data generation notebooks (numbered 1 and 2) you need to download raw data!

Warning: If you are going to train the model on different are, country etc. , you should download the shapefile files of its polygon from here and extract them under data/country_shape. Then you should modify the corresponding lines in:

app/inference.py
app/performance.py

Downloading Raw Data (Optional)

You will need raw data to generate new training data.

After the necessary data is downloaded, it should be extracted to the data/raw_data/ directory. After extraction, the contents of the data/raw_data/ folder should be as follows:

- DL_FIRE_J1V-C2_216004/
- DL_FIRE_M-C61_216003/
- DL_FIRE_M-C61_216006/
...
- Complete_TAVG_Daily_LatLong1_2010.nc
- Complete_TAVG_Daily_LatLong1_2010.nc
- Complete_TMAX_Daily_LatLong1_2020.nc
...

Adding Dependencies (Optional)

If you want to add a dependency, add it to req.in and then regenerate the req.txt using

pip-compile req.in

and install the regenerated dependencies using

pip install -r req.txt