Skip to content

Yusuf-ozen/Yolov8_Fire_Detection

Repository files navigation

Yolov8 Fire Detection

Python 3.11.6 Git 2.39.1

Fire detection with YOLOv8 is an amazing project aimed at utilizing the powerful YOLOv8 object detection algorithm to detect fires in images or videos. Our repository provides a implementation of fire detection using YOLOv8, including training scripts, pre-trained models, and inference tools.

Fire Detection With Yolov8

Installation

Download the face detection repository:

# Clone repo
git clone https://github.com/Yusuf-ozen/Yolov8_Fire_Detection.git

Navigate to the project directory:

cd Yolov8_Fire_Detection

Install all necessary library:

pip install -r requirements.txt

Testing On Real-Time Webcam

Run this code at git bash or cmd:

python yolov8s_live_test.py

Testing on an Image

Run this code at git bash or cmd and change /path/image according your files. Using --resize_width 400 and --resize_height 400 the size of output image can change:

python yolov8s_image_test.py /path/image.jpg --resize_width 400 --resize_height 300

Resim Açıklaması

Testing on a Video

Run this code at git bash or cmd and change /path/image according your files. Using --resize_width 400 and --resize_height 400 the size of output of the video can change:

python yolov8s_video_test.py /path/video.mp4 --resize_width 1280 --resize_height 720

Results

-This results produced after 50 epochs with yolov8s model and Fire-Dataset.

F1 Curve P Curve PR Curve
Confusion Matrix R Curve results

Predictions

label Prediction

Test Model with Streamlit

-Using Streamlit framework we can show the results of yolov8 model in web application.

Usage

streamlit run main.py

Image Testing

Resim Açıklaması

Youtube Video Testing

Resim Açıklaması

References

https://roboflow.com/

https://github.com/ultralytics/ultralytics

https://github.com/CodingMantras/yolov8-streamlit-detection-tracking/tree/master

About

In this project I used Yolov8 model for fire detection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published