"Marvellous," he said. "Absolutely marvellous"

Automated bird detection with a Raspberry Pi – getting started

18 July 2022

I read about a Raspberry Pi implementation of BirdNET on Hacker News and immediately wanted one for our garden.

BirdNET is a neural net algorithm trained to identity bird species. I worked on a spectacuarly unsuccessful neural network as part of my degree, and so am always keen to find one that actually works.

I love this software! Everybody’s life would be enhanced with one of these running, so I’ve decided to write up my experience in three parts:

Kit

BirdNET-Pi is a fantastic implementation of BirdNET for the Raspberry Pi by Patrick McGuire. It wraps the neural net inside an application that records, analyses and presents back the results 24/7, all in a nice web UI.

It will run on a Pi 4B, Pi 3B+, or a Raspberry Pi 0W2 so long as they are running the 64bit Lite version of Pi OS.

My first problem was finding a Raspberry Pi – I’ve never used one before directly, but given their cheap cost and easy availability there was a low barrier to entry… right? Wrong. Availability is massively constrained across all models; I ordered one online but my retailer gave an updated delivery date of Q1 2023. eBay came to the rescue and I acquired a Zero 2W for a reasonable mark-up.

Along with an official power supply and an existing micro SD card, I needed a way to collect the sound. Some research let to a UGreen USB sound card, and a AGPTEK lavalier microphone. The Pi and sound card are mounted internally:

And the microphone then runs externally via the rubber window seal to sit protected under the eaves and over the garden. It came with a handy fur cover to minimise wind noise:

Installing BirdNET-Pi

Flashing the micro-Sd card with Pi OS Lite 64-bit was dead easy, but I wanted to be able to administer the Pi remotely without needing a mouse/keyboard.

This needed a bit of jiggery-pokery to ensure that wifi and SSH were enabled – here’s a neat method thay involves dropping two simple text files onto the SD card. I then used the Android app JuiceSSHM to run commands remotely without needing to plug in a mouse/keyboard. All very clever.

This allowed me to trigger the install and initial boot of BirdNET-Pi. On the Zero 2 W this took quite a while, and once running it was clearly pretty slow. I’d neglected to read Patrick’s comments that explained while theoretically functional, the Zero 2 W really isn’t capable of being responsive while running all the apps. See part 2 for my upgrade path.