Skip to content

adolkhan/fire-smoke-detection

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fire-smoke-detection

Fire smoke detection model

This repository consists of algorithm that annotates the images and outputs the bounding boxes of the fire and smoke in the picture, then adds it to database. The initial code was taken from fire-detect-yolov4: https://github.com/gengyanlei/fire-detect-yolov4.

What it does:

  • takes url or path to the image;
  • takes probability threshold as parameter (which means to return only objects which has probability > threshold);
  • using the above noted model detects fire or smoke (if any) on that image;
  • returns results that have: id of the image, probability of detection (probability), detection name (fire or smoke), and the corresponding bounding boxes of the area in which there is smoke or fire (bbox). Vertices are like x1, y1, x2, y2. E.g.:

{“image_id”: 1, “fire”: 0.61, “bbox”: [945, 592, 123, 107]} {“image_id”: 2, “smoke”: 0.07, “bbox”: [898, 613, 125, 103]}

  • writes results into MySQL database

installation environment

    python: 3.6+
    ubuntu16.04 or 18.04
    darknet (cuda10.0 docker)
    pytorch 1.6+ (cuda10.2 docker)

how to use test's code in yolov5

  • yolov5's test:
    1. cd yolov5
    2. sudo mysql;
    3. source my.sql; 
    4. exit;
    5. pip install -r requirements.txt
    5. python detect.py --source ***/aaa.jpg --weights ./best.pt
    
  • if error appears:
    1. sudo apt update
    2. sudo apt install libgl1-mesa-glx
    

Cite

Reputation:

  • This data is for academic exploration only!!!

About

Fire smoke detection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published