Learn practical skills, build real-world projects, and advance your career

Note: This is a mirror of a project from leadingindia interns to showcase jovian.

Intro to the project:

Video Introduction:

Forest Fire UAV Video

Video Link, Poster Link
Project Description

Wildfire is a natural disaster, causing irreparable damage to local ecosystem. Sudden and uncontrollable wildfires can be a real threat to residents’ lives. Statistics from National Interagency Fire Center (NIFC) in the USA show that the burned area doubled from 1990 to 2015 in the USA. Recent wildfires in northern California (reported by CNN) have already resulted in more than 40 deaths and 50 missing.

More than 200,000 local residents have been evacuated under emergency. The wildfires occur 220,000 times per year globally, the annual burned area is over 6 million hectares. Accurate and early detection of wildfire is therefore of great importance. Fire detection task is crucial for people safety. Several fire detection systems were developed to prevent damages caused by fire. One can find different technical solutions. Most of them are sensors based and are also generally limited to indoors.

They detect the presence of particles generated by smoke and fire by ionization, which requires a close proximity to the fire. Consequently, they cannot be used in large covered area. Moreover, they cannot provide information about initial fire location, direction of smoke propagation, size of the fire, growth rate of the fire, etc. To get over such limitations video fire detection systems are used.

This project looks at automating this process using a CNN model built with Keras frameworks and trained on UAV images.

Benefits of using Jovian:
  • Requirements:
    The orignal code repository doesn't mention the requirements to run the code. The setup for Keras and other libraries might require some iterations and guess work which might take a lot of efforts.

  • Setup issues:
    Different versions of the frameworks might cause issues with the current server setup. In this case, Keras required CUDA version 9.x and the system was setup at the latest CUDA 10.x version which caused needed a lot of debugging and a complete re-installation later. Once the code is pushed to jovian, all of the dependancies are handled by jovian and the complete installation is a one-click process.

  • Experiments:
    GitHub showcases different notebooks which can be confusing. However, the authors have run multiple experiments which aren't best documented. Jovian allows hosting multiple versions of the experiments and comparing the best results here, which also allows communicating the efforts in the project. (Presenting one simple notebook may not communicate the efforts required for a 1-month project in the best fashion for example).

We can also compare all experiments. See here

  • Replication:
    Jovian also enables us to host the dataset along with the output pickle files from the experiment. This saves the time required to re-train the model, one can simply run the notebook and perform inference.

Setup and How to is mentioned below:

System setup

Jovian makes it easy to share Jupyter notebooks on the cloud by running a single command directly within Jupyter. It also captures the Python environment and libraries required to run your notebook, so anyone (including you) can reproduce your work.

Option 1: Run Online:
  • At the Top of the notebook you can find a one-click run online button for:
    • Run on MyBinder
    • Run on Collab
    • Run on Kaggle Kernels
Option 2: Run on Local Machine:

Here's what you need to do to get started:

Install Anaconda by following the instructions given here. You might also need to add Anaconda binaries to your system PATH to be able to run the conda command line tool.
Install the jovian Python library by the running the following command (without the $) on your Mac/Linux terminal or Windows command prompt:

pip install jovian --upgrade

Download the notebook for this tutorial using the jovian clone command:

$ jovian clone <notebook_id>

(You can get the notebook_id by clicking the 'Clone' button at the top of this page on https://jvn.io)

Running the clone command creates a directory 01-pytorch-basics containing a Jupyter notebook and an Anaconda environment file.

$ ls forest-fire-detection-uav-images

Now we can enter the directory and install the required Python libraries (Jupyter, PyTorch etc.) with a single command using jovian:

$ cd forest-fire-detection-uav-images
$ jovian install

Jovian reads the environment.yml file, identifies the right dependencies for your operating system, creates a virtual environment with the given name (01-pytorch-basics by default) and installs all the required libraries inside the environment, to avoid modifying your system-wide installation of Python. It uses conda internally. If you face issues with jovian install, try running conda env update instead.

We can activate the virtual environment by running

$ conda activate nine

For older installations of conda, you might need to run the command: source activate nine

Once the virtual environment is active, we can start Jupyter by running

$ jupyter notebook

You can now access Jupyter's web interface by clicking the link that shows up on the terminal or by visiting http://localhost:8888 on your browser.

Experiments:

This project looked at multiple experiments with the best results from the one currently being displayed. To compare the results from previous experiments, please click here