Awesome
Smoke-Detection-using-Tensorflow 2.2
Author: Abhishek Ghosh, Moumita Mukherjee, Kaniska Mandal
Team
Team Name- Project Skylab
Team Members- Kaniska Mandal(Mentor), Abhishek Ghosh, Moumita Mukherjee
Wildfire Smoke Detector
In this repostiory, we implement The TensorFlow 2 Object Detection Library for training on our own dataset.
Our goal is to develop a wildfire smoke detector which will help California respond to wildfire concerns as quickly as possible. This is the submission project for Lets Stop Wildfires Hackathon 2.0
Dataset
We will use 733 annotated smoke images. The training, validation and testing dataset is divided in the ratio 7:2:1 i.e. 513 images for training, 147 for validation and 73 images for testing. We would like to acknowledge AIforMankind for providing this dataset.
We have used Roboflow which is used to label the data, apply image preprocessing, data augmentation, generate TF Records and many other useful techniques in machine learning. We would also like to thank Roboflow for the excellent tutorials.
Implementation
We will take the following steps to implement Tensorflow 2 object detection model on our smoke dataset-
- Install TensorFlow2 Object Detection Dependencies
- Download Smoke Images Dataset and necessary files
- Write your own TensorFlow2 Object Detection Training Configuration
- Train Custom TensorFlow2 Object Detection Model
- Export Custom TensorFlow2 Object Detection Weights
- Use Trained TensorFlow2 Object Detector For Inference on Test Images
- Save your model for future applications
For best understanding and convenience, we recommend starting with the notebook in this repository using Google Colab. You will find step by step execution. Please follow along and avoid skipping any step.
Files
End Product
If you would like to head straight and make inference using our trained model, we have the saved_model.pb file under fine_tuned_model for quick access. We also have the pipeline config file under this folder which was used to train our model. We have used cyclical learning rate optimization to yield better results.
Our Model
Our model is trained EfficientDet-D0, which is a state of the art object detection model. You will find EfficientDet useful for real time object detection. EfficientDet has an EfficientNet backbone and a custom detection and classification network. EffcientDet is designed to efficiently scale from the smallest model size. The smallest EfficientDet, EfficientDet-D0 has 4 million weight parameters - which is truly tiny. EfficientDets are developed based on the advanced backbone, a new BiFPN, and a new scaling technique:
- Backbone: we employ EfficientNets as our backbone networks.
- BiFPN: we propose BiFPN, a bi-directional feature network enhanced with fast normalization, which enables easy and fast feature fusion.
- Scaling: we use a single compound scaling factor to govern the depth, width, and resolution for all backbone, feature & prediction networks.
Read this paper to know the architecture in detail
Inferences and Results
Wildfire Smoke Detector
True Positives
False Positives
Acknowledgement
We would like to thank HPWREN, AIForMankind, Google Tensorflow and Google Brain for the continuous support in this research project.
References
- https://github.com/google/automl/tree/master/efficientdet
- https://github.com/tensorflow/models/tree/master/research/object_detection
Next Steps
- Try out different model architectures and scale your model
- Try to reduce the loss further and improve upon accuracy
- Test your model on varying set of smoke images
- Build an app using TFLite and deploy the application