Inspiration

Citizen science efforts are some of the most important ways people can contribute to benefiting the environment. These efforts inspired us to create technology that can help improve these efforts and make them more effective. Prevalent in many states such as Michigan and Alaska, efforts to track bat populations and create manmade roosts (bat boxes) in order to support and keep an eye on bats. Bats are facing large amounts of habitat loss and struggling due to climate change. Simultaneously, bats are a necessary and vital part of the ecosystem as they contribute to curbing insect populations, which can damage farmland and forests. With higher insect populations, farmers tend to use more pesticides and fertilizers, which get swept into our rivers and lakes, causing pollution and harming those ecosystems as well (e.g. Lake Erie’s algae blooms harming wildlife through toxin exposure and oxygen deprivation). While declining bat populations aren’t the only cause of such problems, making a difference where we can is the best thing we can do to help the environment.

What it does

Utilizes telemetry data and computer vision to learn more about optimal bat roosting conditions and allows a user to visualize the roosting data on a website.

How we built it

We used an Amazon box, tape, and scissors to make a mock-up bat box. We then used an Arduino UNO Q running a bat-detection model that we trained ourselves. The model takes in live video from the provided Logitech camera.

For the bat detector, we started from BatNet, an open-source research model that detects bats in infrared camera-trap photos. Because it was designed for infrared cameras, and we didn't have one, we needed to fine-tune it so it could detect bats in normal daylight colour images.

To do that, we kept BatNet's detector (the part that draws a box around each bat) along with everything it had already learned about what bats look like, and retrained it on our own photos. Before training, we installed the GPU version of PyTorch so the work ran on our NVIDIA RTX 4070 laptop GPU instead of the CPU. That took detection from about 2 frames per second to 25 ms per frame, and made each training round take minutes instead of hours.

On the board, the program captures a photo every time it detects a bat, rather than recording video. From there, it sends packets of the information to a real-time Firebase database, which is hosted on our website on Vercel. The website shows the most recent (and past) bat photo alongside live readings from the temperature, humidity, light, and sound sensors that are wired to the board's microcontroller and also being sent through packets.

Challenges we ran into

Technical limitations included damaged hardware, lack of components such as an infrared camera and a supersonic microphone, as well as limited access to tools and durable materials. On the software side, our biggest challenge was that our starting model had never seen a color photo. BatNet was trained on infrared images, so out of the box it found only 1 of 33 bats in our webcam photos and was 89% sure one of our teammates was a bat. We later discovered why: its "bat" detector had been built on top of a person detector. Fixing that took four rounds of retraining, each one aimed at the model's latest mistakes: lights, then people, then crows, eagles, squirrels and mice.

Accomplishments that we're proud of

We're proud that we turned a research model for infrared photos into a working daylight bat detector in one weekend:

  • It went from calling a teammate a bat to ignoring people 96% of the time, and it finds 70% of bats in photos it has never seen.
  • We cut false alarms from 42% to 13%, and blended our two best models into one that keeps the strengths of both.
  • We built a dataset of over 10,000 photos, including 7,936 iNaturalist photos of over 200 North American bat species, with every Michigan observation we could find.
  • We got a model running live on the Arduino UNO Q at about 10 ms per frame, capturing a photo whenever a bat is detected.
  • We combined the AI with real sensor telemetry (temperature, humidity, light, and sound) on a live website.

What we learned

We learned a lot about:

  • troubleshooting an Arduino that runs its own Linux operating system;
  • training a small model that fits on an Arduino with limited memory and processing power;
  • sending telemetry data from an Arduino to a website over Wi-Fi.

What's next for Smart Sustainability Bat Box

We would add motors that automatically open more ventilation in the bat box based on the telemetry data. For example, if the temperature sensor reads that the box is too hot, the motors would activate to open a flap and allow more airflow. We would also:

  • Add an infrared camera and an infrared light, which bats can't see, so the box can watch bats at night, when they're actually active.
  • Add an ultrasonic microphone to record bat echolocation calls, which can help identify species and confirm what the camera sees.
  • Collect real footage from a bat box in Michigan this spring, and fine-tune the model on it so it learns real conditions, not just photos.
  • Teach it Michigan species, like the big brown bat and the little brown bat, so it can name the bats it sees.
  • Count bats in and out over a whole season, and track population trends to share with conservation groups.
  • Weatherproof the box and make it solar-powered, so it can run outdoors on its own.

Built With

Share this project:

Updates

Submission history