Computer Vision β’ Real-Time Detection β’ Automated Alerts β’ Evidence Logging
WildGuard AI is a web-based wildlife surveillance system designed to detect potentially suspicious human activity in monitored areas using real-time computer vision.
The system combines OpenCV's DNN inference pipeline, a pre-trained SSD MobileNet V3 object-detection model, a Flask web application, automated email notifications, timestamped image evidence, and Excel-based detection logging into one workflow.
Instead of simply displaying a detection, WildGuard AI connects the complete pipeline:
Video / Camera β Object Detection β Human Detection β Evidence Capture β Email Alert β Data Logging β Dashboard Review
The project was built to demonstrate how computer vision can be integrated with a practical monitoring and response workflow.
| Capability | Description |
|---|---|
| π₯ Live Camera Detection | Process frames from a connected camera in real time. |
| π Video Upload Detection | Upload MP4, AVI, MOV, WEBM or MKV footage for analysis. |
| π§ Object Detection | Uses SSD MobileNet V3 through OpenCV's DNN module. |
| π€ Human Detection | Treats detected humans as potential suspicious activity and triggers the alert workflow. |
| πΎ Animal Detection | Identifies supported animal classes from the COCO object classes. |
| π¨ Automated Alerts | Sends an email alert when a human is detected. |
| πΈ Evidence Capture | Saves the detection frame with a timestamp. |
| π Detection Logging | Stores timestamp, person status, animals and image filename in Excel. |
| πΌοΈ Evidence Gallery | Browse captured detection images from the dashboard. |
| π Live Statistics | Displays detections, alerts sent, last detection and FPS. |
| π₯ Report Export | Download the detection log as an Excel file. |
| β‘ Alert Cooldown | Uses a 10-second cooldown to reduce repeated alerts for continuous detections. |
| π Asynchronous Processing | Image saving, Excel logging and email delivery are handled in background threads. |
| π Web Dashboard | Provides a browser-based control and monitoring interface. |
Detection frames are automatically saved with timestamps and can be reviewed from the dashboard gallery.
flowchart LR
A[Camera / Video Upload] --> B[Flask Application]
B --> C[OpenCV Video Processing]
C --> D[SSD MobileNet V3]
D --> E{Person Detected?}
E -- No --> C
E -- Yes --> F[Capture Detection Frame]
F --> G[Save Timestamped Image]
F --> H[Log Detection to Excel]
F --> I[Send Email Alert]
G --> J[Evidence Gallery]
H --> K[Downloadable Report]
I --> L[Email with Detection Details + Image]
C --> M[Live MJPEG Feed]
M --> N[Monitoring Dashboard]
1. Input
The system accepts either:
- Live camera input
- Uploaded surveillance footage
2. Frame processing
Each frame is read with OpenCV and resized when necessary before inference.
3. Object detection
SSD MobileNet V3 processes the frame through OpenCV's DNN API using a 320 Γ 320 input.
4. Threat trigger
When a person class is detected, the system considers the event potential suspicious activity and starts the alert workflow.
5. Evidence generation
The current frame is saved as a timestamped JPEG.
6. Parallel response
Three operations are triggered:
- Detection statistics are updated
- Detection information is written to Excel
- An email alert containing the detection details and captured image is sent
7. Dashboard monitoring
The browser dashboard receives the processed video stream and polls the backend for live statistics.
A detection does not stop at a bounding box.
Person detected
β
10-second alert cooldown checked
β
Detection frame captured
β
Timestamped evidence saved
β
Detection logged to Excel
β
Email alert generated
β
Captured image attached inline
β
Dashboard statistics updated
The email includes:
- Monitoring area
- Detection timestamp
- Person detection status
- Detected animals
- Captured detection image
WildGuard AI uses:
SSD MobileNet V3 Large + COCO object classes
The model is loaded using:
cv2.dnn_DetectionModel(
"frozen_inference_graph.pb",
"ssd_mobilenet_v3_large_coco_2020_01_14.pbtxt"
)The detection pipeline is configured with:
- Input size:
320 Γ 320 - Confidence threshold:
0.5 - RGB channel swapping
- OpenCV DNN inference
The application uses the COCO class list provided in coco.names.
The current detection logic checks for:
bird Β· cat Β· dog Β· cow Β· horse Β· sheep Β· elephant Β· bear Β· zebra Β· giraffe
The primary alert trigger is the detection of the person class.
The dashboard provides a centralized monitoring interface with:
- Upload surveillance footage
- Start live camera
- Stop detection
- Real-time processed video
- Bounding boxes
- Object labels
- Confidence scores
- FPS indicator
- Total detections
- Alerts sent
- Last detection time
- Current FPS
- Detection image gallery
- Full-size image preview
- Timestamp information
- Image deletion
- Download detection history as
.xlsx
Model: SSD MobileNet V3 Large
Model classes: COCO object classes
Inference: OpenCV DNN
- Pandas for structured detection data
- OpenPyXL for Excel file generation/handling
SMTP / Gmail for automated email notifications.
WildGuard-AI/
β
βββ app.py
βββ final1.py
βββ requirements.txt
β
βββ coco.names
βββ frozen_inference_graph.pb
βββ ssd_mobilenet_v3_large_coco_2020_01_14.pbtxt
β
βββ templates/
β βββ landing.html
β βββ dashboard.html
β
βββ static/
β βββ landing.css
β βββ landing.js
β βββ dashboard.css
β
βββ uploads/
β βββ uploaded surveillance videos
β
βββ detected_images/
β βββ timestamped detection evidence
β
βββ detection_log.xlsx
βββ poaching_records.xlsx
βββ output.avi
git clone <YOUR_REPOSITORY_URL>
cd "Real-Time Surveillance and Poaching Detection System with Email Notifications"python -m venv venvActivate it:
Windows
venv\Scripts\activatemacOS / Linux
source venv/bin/activatepip install -r requirements.txtBefore running the application, configure the sender and receiver email settings in app.py.
For Gmail, use a Google App Password, not your normal account password.
β οΈ For production deployment, credentials should be moved to environment variables or a secret manager instead of being stored directly in source code.
python app.pyThe Flask server runs on:
http://localhost:5000
Open the dashboard at:
http://localhost:5000/dashboard
- Open the dashboard.
- Select Start Live Camera.
- The system begins processing camera frames.
- Detected objects are displayed with bounding boxes.
- If a person is detected:
- Evidence is captured.
- Detection is logged.
- Email alert is triggered.
- Review the event from the gallery.
- Open the dashboard.
- Select a supported video file.
- Click Start Detection.
- Monitor the processed feed.
- Review generated alerts and evidence.
This project is a demonstration / prototype system and should not be treated as a production wildlife-surveillance platform without additional security and reliability work.
Recommended production improvements include:
- Environment-based secrets
- Authentication and authorization
- HTTPS
- Secure upload validation
- Rate limiting
- Structured database storage
- Audit logging
- Background job infrastructure
- Model validation on domain-specific wildlife footage
- Secure deployment configuration
- Privacy controls for captured images
WildGuard AI should be understood as a potential suspicious-activity detection demonstrator, not a complete poaching classifier.
The current implementation triggers its alert workflow when it detects a person. Detecting a person does not inherently prove poaching.
The system therefore demonstrates the technical pipeline:
Person Detection β Evidence Capture β Alert β Review
rather than claiming that the model can independently determine whether an actual poaching event has occurred.
The underlying SSD MobileNet V3 model is a general object detector using COCO classes, so domain-specific wildlife performance may vary depending on:
- Camera placement
- Lighting
- Occlusion
- Distance from the subject
- Image quality
- Environmental conditions
- Object size
- Species representation in the source model
The project stores detection events in detection_log.xlsx using fields such as:
| Timestamp | Person Detected | Animals Detected | Image Filename |
|---|---|---|---|
2025-11-29 18:28:34 |
Yes | β | detection_2025-11-29_18-28-34.jpg |
2025-11-29 18:28:44 |
Yes | β | detection_2025-11-29_18-28-44.jpg |
This creates a simple historical record that can be downloaded from the dashboard.
Potential next steps for evolving WildGuard AI into a more production-oriented system:
- Train/fine-tune a wildlife-specific detection model
- Distinguish rangers, visitors and potential intruders
- Add multi-camera support
- Add location-aware alerts
- Add SMS / WhatsApp notifications
- Replace Excel with PostgreSQL or another database
- Add authentication and role-based access
- Add alert severity levels
- Add detection confidence analytics
- Add historical charts and trend analysis
- Add cloud deployment
- Add containerized deployment with Docker
- Add automated testing and CI/CD
What makes this project more than a basic object-detection demo is the end-to-end application workflow around the model.
Frames are continuously processed and streamed back to the browser using an MJPEG response.
Detection evidence, Excel logging and email delivery are handled asynchronously so the main detection loop can continue processing frames.
A cooldown mechanism prevents the same continuous human presence from generating an email every frame.
Every triggered event produces a timestamped image that can later be reviewed from the dashboard.
The frontend does not simply display a model output. It provides controls, statistics, alerts, reporting and evidence management around the detection pipeline.
Wildlife monitoring often involves large areas, difficult terrain and situations where continuous human observation is impractical.
WildGuard AI explores how computer vision can act as an automated first layer of surveillance, helping surface potentially suspicious activity so that a human operator or ranger can investigate it.
The core idea is simple:
Detect early. Capture evidence. Alert quickly. Let humans make the final decision.
Samruddhi Shinde
Information Technology Student @ Vishwakarma Institute of Technology, Pune
Full Stack Developer β’ AI/ML Enthusiast
β If you found this project useful, consider giving the repository a star!
