1. OCAU Merchandise is available! Check out our 20th Anniversary Mugs, Classic Logo Shirts and much more! Discussion in this thread.
    Dismiss Notice

BirdNET-Pi

Discussion in 'Other CPUs and chipsets' started by Agg, Mar 8, 2023.

  1. Agg

    Agg Lord of the Pings

    Joined:
    Jun 16, 2001
    Messages:
    35,193
    Location:
    A Reported Post Near You
    This is a fun and pretty simple little project I've been playing with lately. In short, you get a Raspberry Pi with a USB microphone, and stick it somewhere where it can hear the outside world. It listens for birdsong, then identifies the birds it hears and serves up a website with the recordings, stats and info on the birds. You can even listen live to the audio feed and watch a spectrogram of it if you like.

    Project page: https://github.com/mcguirepr89/BirdNET-Pi

    My hardware setup:

    upload_2023-3-8_22-25-5.png

    It's a Raspberry Pi Model 4B 8GB with a $6 USB microphone on it. I originally had my fancy USB condenser mic but it would drop out a bit and was very noisy, so I assume the Pi wasn't driving it properly. The results are noticeably better with the cheapy small mic. I have a heatsink case on the Pi but don't have the fans running because one of them is a bit noisy now. The process to analyse the sound samples is pretty CPU intensive but even on a hot day it seems to cope OK. You are limited in how slow a Pi you can use because it's fairly computationally intensive work. Also it does it all locally, so you could put the Pi out somewhere where there isn't any Wifi (and power it off a suitable USB power bank or something I guess) and then bring it back to civilisation when you want to check the results. I have mine resting on top of a sensor light on the front porch.

    Anyway you just install a vanilla RaspiOS on it, then run this command:

    Code:
    curl -s https://raw.githubusercontent.com/mcguirepr89/BirdNET-Pi/main/newinstaller.sh | bash
    ..and it does all the work for you. You might have to go into audio settings and adjust the gain on the USB mic or even select the right device but it will most likely figure that out for you. Then it serves you a website with the info it has gathered, updated in almost-realtime:

    Main page:

    upload_2023-3-8_22-10-53.png

    Here's a specific bird under the "Best Recordings" section - the photos are from Flickr, you get a free API key from them then enter it into the settings:

    upload_2023-3-8_22-11-46.png

    Stats - the first 3 days are using the big USB condenser mic which didn't work as well as the small cheap USB mic I'm using now:

    upload_2023-3-8_22-34-24.png

    Anyway it's a bit of fun if you have a Pi lying around. If you set it up share the results in this thread!
     
    Last edited: Mar 8, 2023
    juzz86, datfreak, Khanage and 25 others like this.
  2. MUTMAN

    MUTMAN Member

    Joined:
    Jun 27, 2001
    Messages:
    17,863
    Location:
    4558
    very cool. I'd seen this project a little while back in MagPi mag but wasnt in an area that would have captured much of interest.
    but now i've moved a little more rural and nature is at the back door I thought about this project just a couple of weeks ago.
    decent motivation seeing the data you posted, i might set aside some time for one too
    thanks :thumbup:
     
    donnowhy, elvis and Agg like this.
  3. OP
    OP
    Agg

    Agg Lord of the Pings

    Joined:
    Jun 16, 2001
    Messages:
    35,193
    Location:
    A Reported Post Near You
    If you're familiar with Pi it will be a pretty trivial setup. The major blocker for most people right now would be finding a suitable Pi to buy. :)
     
  4. MUTMAN

    MUTMAN Member

    Joined:
    Jun 27, 2001
    Messages:
    17,863
    Location:
    4558
    I have a 1GB pi4 sitting here doing nothing (just moved its services to a docker image on my NAS)
    I'll grab a mic now
     
  5. OP
    OP
    Agg

    Agg Lord of the Pings

    Joined:
    Jun 16, 2001
    Messages:
    35,193
    Location:
    A Reported Post Near You
    I'd be interested to see if 1GB is enough. I have it on an 8GB coz that's what I happen to have here - FYI a PHPSysInfo snapshot:

    upload_2023-3-8_23-5-47.png

    Looks like it will be OK, most of my usage is caching.
     
    modernshoggoth and MUTMAN like this.
  6. MUTMAN

    MUTMAN Member

    Joined:
    Jun 27, 2001
    Messages:
    17,863
    Location:
    4558

    well if it isnt ....


    upload_2023-3-8_22-22-3.png
     
    Agg likes this.
  7. Turbine

    Turbine Member

    Joined:
    Jan 10, 2004
    Messages:
    648
    Location:
    WA
    Jarwedy, MUTMAN, brayway and 2 others like this.
  8. OP
    OP
    Agg

    Agg Lord of the Pings

    Joined:
    Jun 16, 2001
    Messages:
    35,193
    Location:
    A Reported Post Near You
    Nice! Yeah, it's worth noting that BirdNET is a separate thing that already exists, with BirdNET-Pi just being a prepackaged install for RPi. So you could get the same results without needing an RPi, although I think the nice website stuff is from the Pi build.. haven't explored vanilla BirdNET myself so not sure.

    Anyway share your results when you get them. :) I'm not a bird-spotter but it is oddly fascinating seeing what is around. I'd never even heard of an "Eastern Spinebill" but now I know that is the bird we hear almost constantly in the front garden here. Also knowing there is a Powerful Owl around some nights is pretty cool!
     
    Last edited: Mar 9, 2023
    MUTMAN, Turbine and elvis like this.
  9. elvis

    elvis OCAU's most famous and arrogant know-it-all

    Joined:
    Jun 27, 2001
    Messages:
    48,052
    Location:
    Brisbane
    I absolutely love the accessibility of this project. I currently consult to a State Government mob who do a lot of this "edge computing" stuff out in the field for animal spotting and identification. Often it's a massive complex thing of custom hardware, software that needs a lot of machine learning to get right, all sorts of sensors and gear and humans out in paddocks, etc.

    The fact that these smaller "slap a Pi in your back yard and measure stuff" projects exist is both amazing in the whole "how far computing has come" context, but also great that it's getting very close to a project that anyone with a bit of tech experience can have a crack at.

    And best of all, huge ecological benefit. Anyone who does this for fun can contribute incredibly useful data back to researchers, who in turn don't need to waste precious budget trying to get this stuff out in the field in far away locations.

    I've seen some similar projects for environmental sensors (mostly around noise and air pollution, with those two being relatively easy to count on cheap hardware), which feed back in to central databases for excellent quality data collection that keeps individual contributors anonymous. These sorts of community projects are very welcome, and kudos to anyone who donates their time and money to doing some collecting and sharing on any of them.
     
    Dilbery, mAJORD, donnowhy and 3 others like this.
  10. dave_dave_dave

    dave_dave_dave Member

    Joined:
    Mar 17, 2004
    Messages:
    3,013
    Location:
    Gold Coast
    This is actually pretty rad. I've got a spare Pi Zero 2 W and this will be a fun project to setup.
     
    elvis, Turbine and Agg like this.
  11. Turbine

    Turbine Member

    Joined:
    Jan 10, 2004
    Messages:
    648
    Location:
    WA
    I kinda went down a similar install to running a pihole in Hyper-V on an x86 machine.
    (I'm very much a linux noob and fumble my way through this stuff)

    Firstly following this guide up to the pihole parts to get a VM going.
    First username has to be 'pi' for later reasons. https://www.c-amie.co.uk/technical/installing-pi-hole-in-debian-under-hyper-v/
    Then had all sorts of errors installing BirdNET-Pi because it wants an ARM64 platform.
    But thankfully found a workaround that was easy for me to follow. https://github.com/mcguirepr89/BirdNET-Pi/discussions/251#discussioncomment-4981672

    Enabled a low video quality RTSPS stream on a Ubiquiti camera.
    Changed the RTSPS url to RTSP https://community.ui.com/questions/...-exactly/ace5d757-75a4-499f-a809-093ceb728203

    Now up and running!

    EDIT: FYI dont use the update button from within the BirdNET-PI web interface it will break everything. Recommend having a checkpoint once the fresh install is working.
     
    Last edited: Mar 20, 2023
    dave_dave_dave, MUTMAN and Agg like this.
  12. OP
    OP
    Agg

    Agg Lord of the Pings

    Joined:
    Jun 16, 2001
    Messages:
    35,193
    Location:
    A Reported Post Near You
    Aww man, I thought Pied Currawong was in with a chance of beating Eastern Spinebill today but from 1pm old spiney has been smashing it. :)

    upload_2023-3-9_13-40-12.png
     
    donnowhy, elvis, MUTMAN and 1 other person like this.
  13. BistecConBigote

    BistecConBigote Member

    Joined:
    Jun 21, 2013
    Messages:
    636
    Surprised not to see any Noisy Miners.
     
    MUTMAN and barywhite like this.
  14. kieran

    kieran Member

    Joined:
    Aug 27, 2003
    Messages:
    242
    Location:
    Melbourne
    I want to see if it can detect a Lyrebird
     
    dillusional, MUTMAN and elvis like this.
  15. MUTMAN

    MUTMAN Member

    Joined:
    Jun 27, 2001
    Messages:
    17,863
    Location:
    4558

    What was old spineys final count for the day ?
     
  16. OP
    OP
    Agg

    Agg Lord of the Pings

    Joined:
    Jun 16, 2001
    Messages:
    35,193
    Location:
    A Reported Post Near You
    A late resurgence by the Pied Currawong but old spiney won again.

    upload_2023-3-9_23-16-36.png

    But the Powerful Owl is back!
     
    elvis and MUTMAN like this.
  17. Franc

    Franc Member

    Joined:
    Jul 10, 2003
    Messages:
    5,617
    Location:
    Treehouse
    Love this project - we have a quite a few birds around and would be nice to see what they are. Still feel guilty about cutting down the fir trees, as used to have tons more, but they were ruining the yard.

    This is where my Dragons hoard of Pi's come in handy I use for various projects- Installed, just waiting a suitable mic to arrive.

    NB follow guide here to install, you need to install 64 bit os rather than any distro

    https://github.com/mcguirepr89/BirdNET-Pi/wiki/Installation-Guide
     
    Last edited: Mar 10, 2023
    MUTMAN likes this.
  18. Current

    Current Member

    Joined:
    Aug 10, 2021
    Messages:
    2,573
    This is really cool.

    Can it work on any raspberry pi ? I think I have a 3b here somewhere.
     
  19. dave_dave_dave

    dave_dave_dave Member

    Joined:
    Mar 17, 2004
    Messages:
    3,013
    Location:
    Gold Coast
    I'm wondering the same. I'm just waiting on a few bits and pieces to show up to try it out. I'm going to try using a Zero 2 W which is about the same power as the 3, so i guess we'll find out.


    Agg, any chance of a resource usage (possibly htop) screen shot when its doing its thing, so we can get an idea on hardware requirements?
     
  20. MUTMAN

    MUTMAN Member

    Joined:
    Jun 27, 2001
    Messages:
    17,863
    Location:
    4558
    Not htop but has the info

    The 512 ram might be the biggest hurdle to the resources
     
    dave_dave_dave likes this.

Share This Page

Advertisement: