The problem
Indoor fires are found late because nobody is watching the right camera at the right moment: warehouses, server rooms and small factories have cameras, but the footage is only reviewed after the damage is done. Thermal and smoke sensors cover this properly, yet a student project cannot install certified hardware — so the honest version of the problem is building a software layer that watches camera frames for flames and raises an alert candidate for a human to verify. This project builds that layer as a CNN image classifier: a pretrained backbone fine-tuned on public flame imagery including BoWFire scores each sampled frame, a time-window rule suppresses one-off false positives, and Grad-CAM overlays make every alert visually checkable. The design target is useful alert quality with an explicit false-alarm analysis — because the failure modes of this system (sunsets through windows, bright lamps, reflective surfaces) are exactly what the report must document.
How it works
- Frames are sampled from the indoor camera feed at a fixed interval, resized and normalized with OpenCV.
- A pretrained CNN backbone fine-tuned on public flame imagery (including BoWFire) classifies each frame and outputs a flame probability.
- Grad-CAM overlays visualize the attended regions so a reviewer can see whether the model saw a real flame or was fooled by a bright surface.
- Frames staying above the threshold across a time window become a confirmed alert; isolated single-frame positives are discarded.
- Confirmed alerts are written to a timestamped log with the annotated snapshot and can trigger an email or buzzer hook.
- The evaluation notebook computes precision, recall and F1 on the validation split and runs the false-alarm analysis over bright lights and sunsets.
Tech stack:
- Python 3.10, PyTorch (CNN training and inference)
- torchvision (pretrained backbone, transfer learning)
- BoWFire public flame image dataset (Chino et al.)
- OpenCV (frame capture, preprocessing, Grad-CAM overlays)
- Jupyter notebook (evaluation with precision, recall, F1)
- NumPy, scikit-learn (metrics and false-alarm analysis)
- Flask demo app with camera-feed upload interface
| Parameter | Value |
|---|---|
| Model | Transfer-learned CNN flame classifier (pretrained backbone, fine-tuned) |
| Dataset | BoWFire public flame imagery plus buyer-added hard negatives |
| Alert logic | High-confidence frames sustained across a time window; single-frame positives discarded |
| Explainability | Grad-CAM overlays on every positive prediction |
| Evaluation | Precision, recall, F1 and false-alarm analysis — computed by the notebook during your build |
| Input | Indoor camera frames or video files |
| Output | Timestamped alert log, annotated frame snapshots, optional email or buzzer hook |
| Status | Educational prototype — not a certified fire-alarm system |
Project features
- Transfer-learned CNN flame classifier fine-tuned on public flame imagery including BoWFire
- Per-frame flame probability scoring on indoor camera feeds
- Time-window alert rule: alerts only on sustained high-confidence detections
- Grad-CAM overlays showing the regions that drove each alert
- Timestamped alert log with annotated frame snapshots
- Optional email or buzzer notification hook on confirmed alerts
- Evaluation notebook computing precision, recall and F1 on the validation split
- Dedicated false-alarm analysis over bright lights, sunsets and reflections
What is included
- Complete source code (dataset loading, fine-tuning, frame scoring, alert logic, demo app)
- Jupyter training and evaluation notebook (buyer-run: train, evaluate, false-alarm analysis)
- Project report PDF (background, BoWFire, methodology, evaluation, false-alarm analysis, honest limits)
- PPT presentation for final review
- Viva Q&A preparation document (transfer learning, Grad-CAM, precision/recall tradeoffs, alert design)
- Setup guide (environment, dataset download, training, running on your own camera feed)
Limitations & prerequisites
- This is an educational prototype, NOT a certified fire-alarm system: it must never substitute real smoke, heat or flame detectors, which are engineered, tested and certified for life-safety use.
- Bright lights, sunsets through windows, welding glare and reflective surfaces are known false-alarm triggers — the notebook's false-alarm analysis documents exactly these failure modes.
- The camera only covers its field of view, and smoke without visible flame can be missed; the system is an alert candidate generator for human review, not for real deployment as safety infrastructure.
Frequently Asked Questions
How does it avoid alerting on every bright light?
Two layers: the CNN is fine-tuned with hard negatives (lamps, sunsets, reflections) in training, and the time-window alert rule only confirms detections that persist across frames. Isolated positives are discarded without alerting.
What is BoWFire?
A public flame-image dataset from Chino et al. (2015) designed for fire detection in still images, combining color and texture analysis baselines — the training data this project's classifier is fine-tuned on.
How is the model evaluated?
The included notebook computes precision, recall and F1 on the validation split, plus a dedicated false-alarm analysis over bright lights, sunsets and reflections — the report documents the procedure and your own build's numbers.
Can this replace a smoke detector?
Absolutely not. This is an educational prototype that demonstrates vision-based alerting; real fire protection requires certified smoke, heat and flame detectors installed and maintained to fire-safety standards.
What does Grad-CAM add?
Every positive prediction ships with an overlay showing the attended image regions, so a human reviewer can judge in one glance whether the model saw a flame or was fooled by a bright surface — and the overlays are viva-ready explainability material.
Where can it actually be used?
As a student-built monitoring aid on indoor camera feeds, for demonstrations, and as a research prototype. It must not be deployed as real safety infrastructure anywhere people depend on it. Suitable for B.E./B.Tech final-year projects in Computer Science, AI/ML and Data Science.
Components & software requirements
- Python 3.10, PyTorch (CNN training and inference)
- torchvision (pretrained backbone, transfer learning)
- BoWFire public flame image dataset (Chino et al.)
- OpenCV (frame capture, preprocessing, Grad-CAM overlays)
- Jupyter notebook (evaluation with precision, recall, F1)
- NumPy, scikit-learn (metrics and false-alarm analysis)
- Flask demo app with camera-feed upload interface
Delivery information
Built-to-order project. Delivery timeline is shared after order confirmation based on current queue.
Support terms
Complete documentation, setup guide, and viva preparation included. Support for setup and explanation provided.