CONCEPT
Poaching is a serious concern for the massive fauna of Africa especially the elephants. Elephant tusks are the main reason for elephant poaching. These tusks sell for thousands of dollars and majority of poachers are poverty stricken individuals. Poachers use poisoned arrows or guns to kill elephants. Poachers also hide the tusks they extracted to evade patrols and inspections.
To counter poaching, authorities deploy state of the art animal tracking software and hardware. Triple poaching event flags augments the system already in place to protect Africa's largest fauna.
Triple event poaching flags classifies three separate event simultaneously. These events are: motion, sound, and vision.
When elephants are being hunted, they tend to scatter and run from the poachers. The ML model for motion classifies instances where the elephant is running, suddenly falling, or slowly falling to detect poaching due to the actions of the elephant.
Audio is the hardest data to classify for elephants. Their varied rumbles and trumpet sound are hard to classify in context of the event. This sounds are hard to distinguish if the elephant feels confident, brave, or panicked. Nevertheless, elephant voice are crucial to detect a poaching event. Elephants will produce sounds when in panic or in pain. Though it’s heartbreaking to hear elephants in distress, it will help rescue teams to respond faster. The ML also classifies gun shots for better event classification.
Image classification is also important in detecting poachers and record keeping. Detecting other elephants in proximity means the elephant is safe from poachers. It would be a challenge to detect a poacher if the distance is far for the camera resolution. Detection will be very helpful in catching poachers de-tusking a dead elephant wearing the collar. It might collect evidence in where the tusks are buried for storage.
These machine learning models overlap each other to prevent false alarms generated by each machine learning models. The alarm is raised when two or more event flags are reached. Raising individual poaching event flags can lead to false alarms.
Example: elephants will run (motion) when they hear gunshots (sound).
Event flags has an acknowledgment duration before going back to normal event.
Example: an elephant trips the device indicating that he is crying in pain (audio). Later the elephant falls down quietly (motion) which probably indicates shock from poison arrows.
DATA ACQUISITION
Motion - data gathered for motion comes from cellphone accelerometer uploaded to edge impulse. Labels included are: running, slow lying down, sudden fall.
Audio - audio sample are gather from elephantvoices.org audio sample downloaded are in context of group defense. I did not gather audio samples from different context because it might mess up classification. A brave trumpet sound might mix up with angry trumpet sound.
Vision - images are gathered primarily in the internet. I cleaned the data. Labels are: elephant, human, gun, or arrow.
TESTING
Each model produced favorable results. I believe my dataset was very small but still it was impressive that it can detect accurately
Edge Impulse boast a lot of deployment option but sadly my only rig is a raspberry pi. As I understand, deployment in raspi is done through WebAssembly. I choose the balenacloud way of deploying the raspi.
DEPLOYING RASPI USING BALENACLOUD
1. In the Deployment Section, Create Library in WebAssembly
2. Fork the edgeimpulse/balena-cam-tinyml
3. In your forked repo, replace the WebAssembly build files in edgeimpulse-inference folder with your own files.
4. Press the button “deploy with balena” below your forked repo.
5. to add the device in BalenaCloud, press the add device button then download the BalenaOS
6. Flash the OS to the SD card
7. Turn on your Raspberry Pi
8. Wait for BalenaCloud to update the raspberry pi
9. To check the tiny ml model, go to the IP address of your raspberry pi in the BalenaCloud
FUTURE STEPS
*Deploying three tiny ML models inside one raspberry pi
*Deploying each tiny ML model to 3 microcontroller communicating with each other
Comments