An AI-powered military surveillance system using YOLOv8 for real-time weapon and intruder detection. Features include instant alerts, Google Cloud logging, and face recognition for authorized personnel. Designed for 24/7 monitoring in high-security zones, enhancing threat detection and response.
-
Real-Time Weapon Detection:
- Detects weapons such as:
- Automatic Rifle
- Bazooka
- Grenade
- Grenade Launcher
- Handgun
- SMG
- Shotgun
- Sniper
- Sword
- Detects weapons such as:
-
Intruder and Commander Recognition:
- Detects and differentiates intruders from authorized personnel, such as commanders, for specific monitoring and logging.
-
Instant Alerts:
- Sends notifications via WhatsApp using Twilio API.
- Plays audio warnings for immediate response.
- Logs events to Google Sheets for real-time tracking.
-
Cloud Integration:
- Captures detection images with timestamps and live location links.
- Uploads data to Google Drive for secure storage.
-
Redetection Handling:
- Avoids redundant logs for recurring detections.
-
24/7 Surveillance:
- Utilizes a webcam for continuous monitoring.
- Python for system development.
- YOLOv8 (Ultralytics) for object detection.
- Google Drive API for file storage.
- Google Sheets API for event logging.
- Twilio API for WhatsApp notifications.
- OpenCV for video processing.
The confusion matrix evaluates the detection performance across all trained classes. It highlights:
- The detection accuracy for each class (e.g., "Automatic Rifle", "Intruder").
- Misclassifications, if any, for further tuning.
This plot shows the relationship between confidence thresholds and F1 scores for all classes. It helps in understanding:
- The optimal confidence threshold for reliable predictions.
- The variability in precision and recall for different classes.
This image showcases the system's real-time detection interface. It identifies a commander with a bounding box, displays the class name and confidence score, and highlights the efficiency of the YOLOv8 model.
- Real-time video feed interface that detects multiple weapons simultaneously.
- Features:
- Bounding boxes around detected objects.
- Labeled weapon types with confidence scores.
- Example: Detection of "Sniper" and "Automatic Rifle" with high accuracy.
- Features:
- Real-time video feed highlighting the detection of an intruder.
- Features:
- Bounding box around the intruder.
- Labeled tag "Intruder" with the corresponding confidence score.
- Immediate response actions:
- Audio alert playback.
- WhatsApp notifications sent to designated recipients.
- The Google Sheet logs every detection event with the following details:
- Detected Name: Specifies the detected object, e.g., "Commander" , "Intruder".
- Date and Time: Timestamp of the detection event.
- Captured Image: A snapshot of the detected object or person.
- Live Location Link: A clickable link to track the detection site in real time.
-
Detection:
- The system processes real-time video feed using OpenCV.
- YOLOv8 detects objects (weapons, intruders, commanders) and generates bounding boxes with confidence scores.
-
Alert System:
-
Logging:
- Events are logged into Google Sheets with:
- Timestamp
- Detection class
- Confidence score
- Image link
- Events are logged into Google Sheets with:
-
Continuous Monitoring:
- Prevents redundant logs for the same event and ensures updated tracking.
- Clone the repository and install dependencies:
git clone https://github.com/yashbhaskar/Defense_Surveillance_System.git cd Defense_Surveillance_System pip install -r requirements.txt