AI on Edge-Based Animal Intrusion Detection and Alert System

Published  November 14, 2024   0
Edge AI-Based Animal Intrusion Detection and Alert System

Animal intrusion is a significant issue in many rural and agricultural areas, especially those near forests or wildlife reserves. Animals like elephants, wild boars and other large wildlife often wander into farms or villages, causing damage to crops, property and sometime even leading to human-animal conflicts. To address this issue, there is a need for a reliable, automated system that can detect and alert the concerned people about animal intrusions in real-time.

This project aims to solve the animal intrusion problem by using a compact, low-power solution based on the MAX78000FTHR development board to classify images and detect the presence of specific animals, such as elephants, in real-time. This solution is particularly useful for rural and forest-adjacent areas with limited access to power and internet connectivity

Impact Statement

  • Overview: Developed a lightweight CNN for efficient, binary image classification.
  • Goal: Designed for low-power devices needing quick, resource-efficient inference.
  • Architecture: Two convolutional layers with pooling, followed by a fully connected layer.
  • Achievements: Balanced simplicity with strong classification performance.
  • Applications: Suitable for edge devices in wildlife monitoring, security, and conservation.

Components Required

Team Members

  • Abinav Balachandar
  • Vasikaran S
  • Sreehari V
  • Sreenath Vijaykumar
     

To see the full demonstration video, click on the YouTube Video below

<

The block-diagram from Fig.1 gives us an idea of how things work in this project.

Block Diagram Representation AI Animal Intrusion Detection Alert System

Fig.1 - Block Diagram representation

Understanding the Image Classification CNN Model :

All the files pertaining to this project can be accessed here.

  • The model starts by extracting low-level features like edges in the first convolutional layer and gradually moves to more complex patterns through additional layers.
  • Max-pooling layers reduce the spatial dimensions, focusing on the most prominent features and reducing the risk of over-fitting.
  • The fully connected layer consolidates the features into a compact representation, which is then used by the output layer to classify the image.
  • The output layer uses Softmax to produce probabilities for the classes, with the final output being the class with the highest probability.
CNN Model of AI Animal Intrusion Detection Alert System

Fig.2 - Image classification CNN model

Once the model is trained using the ai8x-training provided by analog devices we can now use the ai8x-synthesizer to synthesis the C code for our CNN model. This tutorials(1)(2) gives us an very good overview about how to use these tools effectively.

The real-time working of this CNN model can be viewed here.

Dataset Used :

To create a robust training dataset for the CNN model, we combined images from multiple publicly available datasets. This approach allowed us to capture a wide variety of visual scenarios, enhancing the model's ability to classify animals accurately in real-world conditions. Here are the datasets we used:

1.Animals10

Description: This dataset contains images of 10 animal categories. We selectively used images relevant to our task, particularly those that could help the model learn to distinguish elephants from other animals. These additional animal classes acted as non-elephant examples, strengthening the model’s binary classification ability.

2.Sri Lankan Wild Elephant Dataset

Description: This dataset consists of images of wild elephants from Sri Lanka, adding specificity to our model. These images allowed the model to learn the distinct features of elephants, especially in their natural environments, which is beneficial for real-world application in detecting elephants.

3.Thisun’s Elephant Dataset

Description: This dataset provided additional diversity with various poses, lighting, and backgrounds of elephants. Including this dataset improved the model’s robustness and generalization ability to recognize elephants across different settings.

Prototype

Complete Connections of Schematics AI Animal Intrusion Detection Alert System

Fig. 3 - Prototype

Fig. 3 represents our prototype, it consists of the MAX78000FTHR development board, SIM800l GSM module and buck converters for power supply consideration. We also designed a 3D printed enclosure to house all the components & battery into a single unit as represented here (i.e. Fig. 4)

Future scope

The MAX78000FTHR's processing capabilities allow for further enhancements. Future improvements include integrating its onboard MEMS microphone to classify animal sounds for more accurate detection of intruding wildlife. We are in the initial stages of designing an audio classification model to complement the visual model, enhancing detection accuracy in various environmental conditions.

Schematics of Edge AI-Based Animal Intrusion Detection and Alert System

Schematics of Edge AI-Based Animal Intrusion Detection and Alert System

For all the code, follow the GitHub link below:

Edge AI-Based Animal Intrusion Detection and Alert System CodeEdge AI-Based Animal Intrusion Detection and Alert System Zip File

 

 

Have any question realated to this Article?

Ask Our Community Members