Eleguard is an intelligent elephant detection and deterrent system powered by computer vision and IoT.
It uses a Raspberry Pi with a camera module to detect elephants, trigger alerts, and activate deterrent mechanisms to protect farmlands and communities.
Languages: Python, Bash Libraries: OpenCV, Picamera2, NumPy, Roboflow, Inference SDK, Twilio, PySerial, PyGame Hardware: Raspberry Pi, Camera Module, GSM Module, GPS
- Real-time elephant detection using computer vision (OpenCV + Roboflow inference).
- Emergency alerts via GSM (Twilio SMS support).
- Automatic deterrent activation (low-frequency sound emitter).
- GPS logging and image capture for event records.
- Lightweight deployment on Raspberry Pi.
You can set up the project in two ways:
-
Classic Python environment (
requirements.txt
) -
Modern uv package manager (recommended)
-
Clone the repository:
git clone https://github.com/alvin-dennis/DevMate.git
-
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate
-
Install the required dependencies:
pip install -r requirements.txt
-
Rename
.env.example
file to.env
-
Fill the
.env
with your credentialsTWILIO_ACCOUNT_SID=your_account_sid TWILIO_AUTH_TOKEN=your_auth_token TWILIO_PHONE_NUMBER=+1234567890 TARGET_PHONE_NUMBER=+1987654321 ALERT_SOUND_FILE= ROBOFLOW_API_KEY=your_api_key
-
Run EleGuard :
python3 app.py
-
Clone the repository:
git clone https://github.com/alvin-dennis/DevMate.git
-
Install Dependencies:
uv sync
-
Rename
.env.example
file to.env
-
Fill the
.env
with your credentialsTWILIO_ACCOUNT_SID=your_account_sid TWILIO_AUTH_TOKEN=your_auth_token TWILIO_PHONE_NUMBER=+1234567890 TARGET_PHONE_NUMBER=+1987654321 ALERT_SOUND_FILE= ROBOFLOW_API_KEY=your_api_key
-
Run EleGuard :
uv run main.py
- The camera continuously monitors for elephant presence.
- If an elephant is detected: GSM alert is sent via Twilio & deterrent mechanism is triggered.
- Logs and images are saved locally for review.
Contributions are welcome! 🎉 If you’d like to improve Eleguard, please fork the repository and submit a pull request.
This project is licensed under the MIT License