Detecting Fire, Smoke using Computer Vision, Open CV and PyTorch
Early fire/smoke detection plays a very important role in protecting many lives also property loss can be reduced and downtime for the operation minimized through early detection. Therefore in this project I have developed an Computer Vision & Deep Learning pipeline for fire and smoke detection.
Download the Dataset - download
Train
- Fire
- Neutral
- Smoke
Test
- Fire
- Neutral
- Smoke
Dataset contains 1000 images of each class
For traing the model I have used transfer learning technique. Architecture used here is ResNet50 which is pretrained on ImageNet dataset. I have achieved validation accuracy of 93% using ResNet. For more info about training and graphs - open Training.ipynb
- Clone/Download the repo
- Download the dataset
- For training - open Training.ipnb
- For inference - open Inference.ipynb
Python3
PyTorch
OpenCV
Matplotlib
Numpy
RestAPI (rest api using flask)
- PyImageSearch - https://www.pyimagesearch.com/2019/11/18/fire-and-smoke-detection-with-keras-and-deep-learning/
- DeepQuestAI/Fire-Smoke-Dataset - https://github.com/DeepQuestAI/Fire-Smoke-Dataset