Wild watch aims to boost safety along Nepal's wildlife habitats bordering human settlements using object detection technique. It spots dangerous animals and alerts authorities or nearby communities for swift action, focusing on areas near national parks, wildlife reserves, and forests.
It uses a custom-trained YOLOv8 model. This model is deployed on a Flask server for processing of live feed, which is then recieved by a react app and an alert system. Alert system seamlessly integrates IoT components like LCD displays and buzzers, enabling timely alerts for proactive measures.
- You must have
Python 3
installed on your system. - You must have
Git
installed on your system. - (Optional) You should have
Node.js
(npm) installed on your system (if using development server)
- Data was collected, augmented and annotated. You can find it here: Google Drive
- Yolov8 model architecture was trained on the given data. You can find the model here:
To run the server, execute the following command:
python server.py
Certain parameters in the config.json
file can be changed to customize the system's behavior:
{
"yolo_model_path": "best.pt",
"url": 0,
"scale_factor": 0.5,
"confidence_threshold": 0.65,
"esp32_api": "http://192.168.23.188/api/animal-detected"
}
-
yolo_model_path
: This parameter denotes the file path to a YOLOv8 model; crucial for identifying animals during video streams. -
url
: Denotes the URL of video feed or physical camera index related to camera input. For example: "0" suggests it represents the default camera source. -
scale_factor
: Determines the scaling factor applied to input images before inferencing by the model. For example: value of 0.5 means 50% of the orignal input width and height will be used to feed to the model. -
confidence_threshold
: Sets the minimum confidence level required for object detection predictions to be considered valid. A threshold means predictions must have a confidence score of threshold or higher to be accepted. -
esp32_api
: Specifies the endpoint of an API hosted on an ESP32 device. This API is further used for an alarm system, facilitating communication between the detection system and downstream processes for further proactive measures.
Ensure that the backend server is running on port 5000 for the component to fetch the video feed and output data. The following ports and endpoints can be used to fetch data:
- Video Feed:
http://localhost:5000/video_feed
- Output list of detected animals:
http://localhost:5000/output_data
The video feed and output data from the backend server are displayed in a react app. It communicates with the server to fetch the video feed and real-time output data using HTTP requests. To run the frontend, follow these steps:
-
Ensure that the server is running. If not, follow the instructions in the previous section to start the server.
-
Navigate to the frontend directory in your terminal:
cd wild-watch/react-app/development-server/wildwatch-app
-
Install dependencies by running:
npm install
-
Once the dependencies are installed, start the frontend application with:
npm start
-
Open your web browser and enter
http://localhost:3000
.
The alarm system, implemented on the ESP32 platform, is designed to enhance wildlife monitoring efforts by providing real-time alerts when animals are detected. The system utilizes two main hardware components: an LCD display for visual alerts and a buzzer for audible alerts. Below documents details about the setup and functionality of the IoT components, including the LCD display and buzzer, specifically for the ESP32 platform.
-
ESP32 Microcontroller
: The ESP32 microcontroller serves as the central processing unit for the IoT alarm system. Itreceives input from the server and manages the communication with other hardware components, ensuring alerting when required. -
LCD Display (16x2)
: The 16x2 I2C LCD display is used to provide visual alerts to users. It displays messages such as "No Animal Detected," "Single Animal Detected," or "Multiple Animals Detected" based on the detection results. -
Buzzer
: The buzzer is employed to provide audible alerts when animals are detected. It emits a sound to alert users of potential wildlife activity, ensuring that alerts are not missed even in noisy environments.
-
ESP32 Setup:
- Connect the ESP32 microcontroller to the necessary power source and ensure it is programmed with the appropriate firmware to control the LCD display and buzzer.
-
LCD Display Wiring:
- Connect the 16x2 LCD display to the ESP32 microcontroller using the following wiring:
- VCC to 5V
- GND to GND
- SDA to GPIO pin (e.g., GPIO21)
- SCL to GPIO pin (e.g., GPIO22)
- Connect the 16x2 LCD display to the ESP32 microcontroller using the following wiring:
-
Buzzer Wiring:
- Connect the buzzer to the ESP32 microcontroller using the following wiring:
- Positive (+) terminal to GPIO pin (e.g., GPIO13)
- Negative (-) terminal to GND
- Connect the buzzer to the ESP32 microcontroller using the following wiring:
-
ESP32 Logic:
- The ESP32 microcontroller receives input from sensors or image processing modules to detect animals.
- It processes the detection results and triggers the appropriate actions on the LCD display and buzzer based on the detection outcome.
-
LCD Display Operation:
- Upon detecting animals, the ESP32 sends signals to the LCD display to update the displayed message.
- If no animals are detected, the display shows "No Animal Detected."
- If a single animal is detected, the display shows the name of the animal followed by "Detected."
- If multiple animals are detected, the display shows "Multiple Animals Detected."
-
Buzzer Activation:
- When animals are detected, the ESP32 activates the buzzer to emit a sound alert.
- The buzzer continues to sound for a predefined duration to ensure that users are alerted to the presence of animals.
-
Esp32_server.c++: contains the script used in esp32 of the alarm system
-
test_iot_server.py: contains the testing script used to send signal to the alaram system to activate alarming
Name | Contribution | Linkedin Profile |
---|---|---|
Abhash Rai | Team Lead & Backend | Abhash Rai |
Nabin Oli | Machine Learning | Nabin Oli |
Bishesh Giri | Frontend | Bishesh Giri |
Sudeep Fullel | IOT | Sudeep Fullel |
Sanket Shrestha | Documentation | Sanket Shrestha |
Shankar Tamang | Documentation | Shankar Tamang |