WildEye is a real-time, AI-powered wildlife monitoring and early warning system designed to mitigate human-wildlife conflicts. By employing state-of-the-art computer vision (YOLOv8) and a synchronized web stack, the system identifies dangerous/endangered animals, logs sightings, and instantly alerts field rangers via email dispatch.
- Real-Time AI Animal Detection: Custom-trained
YOLOv8computer vision pipeline detecting target species (elephants, bears, leopards, tigers, etc.) with configurable confidence thresholds. - Live Camera Stream: Smooth, low-latency live camera streaming directly on the dashboard.
- Secured JWT Admin Portal: Protected control panel featuring a modern login/signup layer using JSON Web Tokens (JWT) and
bcryptjspassword hashing. - Automated Dispatch System: Nodemailer-driven SMTP engine that emails instant alerts to enabled forest officers upon high-confidence detections.
- Dynamic Analytics & Custom Reports: Automatically compiles historical database entries into dynamic overview statistics (Total Detections, threatened species ratio, active hours) and exports daily, weekly, or monthly logs.
graph TD
A[IP Camera / Video Feed] -->|Frames| B(Python YOLOv8 Model)
B -->|Detects Target Animal| C{Backend API Server}
B -->|Writes annotated frame| D[latest_frame.jpg]
C -->|1. Saves Sighting| E[(MongoDB Atlas)]
C -->|2. Broadcasts event| F[Socket.io client]
C -->|3. Triggers email| G[Nodemailer SMTP]
F -->|Real-time alert| H[React Dashboard]
D -->|Poll & Render| H
We trained our YOLOv8 model using a custom dataset hosted on Roboflow Universe:
If you want to retrain the model locally, install the Roboflow Python package:
pip install roboflowThen download the dataset in YOLOv8 format:
from roboflow import Roboflow
rf = Roboflow(api_key="YOUR_ROBOFLOW_API_KEY")
project = rf.workspace("tejas-eurut").project("animal-detection-85p4k-qmaea")
version = project.version(2)
dataset = version.download("yolov8")WildEye_Project(EDI)/
├── ML_model/
│ ├── wildeye_test.py # YOLOv8 target detection and frame streaming script
│ └── yolov8n.pt # Pre-trained model weights
├── backend/
│ ├── server.js # Node.js / Express API & Socket.io server
│ └── .env # Port, database URL, and SMTP key parameters
└── frontend/
├── src/
│ ├── components/ # App pages: Home, LiveMonitor, Reports, Settings, Login
│ ├── App.js # Stateful JWT routes & path guards
│ └── index.js # React entry point
└── package.json # React libraries
- Node.js (v16+)
- Python (3.8+)
- MongoDB Atlas account (or local MongoDB database)
- Navigate to the parent directory containing the backend dependencies:
cd backend - Create or open the
.envfile and configure your credentials:Note: ForDATABASE_URL=mongodb+srv://<username>:<password>@cluster.mongodb.net/WildeyeDB?retryWrites=true&w=majority EMAIL_USER=your_gmail@gmail.com EMAIL_PASS=your_16_character_app_password JWT_SECRET=your_secure_jwt_secret_key
EMAIL_PASS, you must generate a 16-character Google App Password.
- Navigate to the frontend directory:
cd ../frontend - Install the frontend dependencies:
npm install
- Install Ultralytics YOLOv8, OpenCV, and Requests:
pip install ultralytics opencv-python requests numpy
- Open
ML_model/wildeye_test.pyand verify these paths match your files:video_path: Path to your input video feed or camera device index.model_path: Path to your trained weights (best.pt).
Open three separate terminal instances to run the complete WildEye pipeline:
cd backend
node server.jsConsole output should show: SUCCESS: Successfully connected to MongoDB Atlas!
cd frontend
npm startThis will open the web interface at http://localhost:3000.
cd ML_model
python wildeye_test.pyA local OpenCV window will launch displaying the annotated video. Detections will instantly print to the backend and update the web portal.
- Admins/Control Room Operators: Register an account on the sign-up screen, log in, and monitor sightings, customize active forest officer notifications, and download analytics.
- Field Officers: Registered inside Settings. They do not need to register accounts or access the dashboard. The system automatically routes instant alerts to their registered email addresses.