Project Overview
Key Challenges
-
Low accuracy in knife detection due to small object size and background similarity
-
Class imbalance between gun and knife datasets
-
High false positives in complex real-world environments
-
Limited dataset diversity (lighting, angles, occlusion)
-
Running on CPU-only systems, restricting performance and speed
-
Real-time detection optimization without GPU acceleration
-
Fine-tuning confidence thresholds to balance precision vs recall
Key Achievements
-
Successfully built a real-time weapon detection system using YOLOv8
-
Achieved high accuracy for gun detection (~0.99 mAP@50)
-
Implemented live detection via webcam with bounding boxes and labels
-
Designed a custom dataset pipeline (labeling, training, validation)
-
Optimized the model to run efficiently on low-resource (CPU) systems
-
Reduced false detections using threshold tuning and dataset balancing
-
Built a modular and extensible AI pipeline for future improvements
Performance Metrics
-
Precision (Gun): High (~0.95 – 0.99)
-
Recall (Gun): High (~0.95 – 0.99)
-
mAP@50 (Gun): ~0.99
-
Precision (Knife): Moderate
-
Recall (Knife): Low
-
mAP@50 (Knife): ~0.47
-
mAP@50-95: Moderate overall (due to knife class)
-
Inference Speed: Real-time on CPU (optimized)
-
Epochs Trained: 100
-
Image Size: 640x640
-
Batch Size: 8
