Inscrivez-vous maintenant pour un meilleur devis personnalisé!

How I used a Raspberry Pi to automate birdwatching

10 juin 2022 Hi-network.com

One of my suburban wildlife photograpy subjects, a sparrow perching in bamboo.

Image: Simon Bisson

"Don't worry about the microphone hanging out the window," I told a recent house guest. "It's just another of my Raspberry Pi projects."

Living in one of the greener inner suburbs of London, the planes heading into Heathrow aren't the only flying things. Through the worst of the pandemic lockdowns I started a new hobby, documenting the wildlife in the gardens and on the railway cutting behind our home. It's been quite surprising seeing how many different birds and small mammals frequent the large tree and the elderberry thicket at the bottom of the garden, from tiny wrens to the looming presence of the local sparrowhawk.

Raspberry Pi 4 Model B

$64.82 at Amazon

It's a lot easier photographing birds in the winter, when the trees and bushes lose their leaves. But there are many more visitors in the summer, with blackbirds and dunnocks nesting in the shrubs and occasional woodpeckers flitting down the railway lines from the wilder commons and the expanses of the Royal Parks to the west. With the office window open as the days warm up, I can hear them tweeting and chirping, squawking and cooing.

The BirdNET-Pi main screen, showing recently identified birds.

Image: Simon Bisson

Could there be another way to spot them? A friend had pointed me at an iOS app from the Cornell Lab of Ornithology. Merlin is a free bird identification tool that uses both computer vision and computer audio to identify birds, with models that have been trained by bird watchers and ornithologists all over the world. It's a powerful tool for seeing what might be around when all you can hear is a song somewhere in the trees.

Recommends

The best Raspberry Pi kits

Check out which companies are dominating the kit market.

Read now

The audio model that Merlin uses is its own, using a neural net to identify birds from their sounds, analyzing the spectrogram of their calls. It's a standalone model and can be used even when your phone is offline, although that does limit what it can identify to about 700 mainly North American species. If you want to identify more and in more of the world, then you need to take a look at another Cornell project, BirdNET, from its K. Lisa Yang Center for Conservation Bioacoustics.

SEE: The 5 best Raspberry Pi alternatives: Top single board computers

BirdNET is available for mobile devices too, with regional options to download models for different parts of the world. The algorithm and models are public, and various open-source projects have been working to implement them on different systems, often using a version designed for lower power systems, BirdNET-Lite, using the TFLite Tensorflow packages.

TFLite supports many different environments, allowing you to run machine-learning models on surprisingly small devices, including the Raspberry Pi. That's allowed enthusiasts to build an open-source set of tools that turn a Pi into a bird identifying device that's able to sit there 24 hours a day, spotting birds day and night.

I had a spare4GB Pi 4 model B that had been running my ADS-B rig before I upgraded to a CM4, so it was already in a ArgonOne SSD case with a 240GB SSD. I'd recommend using an SSD with technologies like BirdNET as they can write a lot of data to a disk, potentially limiting the life of an SD card.

If you want to build a BirdNET system on a Raspberry Pi, there's an easy enough way to get started, with the BirdNET-Pi project. All you need is a recent Raspberry Pi running a 64-bit version of the Bullseye release of Raspberry Pi OS. I set up my system with the latest Raspberry Pi OS Lite release, which is designed for headless systems and removes the UI components.

Once my system was set up, I used the instructions on the BirdNET-Pi GitHub to download and run the installer. It's a simple script that loads the required packages and configures a Python environment for the BirdNET Lite machine-learning models. The system is designed to take a 15-second sound sample every minute or so, analysing it for bird sounds. The only additional hardware needed is a USB sound card and a microphone, as the Pi's audio port doesn't support a microphone.

Access to BirdNET-Pi is through a web browser, with a built-in live view of its log files and a web-based terminal for system administration. Everything is controlled from a simple console, which can even run system updates. The web console uses the Caddy web server, which is an ideal tool for delivering basic web applications from a Pi or similar, without demanding significant resources. I did have one issue here, as the system is configured to use a .local domain out the box. My network uses a full .co.uk domain, so I had to edit the Caddyfile configuration to use my domain before I could get access to the web UI. This was quick enough, using ssh to log onto my Pi and vi to edit the configuration. A quick reboot and I could see the BirdNET-Pi UI.

Getting the right microphone for your recording setup is important. My first was a simple USB device that worked well enough to show that the system would work, but unfortunately it was the quality you expect for under

tag-icon Tags chauds: Notre processus affaires Internet des objets

Copyright © 2014-2024 Hi-Network.com | HAILIAN TECHNOLOGY CO., LIMITED | All Rights Reserved.