What this is
An educational prototype. It looks at one still picture and shows Fire, Smoke, Neither or Uncertain. It uses a MobileNetV2 model (transfer learning) that runs in your browser with TensorFlow.js. No picture is sent to a server.
How it works
You take a photo or upload a JPG or PNG. The site checks the picture, resizes it and prepares the numbers the same way as in training. The model gives three scores. If the highest score is below the threshold, the result is Uncertain.
Main features
Image upload, camera capture, AI image analysis, score bars, detection history on this device, and a mobile-friendly layout.
Technology stack
HTML, CSS and plain JavaScript with no framework. TensorFlow.js runs a MobileNetV2 transfer-learning model in the browser. Past results are kept in the browser’s localStorage. The model is trained separately in Google Colab.
Limits
Predictions can be wrong. A result of “Neither” only means that the model did not classify the picture as fire or smoke. It does not mean a place is safe. Only still pictures are analyzed. This is not a real fire alarm, and it does not replace real fire-safety equipment.
Dataset credit
The model was trained using images from two public datasets. We thank their authors.
Fire and smoke images: D-Fire. Created by the researchers of GAIA (Solutions on Demand). Source: github.com/gaiasd/DFireDataset. Licence: CC0 1.0 Universal. Please cite: P. V. A. B. de Venancio, A. C. Lisboa and A. V. Barbosa, “An automatic fire detection system based on deep convolutional neural networks for low-power, resource-constrained devices,” Neural Computing and Applications, 2022.
People images: Microsoft COCO (Common Objects in Context). Source: cocodataset.org. The COCO annotations are licensed under CC BY 4.0 by the COCO Consortium. The images come from Flickr and remain under their original owners’ terms of use. Please cite: T.-Y. Lin et al., “Microsoft COCO: Common Objects in Context,” European Conference on Computer Vision (ECCV), 2014.
We did not change the datasets’ licences. D-Fire and COCO are not affiliated with this project and do not endorse it.