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.
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
Run this code at git bash or cmd:
python yolov8s_live_test.py
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
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
-This results produced after 50 epochs with yolov8s model and Fire-Dataset.
F1 Curve | P Curve | PR Curve |
---|---|---|
![]() |
![]() |
![]() |
Confusion Matrix | R Curve | results |
---|---|---|
![]() |
![]() |
![]() |
label | Prediction |
---|---|
![]() |
![]() |
-Using Streamlit framework we can show the results of yolov8 model in web application.
streamlit run main.py
https://github.com/ultralytics/ultralytics
https://github.com/CodingMantras/yolov8-streamlit-detection-tracking/tree/master