Weapon Detection Models Welcome to the Weapon Detection Models repository! This project provides three specialized YOLOv8-based models fine-tuned for detecting various types of weapons in images and videos. These models are trained on high-quality datasets sourced from Roboflow and Google Drive. They are designed for real-time weapon detection, making them ideal for security and surveillance applications.
๐ Models Overview: There are 3 different models for weapon detection tasks:
Gun Detection Model Purpose: Detects firearms such as pistols, rifles, and shotguns. Use Case: Security systems, law enforcement, and firearm detection in public spaces. MODEL: gun.pt
All Weapons Detection Model Purpose: Detects a wide range of weapons, including guns, knives, swords, sticks, axes, and more. Use Case: Comprehensive weapon detection for general security and monitoring. MODEL: All_weapon.pt
Bladed Weapons Detection Model Purpose: Focuses on detecting bladed weapons such as swords, knives, and sticks. Use Case: Specific scenarios requiring detection of melee weapons. MODEL: stick_knife_sword.pt
๐ Datasets The models are trained on high-quality datasets from:
Roboflow: A curated dataset for weapon detection. Google Drive Dataset: https://drive.google.com/drive/folders/179q_MNjx0ipzybhdjpQTxVu3IbI-5lWl. The datasets include diverse images with bounding box annotations for various weapon types, ensuring robust performance across different environments.
- Inference You can use the models for inference on images, videos, or live webcam feeds. Below are the commands to run inference:
Image Inference python infer.py --model gun_detection_project/results/gun_detection/weights/best.pt --source path/to/image.jpg
Video Inference python infer.py --model gun_detection_project/results/gun_detection/weights/best.pt --source path/to/video.mp4 --output results.mp4
Webcam Inference python infer.py --model gun_detection_project/results/gun_detection/weights/best.pt --source webcam