Object Detection of Fire and Smoke Using Deep Learning
A deep learning-based real-time fire and smoke detection system using YOLOv11, YOLOv5, and Faster R-CNN models trained on 21,527 labeled images. Achieved best performance with YOLOv11 (mAP@0.5 = 0.606, F1 = 0.61, 50 FPS).

The Problem
Fires pose serious threats to human life and property. Traditional sensor-based fire detection systems often suffer from delayed responses, high costs, and limited detection range. This study aims to develop a fast, accurate, and scalable deep learning-based system capable of detecting fire and smoke in real time using computer vision.

The Solution
A real-time fire and smoke detection system was developed using YOLOv11, YOLOv5, and Faster R-CNN architectures. The system was trained on the Kaggle "Smoke and Fire Detection YOLO Dataset" containing 21,527 labeled images across four classes: fire, smoke, both, and background. YOLOv11 achieved the best trade-off between accuracy and speed, reaching mAP@0.5 = 0.606 and 50 FPS. Visualizations such as confusion matrices, precision-recall curves, and detection samples demonstrated the model's robustness for real-world use.
Dataset Preparation
Used the open-source "Smoke and Fire Detection YOLO Dataset" by Sayed Gamal from Kaggle. Dataset included pre-labeled bounding boxes for 21,527 images across four classes.
Model Training
Trained YOLOv5, YOLOv11, and Faster R-CNN using Google Colab (Tesla T4 GPU) for 100 epochs with input size 640x640. YOLOv11 employed anchor-free detection and DFL loss for better precision.
Evaluation & Comparison
Performance evaluated using mAP@0.5, F1-score, precision, and FPS metrics. YOLOv11 showed the best overall performance with 0.606 mAP@0.5, 0.61 F1-score, and 50 FPS.
Architecture
Comparison of three deep learning object detection models — YOLOv5, YOLOv11, and Faster R-CNN — for fire and smoke detection. YOLOv11 achieved the best balance between speed and accuracy.
- YOLOv5: Anchor-based detection (~7M parameters, 45 FPS)
- YOLOv11: Anchor-free detection (~48M parameters, 50 FPS, CIoU + DFL loss)
- Faster R-CNN: Region-based detection with RPN for high precision but slower inference (7 FPS)
Dataset
Source: Kaggle – Smoke and Fire Detection YOLO Dataset (by Sayed Gamal)
- Fire only: 1,164 images
- Smoke only: 5,867 images
- Fire and smoke: 4,658 images
- None (background): 9,838 images
Total: 21,527 labeled images
Split: Pre-labeled YOLO format
Image Size: 640x640 pixels
Training Details
- epochs: 100
- batchSize: 16
- optimizer: SGD (Adaptive Learning Rate)
- lossFunction: CIoU + Class Loss + DFL
- framework: PyTorch + Ultralytics YOLO
- hardware: Google Colab (Tesla T4 GPU)
Results & Analysis
Metrics:
- YOLOv5: mAP@0.5: 0.578 | F1: 0.59 | Precision: 0.62 | 45 FPS
- YOLOv11: mAP@0.5: 0.606 | F1: 0.61 | Precision: 0.63 | 50 FPS
- Faster R-CNN: mAP@0.5: 0.521 | F1: 0.53 | Precision: 0.59 | 7 FPS
Observations:
- YOLOv11 achieved the highest mAP and F1 score, making it ideal for real-time fire monitoring.
- YOLOv5 remained efficient with high speed (45 FPS) and stable detection performance.
- Faster R-CNN offered higher precision but slower inference, suitable for offline or high-accuracy scenarios.
- Smoke detection achieved higher success rates (64.3%) than fire detection (56.9%).
Future Improvements
- Integrate attention mechanisms (e.g., CBAM) and transformer-based models (DETR) to enhance detection in low-visibility conditions.
- Expand dataset with diverse environments (night/day, wind, varying resolutions).
- Utilize temporal data from video streams to reduce false positives.
- Deploy YOLOv11 models on edge devices for drone and UAV monitoring.
- Optimize inference efficiency for embedded real-time systems.
Technologies Used
Project Gallery



