Wild African elephants are some of the most majestic animals to walk the face of the earth. However, their population is in steep decline.To save them we need to understand their behaviour in real-time.Elephants can communicate using very low frequency sounds, with pitches below the range of human hearing. These low-frequency sounds can travel several kilometers, and provide elephants with a "private" communication channel that plays an important role in elephants communication.We will try to understand these sounds using Machine Learning.
ClassificationWe will be Classifying 2 Labels - Conflict and Group Defense Sounds. These Labels are choosen to avoid Elephant in-between-conflicts and to save them from Poachers. And we will be training and Testing them on Edge Impulse.And then we will deploy it on Mobile Phone or SmartParks Elephant Collar, so it can easily save elephants using their sound collected from Phone's Microphone.
I collected all Elephant Sounds from ElephantVoices Database.Only Conflict and Group Defense databases were collected because they were the most important.
These sounds were mp3 files and Edge Impulse supported.wav files, so we need to convert them. I have written simple python script to automatically convert these files. Github Code Link
I have parsed and formatted the file according to Edge Impulse. You can find all files here .
Edge Impulse Overview1. Create Project
2. Dashboard of Edge Impulse
You can download all Elephant Sounds files from above Links in Data Collection, then Extract the FIles and open Data Acquisition Tab in Edge Impulse
1. Select Upload Button in Collected Data Container
2. Then Click on Choose Files Button in Upload Data
3. Select all the files and wait for uploading of files
Edge Impluse contains Impulse Tab to Visually create Machine Learning Models by adding Blocks.
1. Go to Impulse Tab from Sidebar
2. Then add MFCE in Processing Block and Neural Network Keras in Learning Block
Then we must Execute the MFCE block to Process Training Data
3. Go to MFCE Tab from Sidebar
4. Click on Save Parameters in that block
5. Then Click on Generate Features Button to generate and process training data
Then we need to train the Neural Network
6. Go to NN Classifier Tab and Click on Start Training, wait until training is done
We also get the Confusion Matrix after Training of Model and its Accuracy is around 78%.
During Data Acquisition The data is automatically saved in Training and Testing Data.
To Check our Model we use the Model Testing Provided in Model Testing Tab in Edge Impulse.
We get Testing Accuracy of 79%. It is low because we did'nt have enough training data.
Edge Impulse provides a very grat feature to deploy models directly to phones and embedded hardware. We can run these models offlne and test their inference at intervals using Microphone from Phone
1. Connect your phone to Edge Impulse by scanning QR code in Devices Tab.
2. On Phone you will see Switch to Classification mode, press that and classification will start.
We can add more Labels and Data to this model but currently I didn't have access to much data so I didn't do that.
This can help saving Elephants with collar's microphone to detect Fights between ELephants and Poaching Events. Elephants will make sounds during such events and it will alert the Officials.
Trained Model Links:
Comments