Fire and Smoke Detection System - Version 1

Model description

  • Model name: YOLO26L Fire and Smoke Detection
  • Version: v1
  • Status: experimental
  • Repository visibility: internal
  • Upstream base model: YOLO26L (Ultralytics), pretrained on COCO
  • Inventory owner: Nishant
  • Architecture: YOLO26L object detector fine-tuned for binary fire/smoke detection
  • Reference date: 2026-07-29

This repository contains the Version 1 fire and smoke detection system designed for real-time CCTV safety monitoring. The model detects fire and smoke in video frames with high precision, enabling early warning systems for industrial facilities, public spaces, and residential buildings.

The model achieves 84% accuracy for fire detection and 68% accuracy for smoke detection on benchmark evaluation datasets

Problem statement

Early detection of fire and smoke is critical for preventing property damage, injuries, and loss of life. Traditional smoke detectors have limitations:

  1. Limited coverage: Point sensors only detect hazards in immediate vicinity
  2. Delayed response: Smoke must reach the detector before triggering an alarm
  3. No visual context: Cannot distinguish between fire sizes, locations, or spreading patterns

How to use

The primary inference script processes CCTV frames and detects fire/smoke events:

python scripts/run.py \
  --video /path/to/cctv_feed.mp4 \
  --model models/best.pt \
  --conf 0.25 \
  --imgsz 960 \
  --output output_detections/

The system will:

  1. Process each frame through YOLO26L detector
  2. Detect bounding boxes for fire (class 0) and smoke (class 1) regions
  3. Filter detections by confidence threshold (default 0.25)
  4. Output annotated frames with bounding boxes and class labels

Input contract

  • Input: Decoded color frame, typically BGR uint8 OpenCV arrays or video path
  • Model input size: Frames are automatically resized to 960 Γ— 960 with aspect ratio preservation
  • Detection confidence threshold: 0.25 (default) β€” minimum confidence for fire/smoke detection
  • IoU threshold: 0.7 for Non-Maximum Suppression (NMS)
  • Color format: BGR (OpenCV standard)

Feature engineering pipeline

The system uses end-to-end YOLO26L object detection with no manual feature engineering:

Model architecture:

  • Backbone: YOLO26L with C3k2 blocks and C2PSA attention modules
  • Parameters: 26,179,428 trainable parameters
  • Layers: 392 layers total
  • GFLOPs: 93.1 (computational complexity)
  • Detection classes: 2 (fire, smoke)
  • Detection heads: Multi-scale detection at 3 levels (P3, P4, P5)

Training augmentations:

  • Random horizontal flip (probability 0.5)
  • Mosaic augmentation (probability 1.0)

Detection output:

  • Bounding box coordinates (x1, y1, x2, y2) in original image space
  • Class label (0: fire, 1: smoke)
  • Confidence score (0.0 to 1.0)

Configuration and thresholds

Production configuration thresholds:

CONF_THRESHOLD = 0.25      # Minimum detection confidence
IOU_THRESHOLD = 0.7        # NMS IoU threshold
IMAGE_SIZE = 960           # Input image size (square)
MAX_DETECTIONS = 300       # Maximum detections per image

Tunable confidence threshold:

  • CONF_THRESHOLD (0.0–1.0): Controls detection sensitivity
    • Higher precision (fewer false alarms): 0.40–0.60
    • Higher recall (catch more fires): 0.15–0.25
    • Recommended production: 0.25 (balanced)

Adjust CONF_THRESHOLD based on deployment priorities:

  • Critical safety applications (industrial facilities): Use 0.15–0.20 to maximize recall and catch early-stage fires
  • High traffic areas (reduce false alarms): Use 0.35–0.50 to minimize false positives from reflections, lights, or similar objects

Output contract

For each detected fire or smoke region, the system outputs:

{
  "detection_id": 1,
  "box_xyxy": [x1, y1, x2, y2],
  "class": "fire",
  "class_id": 0,
}

