Real-Time Vehicle Damage Classification Based on Accident Detection from CCTV Footage Using Two-Stage Approach
This project presents a two-stage approach for real-time vehicle damage classification from CCTV footage. It integrates accident detection and damage classification using YOLOv8 for accident detection and a Convolutional Neural Network (CNN) for damage classification.
- Real-time accident detection from CCTV footage.
- Vehicle damage classification based on severity (normal, moderate, severe).
- Two-stage approach:
- Accident Detection using YOLOv8.
- Damage Classification using Convolutional Neural Network (CNN).
- YOLOv8: For real-time object detection, particularly focused on identifying vehicles involved in accidents.
- Convolutional Neural Networks (CNN): For classifying vehicle damage.
- Python: The primary programming language.
- OpenCV: For video processing and frame extraction.
- TensorFlow/PyTorch: For model development and training.
- ultralytics: 8.3.36
- torchvision: 0.20.1+cu124
- tensorflow: 2.15.0
- opencv-python: 4.10.0.84
You can contribute to improving the scalability and accuracy of the model by sharing relevant datasets. Any dataset related to vehicle accidents, damage severity, or vehicle images can help enhance the performance and robustness of the system. To contribute, you can visit released page, or feel free to contact us for further collaboration and dataset sharing.
-
Clone the repository:
git clone https://github.com/irizkyw/Graduation-Accident-Detection.git cd Graduation-Accident-Detection
-
Create a Conda environment for installation. For detailed installation instructions, refer to the Ultralytics Documentation:
conda create --name vehicle_damage_env python=3.9.19 conda activate vehicle_damage_env
Run the integrated system combining both stages (accident detection and damage classification) with the following command:
python main.py --model_type="MobileNetV2" --classifier_path="model\MobileNetV2.h5" --video="assets\videos\Testing Video.ts"
--video
: Path to the video file or directory.--all_videos
: Process all videos in the specified folder and subfolders.--threshold_conf
: Confidence threshold for detections (default: 0.7).--frame_skip
: Number of frames to skip between processing (default: 1).--valid_classes
: List of valid detection classes (default:[0, 1]
).--nms_threshold
: NMS threshold for filtering overlapping boxes (default: 0.4).--image_folder
: Path to the folder containing image frames.--model_type
: Choose the classifier model type (MobileNetV2
orEfficientNetB0
, default:EfficientNetB0
).--classifier_path
: Path to the classifier model file.
Download the pre-trained YOLOv8 model for accident detection and the CNN model for damage classification from the models/
directory.
- YOLOv8 weights for accident detection:
models/yolov8_model/
- CNN model for damage classification:
models/cnn_model/
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Make your changes and commit them (
git commit -am 'Add new feature'
). - Push to your branch (
git push origin feature-branch
). - Create a new Pull Request.
If you find our dataset/code/paper helpful, please consider citing our papers 📝 and staring us ⭐️! https://ieeexplore.ieee.org/document/10933378
@INPROCEEDINGS{10933378,
author={Wahyudin, Ichwan Rizky and Rachmawati, Ema},
booktitle={2025 International Conference on Advancement in Data Science, E-learning and Information System (ICADEIS)},
title={Real-Time Vehicle Damage Classification Based on Accident Detection from CCTV Footage Using Two-Stage Approach},
year={2025},
volume={},
number={},
pages={1-6},
keywords={Accuracy;Scalability;Safety management;Emergency services;Real-time systems;Road safety;Time factors;Traffic congestion;Monitoring;Accidents;accident detection;CCTV;EfficientNet;vehicle damage classification;YOLOv8},
doi={10.1109/ICADEIS65852.2025.10933378}}