Built to order

Vision-Based Fire Detection using CNN

A vision-based fire detector that watches indoor camera feeds for flames. A transfer-learned CNN fine-tuned on public flame imagery including BoWFire scores each sampled frame; detections persisting across a time window raise a timestamped alert with an annotated snapshot, while single-frame positives are discarded. Grad-CAM shows which regions drove each alert. The notebook computes precision, recall and F1 on the validation split plus a false-alarm analysis over bright lights and sunsets. Educational prototype — not a certified fire-alarm system, never a substitute for real detectors.

Vision-Based Fire Detection using CNN - project prototype demo screenshot

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

  1. Frames are sampled from the indoor camera feed at a fixed interval, resized and normalized with OpenCV.
  2. A pretrained CNN backbone fine-tuned on public flame imagery (including BoWFire) classifies each frame and outputs a flame probability.
  3. 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.
  4. Frames staying above the threshold across a time window become a confirmed alert; isolated single-frame positives are discarded.
  5. Confirmed alerts are written to a timestamped log with the annotated snapshot and can trigger an email or buzzer hook.
  6. 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.

Download abstract (PDF)

Related guides

All guides
Blueprint-style technical illustration of multiple decision trees voting together into one final predictionStudents with basic Python and pandas skills who want a reliable first classifier for ML coursework and tabular data projects.

Random Forests Explained: Why Decision Trees Vote Better Together

Decision trees are readable but overfit; random forests fix this by training hundreds of varied trees on bootstrapped data with random feature subsets, then letting them vote. This guide explains Gini impurity, bagging, out-of-bag validation and the four hyperparameters that matter, with a complete scikit-learn workflow, honest feature-importance practices, and the mistakes students keep making.

Read guide
Illustration of object tracking showing video frames with bounding boxes and persistent ID labels following people and vehicles, comparing motion prediction and appearance matching.B.E./B.Tech Computer Science and Electronics students building video analytics projects — people counting, vehicle tracking, sports analysis — who have detection working and need

Object Tracking: DeepSORT and ByteTrack Explained

Detection finds objects per frame; tracking keeps their identities across frames. This guide explains tracking-by-detection, Kalman motion models, DeepSORT's appearance embeddings vs ByteTrack's low-confidence box recovery, tracking metrics (HOTA, IDF1, ID switches), and the tuning parameters that determine real-world quality.

Read guide
Illustration of image segmentation showing U-Net's U-shaped encoder-decoder with skip connections producing pixel masks, alongside Mask R-CNN detecting instances with masks.B.E./B.Tech Computer Science and AI/ML students moving from image classification or detection to pixel-level understanding — medical imaging, defect detection, autonomous driving

Image Segmentation: U-Net and Mask R-CNN

When projects need pixel-level answers, segmentation delivers. This guide explains semantic vs instance vs panoptic segmentation, U-Net's encoder-decoder with skip connections, Mask R-CNN's parallel mask head, Dice and IoU evaluation, paired augmentation, and how to choose the right architecture for your data and question.

Read guide
Get a quotation