Visualized output frames are saved with:

  • Color-coded bounding boxes (Red: Fire, Gray: Smoke)
  • Class label and confidence score overlay
  • Multi-detection support (multiple fires/smoke regions per frame)

Pipeline architecture

     [  Frame ]
         β”‚
         β–Ό
  YOLO26L Detector
  (960Γ—960 input)
         β”‚
         β”œβ”€β”€β–Ί Backbone: C3k2 + C2PSA blocks
         β”œβ”€β”€β–Ί Neck: FPN with multi-scale fusion
         └──► Head: Multi-scale detection (P3, P4, P5)
         β”‚
         β–Ό
  Detection Output
         β”‚
         β”œβ”€β”€β–Ί Fire bounding boxes (class 0)
         β”œβ”€β”€β–Ί Smoke bounding boxes (class 1)
         └──► Confidence scores
         β”‚
         β–Ό
  Post-processing
         β”‚
         β”œβ”€β”€β–Ί Non-Maximum Suppression (IoU=0.7)
         β”œβ”€β”€β–Ί Confidence filtering (>0.25)
         
         β”‚
         β–Ό
[ Annotated Frame  ]

Runtime requirements

  • Python: 3.12+
  • Key dependencies:
    • Ultralytics β‰₯ 8.4.104 (YOLO training and inference)
    • PyTorch β‰₯ 2.13.0 with CUDA 13.0
    • OpenCV β‰₯ 4.11.0
    • NumPy β‰₯ 1.26.4

Install dependencies:

pip install -r requirements.txt

For GPU acceleration (recommended for real-time processing):

  • CUDA-compatible GPU (tested on NVIDIA L4 with 24GB VRAM)
  • CUDA Toolkit β‰₯ 13.0
  • PyTorch with CUDA support
  • Mixed precision training enabled (AMP)

Intended use

This model is intended for CCTV-based fire and smoke detection in:

  • Industrial facilities and manufacturing plants
  • Concert fire detection
  • Fire on Roads
  • Public buildings (schools, hospitals, shopping malls)
  • Residential complexes and apartments
  • Forest fire monitoring systems

Limitations

  • Performance degrades On very small fires (<20 pixels), heavy smoke obscuring the camera, extreme lighting conditions (direct sunlight glare, complete darkness), or reflective surfaces that mimic fire appearance
  • Not designed for : Complex backgrounds, underwater or aerial footage, or thermal/infrared cameras (trained on visible spectrum only)
  • No temporal tracking: Single-frame detection without fire spread analysis or smoke density tracking over time
  • Smoke detection challenges: Smoke accuracy plummits in dark and hazy environments. (Especially dark black smoke in night) (68% accuracy vs. 88% for fire)
  • False positive scenarios: Reflections from glass, bright lights, orange/red objects, steam, fog, or dust clouds may be misclassified

Performance

Training performance (final checkpoint)

Training dataset: 65,195 images (86.3% split, 5 combined datasets)
Validation dataset: 10,382 images (13.7% split)
Total dataset: 75,577 images
Best checkpoint: models/best.pt (epoch with best validation mAP)
Training date: 2026-07-23 to 2026-07-29

Training completed successfully with early stopping. Model converged after ~70 epochs on large-scale multi-dataset training.

Real-world benchmark evaluation

Benchmark dataset: 100 images (90 positive fire/smoke samples, 10 hard negatives)
Evaluation script: Custom presence accuracy metric (image-level hazard detection)
Confidence threshold: 0.25
Evaluation date: 2026-07-29

============================================================
            BENCHMARK DATASET BREAKDOWN            
============================================================
 Total Images Evaluated      : 100
 Positive Images (Fire/Smoke): 90
 Hard Negatives (Background) : 10
============================================================

Multi-threshold performance analysis:

The model was evaluated across 5 confidence thresholds to characterize the precision-recall tradeoff:

