Fighting Against Wildfires with Machine Learning

How to detect fire outbreaks in real-world weather conditions using computer vision.

Mikko Lahdeaho
Omdena
5 min readFeb 28, 2020

--

The Challenge

I’ve got a chance to participate in Omdena’s wildfire challenge with mission-driven company Sintecsys.

The challenge goal was to develop an application to identify fire outbreaks. The end customer will take advantage by integrating the machine learning models in its security camera network; controlling the Brazilian and the Amazon forests.

The impact

Stopping wildfires is an important task against global warming and climate change, which motivated to join the challenge next to the interesting technology.

At the beginning of the challenge, we learned right away that we can not benefit from the weather forecasts because fire outbreaks are mostly caused by humans.

Satellite imagery was also too slow for detecting fire outbreaks in the very beginning.

We focused on computer vision technologies and used images from real-world cameras from the Brazil forests and suburban areas.

How we build the solution through collaboration

The challenge was carried out in a team-based project group consisting of about 40 experts and enthusiasts in the field.

In project management, an interesting self-guided model was used, giving authors the freedom to define phases and tasks to achieve the goal.

After the initial research phase, sensible subsets began to emerge, which were shaped for more precise tasks and alternative models. This certainly stems from a lot of practitioners’ self-directed and ability to define their own responsibilities.

In addition, we had regular joint weekly meetings, as well as task-specific meetings.

Each member may be associated with different tasks, provided that a task is interesting and relevant. I participated in labeling, classification modeling and tasks focusing on improving image quality.

The experts worked independently, together with the aid of others.

This was the finest thing in the challenge. I got support and I was able to give it to others too.

The process

#1 The challenge briefing

We initially received a brief from the Sintecsys’s team including limitations of the implementation, as well as for the training and testing of the images from the cameras.

#2 Labeling

The image material was not labeled, so we first had to decide the way and level for labeling. Since the need was for different types of modeling, we ended up labeling the smoke images by painting the smoke generated pixels. In this way, the same labeling can be utilized in all the classifications of the image, region in image, or pixel in the image level.

The LabelBox tool is designed for a multi-user environment and has all the necessary features for the task.

#3 Data Pipeline

Labeled data sets were formed in their own roles as sets for training, validation, and testing. These were still distributed or de-duplicated so that the images captured from the same cameras were only in one set, improving the reliability of the model.

Smoke or Not?

The aim of the machine learning model is to distinguish whether there is smoke or not in the image. The fire usually does not appear in the pictures, so smoke detection is more important. No smoke without fire.

For modeling, I used the large and heavy deep learning models (e.g. ResNet, VGG), but they did not deliver better results than the corresponding smaller ones.

I ended up using the pruned version of the 50 layers ResNet model. The number of parameters dropped from about 50 million to 2 million, which helps the large images to be used in the GPU device memory. Images in the data set were Full HD images (1920x1080).

At first, the modeling left relatively unsatisfying results with about 70–80% accuracy.

After examining the unsuccessful detection, I found it impossible to say, in some pictures, whether it contains smoke or not. And if I can’t make the difference, can I expect the model to be able to do so?

Smoke or Not?

#4 Label Smoothing

In labeling, the separation of smoke from fog and clouds is like “a line drawn in the water”. In between, it is almost impossible to say confidently whether the picture is smoke or not.

Label smoothing technic to smooth the confident classification model. It can give the label a probability distribution of how certain the image belongs to a specific category.

By using this technic I improved the results in modeling, but the best possible value remained unsubstantiated. Usually, the value is something like 10–30%, but it varies depending on the data.

#5 Image JPEG Quality

Some of the images were very heavily compacted (low JPEG quality). They looked really different than others, so it was necessary to help the model to handle these cases.

I formed extra images from the original images, which was radically lower quality. This forces the model to learn also about the very rough image of smoke. And this resulted in a slight increase in the accuracy of the model.

JPEG quality, higher in left, lowest in right

Conclusion

The project lasted 10 weeks and more than half of that time focused on data preparations. This goes close to the general machine learning working time distribution: 80% data preparations, 20% modeling.

The data could still have been tuned finer, but I had now a pretty good level. The idea was not to get everything completed, but a proof-of-concept level implementation for the end customer for further testing and development.

In this time, however, I received a model with more than 90% certainty to recognize smoke from cloudy images.

Other team members had a little bit better results with different image pre-processing and models, but I’m proud of these results.

Read the full case study of the challenge here.

Further Development

At the end of the project, the distribution of the image data to different sets was changed to more stable sets, but it remained untested.

I hope the results from this challenge help to fight against wildfires and that way prevents climate change.

About Omdena

Building AI solutions through global collaboration

Omdena is a global platform where a community of changemakers builds AI solutions to real-world problems through collaboration.

Learn more at www.omdena.com

--

--

Mikko Lahdeaho
Omdena
Writer for

Founder and Principal Consultant at Startecon Oy