Software apps and online services
Hand tools and fabrication machines
TinyML presents a world of possibilities when it comes to addressing global climate change (GCC). Illegal deforestation of precious rainforests has long been a significant challenge for GCC warriors, with so much area to monitor for poaching and so few resources with which to do it. The "Rainforest Shield" uses TinyML audio classification to identify noise arising from human activities in the rainforest, and can point enforcement officials to specific spots before an illegal operation can do too much damage. The low-cost, low-energy nature of TinyML hardware makes it ideal for broad deployment in remote regions.
The Rainforest Shield proof-of-concept is developed using the QuickFeather dev kit to both capture audio samples for the TinyML model (using the SensiML Data Capture Lab) and for deployment of the resulting model. The SensiML Analytics Studio is used for constructing and testing the TinyML model for audio classification.
(Note: The SensiML Toolkit documentation provides guidance for installing and using the Data Collection Lab and Analytics Studio that are used for this project. Refer to that documentation for additional detail on the DCL process.)
Download the binary file for audio data capture from the SensiML documentation link for the QuickFeather device and follow the tutorial to install it. Capture sample data to get samples of ambient and chainsaw audio using the configuration settings shown below.
Once adequate samples have been captured, switch to Project Explorer in the DCL to add labels - ambient or chainsaw - to the audio sample segments.
After using DCL to capture a workable amount of ambient and chainsaw audio samples and adding the requisite labels, the audio files are uploaded to the SensiML Analytics Studio for data prep and modeling. Below are the sample audio segments retrieved from the DCL audio files.
Once the data query results appear reasonable, a pipeline is built in the Build Model section of the Analytics Studio. For a first pass, accept the defaults provided and let the Studio build the model. If the first pass isn't satisfactory, the Studio allows Advanced Settings that can be used to iterate on the process until adequate results are achieved.
The "Explore Model" section of the Studio provides tools for evaluating which version of the model best suits the current need. For example, the Confusion Matrix below confirms the adequacy of the trained model. Some of the ambient segments overlapped the chainsaw segments, which could explain some of the discrepancies in the matrix. Future iterations could include better definition between segments, along with more ambient audio samples to improve the model.
Once the model is ready, the next step is to create a Knowledge Pack that can be deployed back to the QuickFeather for inference in the wild. In the "Download Model" section of the Studio, confirm the desired settings for the deployment package and select "Download". (Again, refer to the SensiML documentation for details on the different configuration options.)
Note the classification map: 1 = ambient, 2 = chainsaw
Once deployed to the QuickFeather, launch a terminal window and monitor the classification parameter value. For ambient sound, the value is 1:
When the RFShield identifies a chainsaw, the classification value changes to 2:
This RFShield POC demonstrates the feasibility of 1) using the QuickFeather platform to collect training and test data, 2) using the SensiML toolkit for building and testing the TinyML model, and 3) using the deploy model on the QuickFeather to monitor the environment for chainsaw sound. For future iterations, below are a few ideas for next features to develop:
We will need to assess how long the RFShield will last on battery power, or if solar charging will be need. Also look we'll want to look at minimizing power consumption, including sleep cycles and use of a custom, stripped-down board for further minimizing power usage.
2. Data Transfer
We will also need to look at practical communication protocols for sending anomaly alerts to authorities over large distances, perhaps cellular or LoRa.
3. Extend the Model
Having an armada of audio sensors deployed in the rainforest opens up the opportunity to expand the scope of wildlife protection beyond looking for illegal logging. Classifying animal sounds can help biologists understand migratory patterns, for example, and day/night behaviors. The rapid, unexpected sounds of flight might also be used to detect human presence in the rainforest before the first chainsaw can be fired up.
4. Hardening & Deployment
The RF Shield hardware needs to be easy to deploy in the wild and robust enough to be protected from the elements, including animal interference. Current deployment methods involving manual attachment tree-by-tree are slow, labor intensive and inherently dangerous. There is a better way to do this in order to broaden the umbrella. We need to figure out what that is.
5. Environment Impact
Of course we also have to consider the impact on the environment of having thousands of RFShield devices deployed in a rainforest. Can they be built in a way that allows natural, non-toxic decay? Or do we need a way to retrieve them after their useful life has passed? We also need to make sure the devices don't harm any of the flora or fauna while deployed, like if a Howler monkey tries to eat one of them.Other Resources
Final Note: While researching background information for this project, it turns out there are a number of organizations out there already working on the issue of illegal logging. Of note is Rainforest Connection, which deploys ML software on upcycled smartphones powered by solar panels to strategic spots in multiples forests around the world. They have collected vast datasets of rainforest sounds, not just chainsaw noise. In addition to quickly pinpointing illegal lumber poaching operations, their audio datasets are helping environmentalists of all stripes to more deeply study animal behaviors in the wild through bio-acoustics.
WildLabs is another organization a doing advanced work in conservation technology. TinyML will be a big boost for these kinds of efforts, allowing broader coverage for lower cost with better results.