This project utilizes the YOLOv11 model to detect smoke and fire in videos. The detection results are displayed in real-time and saved to a new video file.
이 프로젝트는 YOLOv11 모델을 사용하여 비디오에서 화재와 연기를 감지합니다.
전기 차량의 화재 전조 증상을 감지하는 것이 최종 목표입니다.
The project uses the YOLOv11 object detection model to detect fire and smoke in videos.
The model can be trained on a custom dataset or used for detection on a given video file.
- Real-time Detection: Detects fire and smoke in videos using the YOLOv11 model.
-
Clone the repository:
git clone https://github.com/bsy0317/yolov11_FireSmokeDetect.git cd smoke-fire-detection
-
Set up a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install the required dependencies:
pip install -r requirements.txt
-
Install YOLOv11: Make sure you have the Ultralytics YOLO library installed. You can install it via pip:
pip install ultralytics
To train the YOLO model with a datasets:
Download the dataset and update the data.yaml
file with the dataset details.
python main.py --train
To perform fire and smoke detection on a video:
python main.py --detect --file "path_to_input_video.mp4"
The configuration settings for training and detection are defined in the config.py
file. Here are the key configurations:
model_architecture
: The model architecture to use (e.g., yolov11.pt).epochs
: Number of epochs to train the model.batch
: Batch size for training.save_dir
: Directory where model checkpoints and results will be saved.data_yaml_path
: Path to thedata.yaml
file that defines the dataset.
You can modify the configurations to suit your specific requirements.
Contributions are welcome! If you'd like to contribute to this project, please fork the repository and make your changes. Once your changes are ready, submit a pull request, and we will review it.
This project is licensed under the MIT License. See the LICENSE file for details.