https://github.com/nizarassad/guns-knifes-detection
This project uses YOLOv5 architecture for creating guns and knifes real time detection
https://github.com/nizarassad/guns-knifes-detection
artificial-intelligence data-processing data-science deep-learning model-optimization object-detection python real-time-object-detection roboflow yolo yolov5
Last synced: 4 months ago
JSON representation
This project uses YOLOv5 architecture for creating guns and knifes real time detection
- Host: GitHub
- URL: https://github.com/nizarassad/guns-knifes-detection
- Owner: Nizarassad
- Created: 2023-01-15T21:58:40.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-20T14:38:36.000Z (over 3 years ago)
- Last Synced: 2025-05-07T10:13:18.311Z (about 1 year ago)
- Topics: artificial-intelligence, data-processing, data-science, deep-learning, model-optimization, object-detection, python, real-time-object-detection, roboflow, yolo, yolov5
- Language: Jupyter Notebook
- Homepage:
- Size: 22.3 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# YOLOv5 Real-Time Object Detection for CCTV
### Introduction
#### The YOLO (You Only Look Once) series of object detection models are known for their real-time performance and accuracy. In this project, we will be using YOLOv5 to detect guns and knives in CCTV footage in real-time. This project is a proof-of-concept for using YOLOv5 in a security setting to improve public safety.
### Requirements
NVIDIA GPU
CUDA and cuDNN (version 10.2)
Python 3.8 or later
OpenCV
PyTorch
YOLOv5
A dataset of CCTV footage containing guns and knives
Installation
Install CUDA and cuDNN. You can find the installation instructions on the NVIDIA website.
### Clone this repository.
##### Copy code
> git clone https://github.com/AlexeyAB/darknet
#### Install the required Python packages by running the following command in the project directory:
##### Copy code
> pip install -r requirements.txt
#### Download the pre-trained YOLOv5 weights from the official YOLO website.
##### Copy code
> https://github.com/AlexeyAB/darknet
#### Build the darknet library.
##### Copy code
> cd darknet
> make
### Usage
- Collect CCTV footage containing guns and knives.
- Run the object detection script on the CCTV footage.
##### Copy code
> python detect.py --input path/to/video.mp4 --output path/to/output.avi --weights path/to/weights.pt
The script will detect guns and knives in the footage and save the output to the specified location.
## Conclusion
#### In this project, we have shown how YOLOv5 can be used for real-time object detection in CCTV footage to detect guns and knives. This proof-of-concept demonstrates the potential for using YOLOv5 in a security setting to improve public safety. However, it is important to note that this project is for educational purposes only and should not be used in a real-world setting without proper testing and evaluation.