Threshold Fire Acc Fire Prec Fire Rec Fire F1 Smoke Acc Smoke Prec Smoke Rec Smoke F1 Overall Acc Overall Prec Overall Rec Overall F1
0.25 (prod) 0.96 1.0 0.9494 0.9740 0.83 0.9844 0.7975 0.8811 0.96 0.9886 0.9667 0.9775
0.50 0.88 1.0 0.8481 0.9178 0.68 1.0 0.5949 0.7460 0.88 1.0 0.8667 0.9286
0.65 0.75 1.0 0.6835 0.8120 0.54 1.0 0.4177 0.5893 0.76 1.0 0.7333 0.8462
0.75 0.60 1.0 0.4937 0.6610 0.44 1.0 0.2911 0.4510 0.56 1.0 0.5111 0.6765
0.95 0.21 0.0 0.0 0.0 0.21 0.0 0.0 0.0 0.10 0.0 0.0 0.0

Key performance insights:

  • Production threshold (0.25): 96% overall accuracy with 98.86% precision and 96.67% recall β€” optimal balance for real-world deployment
  • Fire detection at 0.25: 96% accuracy, 94.94% recall, perfect 1.0 precision β€” catches 95% of fires with zero false alarms
  • Smoke detection at 0.25: 83% accuracy, 79.75% recall, 98.44% precision β€” significantly improved from previous 68% accuracy
  • Near-perfect precision across thresholds: 98-100% precision at 0.25-0.75 thresholds β†’ minimal false positives
  • Recall degrades gracefully: Higher thresholds reduce recall while maintaining perfect precision (0.50: 86.67% recall, 0.65: 73.33% recall)
  • High-recall mode (0.25): Recommended for production β€” catches 96.67% of hazards while maintaining 98.86% precision
  • High-precision mode (0.50-0.65): Use in high-traffic areas to minimize false alarms, accepting lower recall (73-86%)
  • Threshold 0.95 is too aggressive: Zero detection capability β€” not recommended for any use case

Missed detections (false negatives):

  • Very early-stage fires with minimal visible flames
  • Light gray/white smoke against bright backgrounds
  • Dense smoke completely obscuring the fire source
  • Very small or distant fire/smoke regions (<30 pixels)

Dataset location

Training and evaluation datasets are stored at:

/home/ctspl/Nishant/fire_overnight/dataset/fire_master/

Dataset structure:

fire_master/
β”œβ”€β”€ train/
β”‚   β”œβ”€β”€ images/          # 65,195 training images (86.3%)
β”‚   └── labels/          # YOLO format annotations
β”œβ”€β”€ valid/
β”‚   β”œβ”€β”€ images/          # 10,382 validation images (13.7%)
β”‚   └── labels/          # YOLO format annotations
└── data.yaml            # Dataset configuration (75,577 total images)

Dataset is not included in this repository due to size constraints.

Out of scope

The following features are explicitly out of scope for this version:

  • Temporal fire spread tracking: Analyzing fire growth rate and spread direction over time
  • Smoke density estimation: Quantifying smoke concentration or visibility reduction
  • Flame temperature estimation: Thermal analysis or fire intensity classification
  • 3D fire localization: Estimating real-world fire position and size from 2D detections

Ownership

  • Model trainer/developer: Nishant Prasad
  • Independent Validation: -
  • Dataset source: Combined public fire/smoke detection datasets
  • Base model: Ultralytics YOLO26L
  • Training date: 2026-07-23 to 2026-07-29
  • Status: experimental

Repository layout

fire-smoke-detection/
β”œβ”€β”€ README.md
β”œβ”€β”€ MODEL_CARD.md
β”œβ”€β”€ CHANGELOG.md
β”œβ”€β”€ config.json
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ tp.txt
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ train.py                          # Training script
β”‚   β”œβ”€β”€ run.py                            # Inference script
β”‚   └── evaluate.ipynb                    # Evaluation notebook
β”œβ”€β”€ models/
β”‚   └── best.pt                           # Best validation checkpoint
└── docs/
    β”œβ”€β”€ spec.md                           # Development specification
    β”œβ”€β”€ train.log.md                      # Complete training log
    └── data.md                           # Dataset documentation
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support