Skip to content

This repository showcases our work on using computer vision to detect wildfires. Explore the code, model, and results of our research on wildfire prevention.

License

Notifications You must be signed in to change notification settings

Anas436/Wildfire-Detection-App

Repository files navigation

A Comprehensive Guide to Wildfire Prevention with YOLOv8

Welcome to the Wildfire Detection Research project repository! This repository hosts the code and resources related to our research on leveraging computer vision for fire detection. Our aim is to contribute to wildfire prevention efforts by developing and training an object detection model to accurately identify instances of fire and smoke in images.

gif

Highlights:

  • Trained YOLOv8 model using the D-Fire dataset for accurate fire and smoke detection.
  • Explored different model sizes and their performance metrics.
  • Developed a Streamlit app for practical demonstration of the model's capabilities.
  • Investigated future implications of using computer vision in wildfire prevention strategies.

For a comprehensive understanding of our research journey, methodology, and results, please refer to our Medium article: Stay Ahead of the Flames: A Comprehensive Guide to Wildfire Prevention with YOLOv8


Dataset

We utilized the D-Fire dataset, a curated collection of 21,000 labeled images, each annotated in YOLO format. The dataset focuses on fire and smoke instances, while also encompassing diverse visual cues, including non-fire images that resemble fire-like patterns.

D-Fire dataset examples

D-Fire dataset examples

We have explored many different datasets. Here is the summary:

Dataset Image type Camera # images Classes Bounding Boxes
Wildfire Detection Image Data RGB Regular 1,875 images - fire
- no fire
no
Fire Detection Using Surveillance Camera on Roads RGB Surveillance Camera 10,000 images - fire
- no fire
no
FIRESENSE (Videos) RGB Regular, Surveillance Camera 11 fire videos
16 non-fire videos

13 smoke videos
13 non-smoke videos
- fire
- no fire
- smoke
- no smoke
no
Aerial Rescue Object Detection RGB Regular, drone 29,810 images - human
- fire
- vehicle
yes
Fire detection dataset RGB Regular, Surveillance Camera 3,894 images - fire
- no fire
no
Forest Fire RGB, Gray Scale Regular, Drone, Surveillance Camera 15,800 images - fire
- smoke
no
Forest Fire Images RGB Regular 5,000 images - fire
- no fire
no
Fire Detection in YOLO format RGB Regular 500 images - fire yes
FLAME 2: FIRE DETECTION AND MODELING: AERIAL MULTI-SPECTRAL IMAGE DATASET RGB, IR Drone 53,451 RGB
53,451 IR
- fire and smoke
- fire and no smoke
- no fire and smoke
- no fire and no smoke
no
Forest Fire Dataset RGB Regular 1,900 images - fire
- no fire
no
Open Wildfire Smoke Datasets RGB Surveillance Camera 2,192 images - smoke yes
AIDER: Aerial Image Database for Emergency Response applications RGB Aerial view, regular 500 images for each disaster class
4,000 images for the normal class
- Fire/Smoke
- Flood
- Collapsed Building/Rubble
- Traffic Accidents
- Normal case
no
Furg Fire Dataset RGB Regular 21 videos - fire yes
Mivia Fire Detection RGB Regular 14 fire videos
17 non-fire videos
- fire
- no fire
no
FireNet RGB Regular 500 images - fire yes
FIRE Dataset RGB Regular 755 outdoor-fire images 
244 nature images
- fire
- no fire
no
Fire Detection v2 RGB Regular 600 images - scale1fire
- scale2fire
- scale3fire
yes
fireDetection Computer Vision Project RGB Regular 9,681 images - Fire
- fire
yes
D-Fire RGB Regular, Aerial, Surveillance Camera 21,000 images - Fire
- Smoke
yes
Fire-Smoke-Dataset RGB Regular 3,000 images - Fire
- Smoke
- Neutral
no

Model Training

We trained the YOLOv8 model by Ultralytics on the D-Fire dataset to achieve accurate fire and smoke detection. Our research not only focuses on achieving high accuracy but also on optimizing model parameters and hyperparameters to ensure efficiency and speed.

Training recipe can be found in a training-recipes folder


Results

The trained YOLOv8 model demonstrated impressive performance on the D-Fire test dataset, with mAP@50 scores and inference time across different model sizes as follows. Evaluation was done using NVIDIA A100-SXM4-40. Resolution of input images was 640x640.

Model Size mAP@50 Inference (ms)
Nano 0.787 0.422
Small 0.798 0.773
Medium 0.801 1.532
Large 0.812 2.342
Extra Large 0.814 3.465

For a detailed exploration of our training process and insights, we invite you to read our comprehensive guide on Medium: Stay Ahead of the Flames: A Comprehensive Guide to Wildfire Prevention with YOLOv8


Future Implications

This research underscores the potential of computer vision in addressing real-world challenges, such as wildfire detection. As technology evolves, integrating machine learning tools into wildfire prevention and emergency response strategies could significantly enhance our ability to detect and mitigate wildfires effectively.


Streamlit App

For a practical demonstration of our research, you can interact with our Wildfire Detection App, powered by the YOLOv8 model. This app allows you to upload images and observe the model's detection capabilities in action.

To experience the app, visit: Wildfire Detection App

Streamlit App

Wildfire Detection App

Disclaimer

Please note that while our Streamlit app demonstrates the capabilities of our model, it is intended for demonstration purposes and may not be suitable for critical wildfire detection applications.


Acknowledgment

I would like to acknowledge the Institute of Smart Systems and Artificial Intelligence (ISSAI) at Nazarbayev University for fostering an environment of innovation and research excellence. The support I received from ISSAI has been integral to the successful completion of this endeavor.

I extend my heartfelt appreciation to my supervisor, Askat Kuzdeuov, at ISSAI, whose guidance and mentorship were indispensable to the success of this research. His expertise and support have been invaluable in shaping the direction and quality of this work.

I would also like to extend my thanks to the creators of the D-Fire dataset for providing a valuable resource that underpins the foundation of this research. Additionally, the Ultralytics team's contribution to the YOLOv8 model has been instrumental in enabling accurate and efficient fire detection.


License

This project is licensed under the MIT License.

About

This repository showcases our work on using computer vision to detect wildfires. Explore the code, model, and results of our research on wildfire prevention.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages