Smoke Detection AI

Published:

Together with Arkat Khassanov, I built a computer vision system for detecting smoke from live camera feeds. The project won a regional project competition and became an early experiment in combining computer vision with physical safety alerts.

Smoke detection example shown on a phone
A test image detected as smoke with a confidence score of 0.81.

How it works

The system uses a custom YOLOv5 model to process video frames and draw bounding boxes around detected smoke. It supports USB webcams and ESP32 CAM modules. When smoke remains visible for a configurable number of consecutive frames, the system can send an annotated image through Telegram.

Features

  • live smoke detection with YOLOv5;
  • support for USB webcams and ESP32 CAM;
  • Telegram alerts with annotated images;
  • automatic CPU or GPU selection;
  • configuration through environment variables;
  • Docker deployment support.

Technology

Python, PyTorch, YOLOv5, OpenCV, Telegram Bot API, ESP32 CAM, and Docker.

View the source code and setup instructions on GitHub