Revolutionary wildlife detection system that combines YOLO v11 AI, WebRTC streaming, and instant community alerts to protect both wildlife and communities in Nepal.
|
|
|
|
| Animal | ΰ€¨ΰ₯ΰ€ͺΰ€Ύΰ€²ΰ₯ | Detection | Alert Type |
|---|---|---|---|
| π Elephant | ΰ€Ήΰ€Ύΰ€€ΰ₯ΰ€€ΰ₯ | 96% accuracy | π Voice + π¬ WhatsApp |
| π Leopard | ΰ€ΰ€Ώΰ€€ΰ₯ΰ€΅ΰ€Ύ | 94% accuracy | π Voice + π¬ WhatsApp |
| π¦ Rhino | ΰ€ΰ₯ΰ€ΰ€‘ΰ€Ύ | 98% accuracy | π Voice + π¬ WhatsApp |
| π Tiger | ΰ€¬ΰ€Ύΰ€ | 95% accuracy | π Voice + π¬ WhatsApp |
| Animal | ΰ€¨ΰ₯ΰ€ͺΰ€Ύΰ€²ΰ₯ | Detection | Alert Type |
|---|---|---|---|
| πΌ Red Panda | ΰ€°ΰ€Ύΰ€€ΰ₯ ΰ€ͺΰ€Ύΰ€£ΰ₯ΰ€‘ΰ€Ύ | 92% accuracy | π§ Official Channels |
# π¦ Install dependencies
pip install -r requirements.txt
# π Generate SSL certificates (HTTPS required)
python generate_ssl.py
# π Launch the system
python app.pyπ Admin Panel: https://localhost:8443/admin
π Public View: https://localhost:8443/
πΉ Camera Setup: https://localhost:8443/camera/{token}
π Default Admin:
admin/admin123
graph TD
A[πΉ Camera Device] -->|π₯ Live Stream| B[π€ AI Processing]
B -->|π YOLO Detection| C{π¦ Animal Detected?}
C -->|β
Yes| D[π Confidence Check]
C -->|β No| A
D -->|π¨ High Confidence| E[π Alert System]
D -->|β οΈ Low Confidence| A
E --> F[π Voice Call]
E --> G[π¬ WhatsApp]
E --> H[π Push Notification]
F --> I[π₯ Community Protected]
G --> I
H --> I
| Step | Action | Description |
|---|---|---|
| π΄ 1 | Camera Setup | Admin creates camera location in dashboard |
| π‘ 2 | Device Connection | Field camera connects via unique token |
| π’ 3 | Live Streaming | WebRTC streams video to AI processing engine |
| π΅ 4 | AI Analysis | YOLO v11 analyzes frames for wildlife detection |
| π£ 5 | Smart Alerts | Multi-channel notification system activated |
| β« 6 | Community Safety | Real-time protection for humans and animals |
GET /- Home page with camera searchGET /admin- Admin panel (requires authentication)POST /admin/camera- Create new cameraDELETE /admin/camera/{id}- Delete cameraGET /view/{slug}- Public viewing pageGET /camera/{token}- Camera streaming pageWebSocket /ws/camera/{token}- Camera streaming WebSocketWebSocket /ws/view/{token}- Viewer WebSocketPOST /subscribe/{camera_id}- Subscribe to notificationsGET /search?q={query}- Search cameras
π WILDLIFE ALERT ECOSYSTEM
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β πΉ Field β β π€ AI Engine β β π₯ Community β
β Cameras βββββΊβ YOLO v11 βββββΊβ Dashboard β
β β β Detection β β β
β β’ WebRTC β β β’ GPU Accel β β β’ Live View β
β β’ HD Stream β β β’ Smart Sample β β β’ Alerts β
β β’ Auto Connect β β β’ 96% Accuracy β β β’ Subscribe β
βββββββββββββββββββ ββββββββββββββββββββ βββββββββββββββββββ
β
ββββββββββββΌβββββββββββ
β π¨ Alert Hub β
β β
β π Voice Calls β
β π¬ WhatsApp β
β π Push Notify β
β β° Smart Cooldown β
βββββββββββββββββββββββ
|
|
| π― For Communities | π For Wildlife | ποΈ For Authorities |
|---|---|---|
| β‘ Real-time protection | π Habitat monitoring | π Data-driven insights |
| π± Instant notifications | π« Reduced human conflict | π Population tracking |
| π Residential safety | π¦ Species preservation | π― Targeted conservation |
| π₯ Community alerts | π Movement patterns | π Incident reporting |
# π SSL Certificate Setup
certbot --nginx -d yourdomain.com
# π³ Docker Deployment
docker-compose up -d
# π Production Server
gunicorn -w 4 -k uvicorn.workers.UvicornWorker app:appexport SSL_CERT_PATH="/path/to/cert.pem"
export SSL_KEY_PATH="/path/to/key.pem"
export ADMIN_USERNAME="your_admin"
export ADMIN_PASSWORD="secure_password"| Endpoint | Method | Description | π― Purpose |
|---|---|---|---|
/ |
GET | π Home dashboard | Search & view cameras |
/admin |
GET | ποΈ Admin panel | Manage system |
/camera/{token} |
GET | πΉ Camera interface | Device streaming |
/view/{slug} |
GET | π Public viewer | Community monitoring |
/ws/camera/{token} |
WS | π Camera stream | Real-time video |
/ws/view/{token} |
WS | πΊ View stream | Live viewing |
/subscribe/{id} |
POST | π Alert subscription | Notification signup |
πΉ Camera Issues
- β Check HTTPS: Camera access requires secure connection
- π Browser Permissions: Allow camera/microphone access
- π WebRTC Support: Use modern browsers (Chrome, Firefox, Safari)
- π Refresh Connection: Clear browser cache if needed
π Alert Problems
- π± Service Worker: Ensure notifications are enabled
- π HTTPS Required: Push notifications need secure connection
- π VAPID Keys: Verify configuration in production
- β° Cooldown Active: Check if alert cooldown is preventing notifications
π€ AI Detection Issues
- π― Model Loading: Ensure YOLO weights are downloaded
- πΎ GPU Memory: Check CUDA availability and memory
- πΌοΈ Image Quality: Ensure good lighting and clear view
- β‘ Processing Speed: Monitor CPU/GPU usage