Intelligent Fire and Smoke Detection using YOLOv8, Computer Vision, and Real-Time Monitoring
FireSense AI is a comprehensive computer vision-based fire and smoke detection system developed using the YOLOv8 object detection framework.
The project is designed to provide:
- Real-Time Fire Detection
- Real-Time Smoke Detection
- Image Analysis
- Video Surveillance
- Live Webcam Monitoring
- Detection Analytics
- Historical Reporting
- Interactive Dashboard Visualization
FireSense AI combines Deep Learning, Computer Vision, and Web Development into a single integrated platform capable of monitoring visual data sources and automatically identifying fire and smoke hazards.
Fire accidents cause significant damage to:
- Human Life
- Property
- Forest Resources
- Industrial Infrastructure
Traditional fire detection systems primarily rely on:
- Smoke Sensors
- Heat Sensors
- Alarm Systems
Although effective in controlled environments, these systems may experience:
- Delayed Detection
- Limited Coverage
- Sensor Malfunctions
- High Installation Costs
Recent advancements in Artificial Intelligence and Computer Vision allow cameras to act as intelligent monitoring systems capable of identifying fire and smoke directly from visual data.
FireSense AI leverages these advancements to provide an automated vision-based monitoring solution.
Upload an image and instantly detect fire and smoke.
- YOLOv8 Object Detection
- Bounding Box Generation
- Confidence Score Visualization
- Fire Detection Count
- Smoke Detection Count
- Detection Summary
- Download Processed Image
Upload videos and perform frame-by-frame fire and smoke detection.
- Frame-Level Analysis
- Real-Time Progress Tracking
- Detection Statistics
- Processed Video Generation
- Download Processed Video
- Video Analytics
Perform real-time monitoring using a webcam stream.
- Real-Time Object Detection
- Fire Monitoring
- Smoke Monitoring
- Screenshot Capture
- Instant Screenshot Analysis
- Detection History Logging
A centralized dashboard for monitoring system performance and detection activity.
- Images Processed
- Videos Processed
- Screenshots Captured
- Total Fire Detections
- Total Smoke Detections
- Detection History Tables
- Fire vs Smoke Visualization
- Source Distribution Charts
Dataset Collection
↓
Image Annotation
↓
Dataset Validation
↓
YOLOv8 Training
↓
Model Evaluation
↓
Inference Pipeline
↓
Web Deployment
User Input
│
▼
Flask Web Application
│
▼
YOLOv8 Detection Engine
│
▼
Detection Processing
│
▼
Result Storage
│
▼
Analytics Dashboard
- Python 3.x
- YOLOv8
- Ultralytics
- OpenCV
- Flask
- HTML5
- CSS3
- JavaScript
- Pandas
- NumPy
- Chart.js
- Git
- GitHub
FireSense-AI
│
├── app.py
├── requirements.txt
├── README.md
├── .gitignore
│
├── dataset
│ └── data.yaml
│
├── src
│ ├── train.py
│ ├── predict.py
│ ├── video_predict.py
│ └── webcam.py
│
├── templates
│ ├── home.html
│ ├── image_detection.html
│ ├── video_detection.html
│ ├── webcam_detection.html
│ └── analysis.html
│
├── static
│ ├── css
│ │ └── style.css
│ │
│ ├── uploads
│ ├── results
│ └── screenshots
│
├── reports
│
└── runs
└── detect
└── firesense_pro
└── weights
└── best.pt
git clone https://github.com/7vik2005/FireSense-AI.gitcd FireSense-AIpython -m venv venvvenv\Scripts\activatesource venv/bin/activatepip install -r requirements.txtpython app.pyOpen your browser and navigate to:
http://127.0.0.1:5000
The FireSense AI model was trained on a custom fire and smoke detection dataset containing annotated images of fire and smoke instances under diverse environmental conditions.
The dataset includes:
- Fire Images
- Smoke Images
- Mixed Fire and Smoke Images
- Indoor Fire Scenarios
- Outdoor Fire Scenarios
- Industrial Fire Incidents
- Forest Fire Examples
The dataset was annotated using the YOLO object detection format.
| Class ID | Class Name |
|---|---|
| 1 | Fire |
| 0 | Smoke |
The project uses the YOLOv8 object detection architecture provided by Ultralytics.
Model: YOLOv8n
Image Size: 416 x 416
Epochs: 30
Batch Size: 4
Optimizer: SGD / AdamW
Framework: Ultralytics YOLOv8yolo detect train \
model=yolov8n.pt \
data=dataset/data.yaml \
epochs=30 \
imgsz=416The trained model was evaluated on a dedicated test dataset containing unseen images.
The following metrics were used:
- Precision
- Recall
- F1 Score
- mAP@0.5
- mAP@0.5:0.95
Measures how many predicted detections are correct.
Precision = TP / (TP + FP)
Measures how many actual objects are detected.
Recall = TP / (TP + FN)
Harmonic mean of Precision and Recall.
F1 = 2 × Precision × Recall
----------------------
Precision + Recall
Mean Average Precision evaluates overall object detection performance across classes.
The home page serves as the central navigation hub and provides access to all system functionalities.
- Image Detection
- Video Detection
- Webcam Detection
- Analytics Dashboard
This module allows users to upload images for fire and smoke detection.
Upload Image
↓
YOLOv8 Inference
↓
Detection Visualization
↓
Statistics Generation
↓
Download Result
This module performs frame-by-frame analysis on uploaded videos.
Upload Video
↓
Frame Extraction
↓
YOLOv8 Detection
↓
Frame Annotation
↓
Video Reconstruction
↓
Processed Video Output
- Progress Tracking
- Frame Statistics
- Detection Summary
- Downloadable Results
Provides real-time monitoring using webcam streams.
- Live Object Detection
- Fire Monitoring
- Smoke Monitoring
- Screenshot Capture
- Instant Analysis
- Historical Logging
The Analytics Dashboard provides a complete overview of detection activities.
- Images Processed
- Videos Processed
- Screenshots Captured
- Fire Detections
- Smoke Detections
Provides a comparison between total fire and smoke detections.
Shows detection activity across:
- Images
- Videos
- Screenshots
- Image Detection History
- Video Detection History
- Screenshot Detection History
FireSense AI automatically maintains records of system activity.
image_history.csv
video_history.csv
webcam_history.csv
These reports enable future auditing and monitoring of system performance.
The following improvements can further enhance FireSense AI:
Deploy the application using:
- AWS
- Azure
- Google Cloud Platform
Automatic notifications when fire is detected.
Emergency alerts to registered users.
Support for multiple surveillance cameras simultaneously.
Android and iOS monitoring applications.
Deploy FireSense AI on:
- Raspberry Pi
- NVIDIA Jetson
- Edge TPU Devices
Direct integration with existing surveillance systems.
This project is licensed under the MIT License.
See the LICENSE file for complete details.
Special thanks to:
- Ultralytics YOLOv8 Team
- OpenCV Community
- Flask Community
- Open Source Contributors
for providing powerful tools and frameworks that made this project possible.
Artificial Intelligence • Machine Learning • Computer Vision • Full Stack Development
⭐ If you found this project useful, consider giving it a star on GitHub.








