Inspiration

We can all agree that 2020 has been one crazy roller coaster ride, whether it be surviving in a raging pandemic, bracing ourselves for a possible alien invasion, or battling deadly flames that have displaced humans and animals alike. Australia's 2019-2020 fire season alone destroyed 45 million acres of forests and has since increased the threat of wildfires to humans, ecosystems, and economies. Recent fires have become difficult to fight, as they scorch through large tracts of forests. This is adding pressure on firefighters and their resources.

WYLDFIRE aims to solve the problem of forest fires by predicting and simulating it's spread. This could potentially help in rescue and control during this calamity. It addresses Goals 13 and 15 - Climate Action and Life on Land - of UN's Sustainable Development Goals and aims to play its part in the overall social good.

What it does

WYLDFIRE is a web application designed to predict the spread of a forest fire based on the location picked by the user. The location is chosen either by dragging the marker on the map, inputting the name of the location, or entering the physical latitude and longitudes in the text fields. This is done with the help of the Google Maps APIs. The user is then able to take a screenshot of the area facing the issue and download the image to a local folder. This image is then used by the backend Flask server. It is fed to the trained Machine Learning model, and with the help of TensorFlow and OpenCV, the image is used to calculate weights that determine the spread of the fire. The data from this is sent to the front end react visualizer, which uses these weights and other environmental factors such as wind speed and direction to determine the spread of the fire. This is then simulated to the user, and the growth of the fire is observed.

How we built it

WYLDFIRE front end is developed using HTML5, JavaScript, and React. The backend runs via Flask, which runs the python based machine learning component. The web application makes use of Tensorflow to complete the machine learning requirements. In addition to this, various Google Maps APIs have also been integrated to allow the user to pinpoint the exact location of the fire and allow the machine learning model to predict the spread of the fire and send the data to the visualizing tool.

The team has integrated 4 Google Map APIs with HTML and CSS (Places, Geocoding and Maps JavaScript, Maps Static), which enable the user to - a) Search for the location where the fire has just begun b) Get their results to autocomplete and calculated c) Alternatively place the marker on to exactly pinpoint the location of the fire and retrieve that area's latitude and longitude.

The user is then prompted to take a screenshot of the chosen area and save the image locally for the backend process to commence, all achieved through a press of 2 buttons. The flask server then feeds the saved image to the machine learning model. The machine learning model utilizes the RGB values to predict what color the given pixel is - blue is given a very high weightage, as fire cannot spread over water. Brown pixels are given a moderate weightage as fire can spread in high-temperature conditions over land. Green pixels have the least weightage and fire spreads at the highest rate in forests. This is achieved why Tensorflow and OpenCV. This model helps us create the weightage of each pixel, which is then sent to the front end path visualizing algorithm.

The fire path visualizing tool is developed using React, which takes in the saved image, calculated weights, and feeds this data to the algorithm. The algorithm utilizes the properties of Djikstra's algorithm, and in addition, takes into account an environmental factor - wind - which plays a vital role in the spread of a forest fire.

Challenges we ran into

  1. Correct Tensorflow configurations to match the prediction problem
  2. Integration of React, Flask, and HTML
  3. Integration of Google Map APIs into front end development
  4. Displaying the map as a grid
  5. Choosing which algorithm (Dijkstra's) that best simulated the movement of fire in real life. We also tried BFS and Swarm algorithms.

Accomplishments that we're proud of

We are proud of the final simulation and the visualisation. We love the animation as the fire starts in the center as a small bush fire but slowly gets harsher as it gains power from the nearby tinder and wood. Before you know it, the whole area has been burnt. We especially love the dark red destructive wake of the edges of the fire whereas the middle parts are orange denoting that the fire has calmed down.

What we learned

The team learned how to integrate different platforms and technologies together to make a product that can learn and compute results itself, without the need for too much user support.

We learnt how to use animations using React and how to do various CSS and HTML transfigurations to display important information to our users.

What's next for WYLDFIRE

We could attempt to let users add settlements on the satellite image and show the most efficient evacuation path to escape from the ever-growing fire and also how much time they have before they are swallowed up as well.

With more topological data and a further extension of other environmental factors, WYLDFIRE can prove to be the ideal tool for predicting the spread of forest fires and help contain them before they go out of control.

Share this project:

Updates