A smart and powerful AI-based wildlife monitoring system that detects wild animals like elephants, lions, tigers, and more using your webcam β and instantly plays an alert sound π when one is detected.
This project helps forest officers and wildlife teams monitor real-time video feeds to detect wild animals automatically.
If a dangerous animal appears, the system raises an alert β preventing potential harm to humans or property.
- π§ TensorFlow + Keras β Deep learning for animal classification
- π₯ OpenCV β Capturing and processing camera frames
- π΅ Playsound β Triggering instant alerts
- β Teachable Machine β Quick and easy model training
β
Detects multiple wild animals (Elephant, Lion, Tiger, etc.)
β
Ignores humans, pets, and background motion
β
Plays sound alerts for wild animals only
β
Real-time detection via webcam
β
Easy to customize with your own trained model
Trained on Googleβs Teachable Machine using custom classes:
- π Elephant
- π¦ Lion
- π― Tiger
- π Cheetah
- π» Bear
- π¦ Gorilla
- π¦ Rhino
- πΊ Hyena
- π« Non-Targets (humans, cats, dogs, etc.)
- πΏ Background
- Captures live frames from the webcam
- Resizes and normalizes images
- Predicts animal type and confidence
- If confidence > 80% and class is wild β plays alert sound
When a target animal is detected, alert.mp3 plays instantly π
pip install opencv-python tensorflow playsound==1.2.2 numpy
2οΈβ£ Folder Structure
Animal_Detector/ β βββ main.py βββ keras_model.h5 βββ labels.txt βββ alert.mp3 βββ banner.png β (upload this image file here later)
3οΈβ£ Run the Project
python main.py
Press βQβ to stop the camera feed.
π Future Enhancements
π± Send alerts to phone via SMS or WhatsApp β Upload detections to a cloud dashboard πΉ Integration with drones or CCTV π§ Improve accuracy with transfer learning
π¨βπ» Author
Mohammed Arshad π» Wildlife AI Enthusiast | Data & AI Learner π GitHub Profile
