WildGuard is an advanced AI-powered monitoring system designed to mitigate human-wildlife conflict and preserve biodiversity. By combining real-time computer vision with cloud-based mobile alerting, it provides an instantaneous defense layer for forest borders, agricultural lands, and remote communities.
- 🧠 Smart AI Detection: Uses a Deep Learning (CNN) model to identify 50+ species of wildlife.
- 🛡️ Anti-False Alert Engine: Implements multi-frame confirmation and motion pre-filtering to ensure only valid threats trigger alerts.
- 📱 Instant PWA Alerts: Real-time push notifications delivered to any mobile device (Android/iOS) via Firebase Cloud Messaging.
- 📡 Remote Radar Feed: Live monitoring dashboard with "Radar Mode" and incident history logs.
- ⚡ Low-Latency Pipeline: Optimized for performance with background motion subtraction to reduce CPU load.
- 💾 Cloud Sync: All detections are automatically synced to Firebase Firestore for cross-device visibility.
WildGuard is engineered to support the United Nations 2030 Agenda:
| Goal | Contribution |
|---|---|
| SDG 15: Life on Land | Protects endangered species and prevents poaching through 24/7 automated monitoring. |
| SDG 11: Sustainable Cities | Safer human-animal co-existence in urban-forest transition zones. |
| SDG 2: Zero Hunger | Protects livelihoods by preventing crop raids and livestock loss. |
| SDG 9: Industry & Innovation | Demonstrates the power of AI & IoT in modern environmental conservation. |
- Vision Engine: Python 3.10+, OpenCV, TensorFlow/Keras.
- Cloud Infrastructure: Firebase (FCM, Firestore, Hosting).
- Server: Node.js, Express.
- Frontend: PWA with Vanilla JS & Tailwind CSS.
# Clone the repository
git clone <repository-url>
cd Miniproject
# Install backend dependencies
cd backend
npm install
# Install Python dependencies (for AI Detection)
pip install tensorflow opencv-python numpy requests- Backend: Place your
firebase-key.json(Firebase Service Account) in thebackend/folder. (Alternatively, configure paths inbackend/.env). - Frontend: Open
pwa/config.jsand add your Firebase projectapiKeyandvapidKey.
Step A: Launch the Backend
node server.jsStep B: Start AI Monitoring
python detect.pyTip: Press 'q' in the video window to safely exit and release the camera.
- Expose Server: Use Ngrok to create a secure tunnel:
npx ngrok http 5000. - Access URL: Scan the QR/Open the HTTPS URL in your mobile browser.
- Install: Tap "Add to Home Screen" or the "Install App" button in the top bar.
- Stay Alert: Grant notification permissions to receive background push alerts.
Miniproject/
├── backend/
│ ├── detect.py # Smart AI Detection Engine
│ ├── server.js # API Server & PWA Host
│ ├── wild_animal_model.keras # AI Weight File
│ ├── class_labels.json # AI Label Map
│ └── detections.json # Local Persistence Log
└── pwa/
├── index.html # Modern Dashboard UI
├── app.js # PWA Interaction Logic
└── firebase-messaging-sw.js # Background Service Worker
Designed with ❤️ for Wildlife Conservation & Community Safety. 🌿