ATHIRU is an AI-powered wildlife intrusion monitoring system designed to reduce human–wildlife conflict in forest-adjacent communities.
The system continuously monitors CCTV camera feeds, detects wild animals using YOLO-World, captures evidence, generates real-time alerts, stores incidents in a database, and immediately notifies authorities through Telegram.
CCTV Camera / Demo Video
│
▼
YOLO-World Detection
│
▼
Multi-Object Tracking (YOLO)
│
▼
First Detection of Animal
│
┌──────────┼───────────┐
│ │ │
▼ ▼ ▼
Screenshot Database Telegram Alert
│ │
▼ ▼
FastAPI Backend
│
▼
Live Dashboard Updates
- AI-powered wildlife detection using YOLO-World
- Multi-object tracking
- Live CCTV monitoring dashboard
- Camera switching support
- Automatic screenshot capture
- Real-time incident logging
- SQLite database storage
- Live dashboard updates without refresh
- Telegram alert notifications
- Threat statistics
- Incident history
- Camera timestamp overlay
- Location tagging for every alert
- FastAPI
- SQLAlchemy
- SQLite
- Pydantic
- Jinja2
- YOLO-World
- Ultralytics
- OpenCV
- HTML
- CSS
- JavaScript
- Bootstrap 5
- Leaflet.js
- Telegram Bot API
ATHIRU/
main.py
requirements.txt
.env.example
.gitignore
backend/
│
├── database.py
├── models.py
├── schemas.py
├── telegram_service.py
detector/
│
└── detect.py
video/
│
├── process_video.py
└── stream.py
templates/
│
├── base.html
├── login.html
└── dashboard.html
static/
│
├── css/
├── js/
├── screenshots/
└── videos/
└── wildlife_demo.mp4 (place manually, see Required Files)
yolov8s-world.pt (place manually, see Required Files)
Requires Python 3.13. The exact package versions in requirements.txt
are pinned to what was tested and confirmed working on Python 3.13 -
several of them (torch, numpy, opencv-python, etc.) ship version-specific
prebuilt wheels, so installing on a different Python version may fail to
find a matching version. If you're on a different Python version, either
install Python 3.13 for this project, or relax the pins in
requirements.txt (e.g. torch>=2.13.0) and let pip resolve compatible
versions for your interpreter.
Requires Git. requirements.txt installs CLIP directly from its
GitHub repo (YOLO-World needs it to match text class names like
"elephant" to what it sees), so Git must be installed and on your PATH.
Create virtual environment
python -m venv venvActivate
Windows
venv\Scripts\activateLinux/Mac
source venv/bin/activateInstall packages
pip install -r requirements.txtPlace these manually.
yolov8s-world.pt
into
project root
and
wildlife_demo.mp4
into
static/videos/
Copy .env.example to .env and fill in your Telegram bot credentials:
TELEGRAM_BOT_TOKEN=xxxxxxxxxxxxxxxxxxxx
TELEGRAM_CHAT_ID=xxxxxxxxxx
Start FastAPI
uvicorn main:appOpen
http://127.0.0.1:8000
Open another terminal
python -m video.process_video- Login to dashboard.
- Select CAM-02 Backyard.
- Demo wildlife video starts.
- YOLO detects the animal.
- Screenshot is captured.
- Incident stored in SQLite.
- Dashboard updates automatically.
- Telegram alert is sent with screenshot.
- Threat statistics update instantly.
GET /
GET /dashboard
GET /api/health
GET /api/alerts
GET /api/stats
GET /api/stream/backyard
SQLite stores
- Species
- Confidence
- Latitude
- Longitude
- Timestamp
- Screenshot path
Animal Detected
│
▼
First Detection?
│
Yes
│
▼
Capture Screenshot
│
▼
Store Alert
│
▼
Update Dashboard
│
▼
Send Telegram Notification