- Description
- Dataset
- Model Training
- Live Stream and Video Processing
- Sample Results
- Installation
- Usage
- Contributing
- License
Incident Detection using YOLOv5 is a project aimed at automatically detecting various incidents in images and videos. The incidents that the model is trained to detect include:
- Fire
- Car accidents (car crash, car damage, car flip)
- Floods
- Dense traffic
The project utilizes the YOLOv5 object detection framework to build the detection model and a custom segmentation model for flood detection. The model is trained on labeled datasets for fire and car accidents, and a separate dataset is used for training the flood segmentation model.
The project includes components for processing images, videos, and live streams, and it utilizes websockets to send real-time incident feeds.
- The fire and car accident datasets are used to train the YOLOv5 object detection model.
- click here to download
- The flood segmentation dataset is used to train the custom segmentation model.
- The dataset is not publicly available on Roboflow click here to download
the source dataset before annotation, from MIT License see repository
- The YOLOv5 model is trained on the fire and car accident datasets.
- The model weights and evaluation results are available here.
- The custom segmentation model for flood detection is trained on the flood segmentation dataset.
- The model weights and evaluation results are available here.
- for the traffic jam class, must be detect cars and then count these cars
- the model weights are available here
The project includes a detection.py
file that processes live streams, videos, and images. It utilizes the YOLOv5 model for object detection and the custom segmentation model for flood detection. The incident feeds are sent using websockets, providing real-time updates on detected incidents.
Sample videos demonstrating the incident detection capabilities are available here. These videos showcase the model's performance in detecting fires, car accidents, floods, and dense traffic.
To set up the project and the required dependencies, follow these steps:
-
Clone this repository to your local machine.
-
Install the necessary packages and libraries using
pip
:pip install -r requirements.txt
-
Make sure you have the required model weights available in their respective directories
-
Make sure you work on Gpu, run :
python testGpu.py
1.to run the model on video,must edit demo.py by adding your video and the weights, And you can use this command:
python demo.py