WildGuard is a real-time elephant detection system that uses YOLOv3 and OpenCV to detect elephants and trigger alerts to prevent human-wildlife conflicts. It plays an 🚨 alarm sound and sends 📩 SMS notifications to nearby authorities when an elephant is detected.
✅ Real-time elephant detection using YOLOv3
✅ 🔊 Plays an alert sound when an elephant is detected
✅ 🗂 Logs detections in a MySQL database
✅ 📡 Sends SMS notifications using Twilio
✅ Simple and efficient 🖥 OpenCV-based implementation
Follow these steps to set up and run WildGuard on your system:
git clone https://github.com/AruvasagaChithan/WildGuard.git
cd WildGuardEnsure you have Python installed, then install the required packages:
pip install -r requirements.txtDue to file size restrictions, download the necessary YOLOv3 files manually:
🔗 YOLOv3 Weights: Download Here
🔗 YOLOv3 Config: Download Here
🔗 COCO Names File: Download Here
📂 Place these files inside the project directory.
Create a MySQL database and table for storing detections:
CREATE DATABASE wildguard_db;
USE wildguard_db;
CREATE TABLE detections (
id INT AUTO_INCREMENT PRIMARY KEY,
timestamp DATETIME NOT NULL,
info TEXT NOT NULL
);✅ Ensure MySQL is running and update the database connection details in the script if needed.
- Sign up on Twilio
- Get your 🔑 Account SID and 🔒 Auth Token
- Replace the placeholders in
wildguard.py:account_sid = "YOUR_ACCOUNT_SSID" auth_token = "YOUR_AUTH_TOKEN"
- Replace the 📞 Twilio phone number and 📲 recipient number in the script.
To start the system, simply run:
python wildguard.pyPress ⏹ Q to stop detection.
- The system will start detecting elephants in real-time.
- If an elephant is detected:
- 🔊 An alarm sound will be played.
- 📂 The detection will be logged in the database.
- 📩 An SMS alert will be sent to the authorities.
Aruvasaga Chithan
🔗 GitHub Profile
🔗 LinkedIn Profile
This project is licensed under the MIT License.