2024 Project Updates
Shane Andres
Overview
This past year, we have been working towards the creation of a ML audio classifier that can predict what stressors a bee colony is undergoing – like missing their queen, or having varroa mites. Through a collaboration with the university’s Robinson Lab, we got to collect data in two short term deployments. Using that data, we created a binary classification model that can tell between disturbed (angry) and undisturbed (calm) colonies with 90% accuracy. In the future we are planning to investigate more methods for feature extraction and models that are able to capture time dependencies in data.
Spring 2024
Before the spring 2024 semester began, I learned from Professor Schmitz that beekeepers don’t always open up a hive box when they need to check in on their bees. If you knock on a hive box and listen, the type of sound that the agitated bees makes is a pretty good indicator of how they are doing. We decided to explore how an automatic monitoring system might be able to take advantage of that effect. For the semester, we focused on building a test rig that could be programmed to knock on hives, and using collected data to build a ML model. By the end of the fall semester, our goal was to train a binary classifier that can tell whether a clip of audio is from before or after knocking on a hive. Once we get more data and more experience with developing models we plan to build a classifier that can recognize specific hive stressors.
We are very grateful for the help of the university’s Robinson Lab! In April, we reached out to the lab hoping to deploy our recording setup on a hive. On top of allowing us to work with their colonies, they also gave us lots of practical advice on beekeeping. None of us on the audio team have a background working with bees, and it has been great to learn how it’s done.
Prior to deploying at the bee lab, we built out the necessary hardware for the project. Our setup consists of a Raspberry Pi connected to four microphones, one mounted in each corner of a hive box. A stepper motor is attached to the side of a hive box with a wooden swing arm capable of producing loud knocks. We wanted to get the most amount of data possible, but knocking on a hive is known to cause a queen bee to stop laying brood for up to 1 hour. After talking with the lab, we decided to program the device to knock on the hive every 1-2 hours. We randomized the interval between knocks to minimize the risk of desensitization.
From May 3rd to May 8th, we deployed our device on one of the lab’s hives located inside their warm shed. Through the winter / spring, the lab will keep some hives in the shed to prevent them from going dormant. The bees are fed by the lab workers, since there is no nectar or pollen for them to forage at that time of year. Inside of the warm shed is a fan to keep air circulating.
Left: The hive entrance Right: Installing our hardware
The particular hive we worked with was a friendly one, and on the smaller side. Because of that, the response of the hive to our knocks was relatively small and difficult to hear. On top of that, the fan largely drowned out the sound of the bees. We got 76 recordings from the first deployment, containing audio from the hive just before and just after knocking, but the data turned out to be very noisy. This first deployment wrapped up at the end of the semester.
Fall 2024
At the beginning of the fall semester, we began working on a MLP classification model using PyTorch to analyze the audio data we collected earlier in the year. Our models were struggling with the data because of the fan in the shed, and it is difficult for even a human to distinguish between the sound of the hive from before and after knocking. At the same time, we began preparing our recording device for another deployment at the Robinson Lab.
From November 6th to November 12th, we deployed on a different hive at the lab. This time, we worked with a much larger, louder, and more aggressive hive. The colony was stationed outside, where there was much less ambient noise. At the time of deployment, temperatures were dropping and the lab was getting ready to move the colony into the warm shed. Bees avoid the cold, so the temperature probably also contributed to how aggressively the colony acted. Using the same time interval between knocks, we collected 99 recordings.
For the remainder of the semester, we continued working on a binary classification model using the new data. We used an FFT for feature extraction and found that a logistic regression model outperformed MLP deep nets. With this model, we were able to achieve a maximum of 90% validation accuracy.
Future Work
In the near future, we plan to explore more sophisticated means of feature extraction. We are especially interested in methods that will capture time dependencies of the data, such as with a spectrogram. We also plan to explore models like RNNs that will take advantage of those dependencies. During the spring 2025 semester, we are hoping to continue deploying at the Robinson Lab. If we are able to record audio from a variety of hives, we plan to create a large dataset labeled with colony attributes and health issues.
We would like to thank Rachel and Zainab at the Robinson Lab! Rachel has been a huge supporter of Wagglenet, and we are grateful to work with her.