YAML Metadata Warning: empty or missing yaml metadata in repo card
Check out the documentation for more information.
Custom YOLO Object Detection Model For Suspicious Activity Detection
This repository contains a custom-trained YOLO-based object detection model designed to detect various objects related to safety and surveillance scenarios, such as Assault, Fighting, Gun, Kidnapping, and more.
Table of Contents
Overview
The custom YOLO model is capable of detecting the following classes:
- Assault
- Fighting
- Gun
- Kidnapping
- Knife
- People
- Police
- Prisoner
- Theft/Robbery
- Time Bomb
The model is optimized for real-time inference and is suitable for applications in:
- Public Safety Monitoring
- Surveillance Systems
- Security Applications
Features
- Real-Time Detection: Utilizes YOLO’s efficient architecture for quick detection.
- Custom Classes: Trained on a tailored dataset specific to safety and surveillance.
- Confidence Thresholding: Outputs only high-confidence predictions for accurate results.
- Visualizations: Overlay detected objects on video feeds or images.
Setup
Prerequisites
- Python 3.7+
ultralyticspackage for YOLO- A GPU (recommended for faster inference)
Installation
Clone this repository:
git clone https://huggingface.co/Accurateinfosolution/Suspicious_activity_detection_Yolov11_CustomInstall dependencies:
pip install ultralyticsAdd your trained YOLO model:
- Place your
Suspicious_Activities_nano.ptfile in the project directory.
- Place your
Usage
Running Predictions
Run the detection script on a video or image source:
python predict.py
Prediction Script: predict.py
The script uses the YOLO framework to load the best.pt model and detect objects:
from ultralytics import YOLO
# Load the custom YOLO model
model = YOLO("Suspicious_Activities_nano.pt")
# Perform prediction
model.predict(source="0", show=True, conf=0.6)
Replace "0" with:
- A webcam source (
0or1). - A path to an image/video file.
Model Details
- Architecture: YOLO (You Only Look Once)
- Classes: 10 custom classes (see Overview)
- Confidence Threshold: 0.6
- Pre-trained Weights: Fine-tuned on YOLO’s default weights.
Results
Sample output of the model includes bounding boxes for detected objects with labels and confidence scores. Images or video streams are displayed with real-time overlays.
Limitations
- Dataset Dependency: The accuracy is influenced by the quality of the training dataset.
- Environmental Constraints: Performance may vary under poor lighting or occlusion.
- Class Generalization: May not generalize well to scenarios outside its training scope.
Acknowledgments
- YOLO Framework: Ultralytics
- Custom Dataset: Annotated with bounding boxes for the 10 custom classes.
- Contributors: Shreyanth(mailto:shreyanthhg1427@gmail.com)