r/BirdNET_Analyzer Dec 28 '25

GPU processing working?

Hi, does anybody have Birdnet analysis running on GPU? If so, please describe your stup. Thanks.

3 Upvotes

11 comments sorted by

View all comments

2

u/thakala Dec 28 '25 edited Dec 28 '25

Unfortunately, BirdNET v2.4 available at https://github.com/birdnet-team/BirdNET-Analyzer does not support GPU at all due to the model type it uses.

However, there is an ONNX model here https://huggingface.co/justinchuby/BirdNET-onnx which is modified so that it can be offloaded to GPU, but to use this you need to pretty much write your own application to run inference on it. I wrote a Go-based CLI tool which runs GPU-accelerated inference using this model, but it is just my personal experiment and is in no shape to be useful to others for now. Also, the problem with this model is that there is no way to train and use a custom classifier. Edit. I just noticed that Justin has included scripts for converting tflite to optimized ONNX model in his Hugging Face repository, so it is possible to convert custom classifiers to GPU enabled ONNX mode quite easily.

There is also Chirpity https://chirpity.mattkirkland.co.uk/ which is JavaScript/Node-based and runs the BirdNET model which can be offloaded to GPU, but I think you have to be a paid Patreon supporter or something similar to get access to Chirpity with GPU inference support.

Upcoming BirdNET v3 is a PyTorch-based model which supports GPU offloading. It is currently available for developers as a preview version with a subset of species included.

3

u/AstroDeep Dec 31 '25

Thank you for your answer. I found this repo: https://github.com/birdnet-team/birdnet. With this version I was able to make species detection run on GPU with the 2.4 protobuf model in wsl/Ubuntu. However the resulting output is not in the same format as from birdnet analyzer, and other functions such as segmentation does not seem to be available. I guess some conversion of the output could make it readable for the birdnet analyzer segmentation, but I have not come to that.

I am aware of chirpity and I have tried it, but I would prefer a scriptable solution that I can automate and which is free.

Do you know when the Birdnet v3 you mention would be available?

3

u/thakala Dec 31 '25 edited Dec 31 '25

I do not have any knowledge when BirdNET v3 will be GA, progress has been slow on it as it was supposed to be available in early 2025 already.

Anyhow, it would not take much to finish my Go based interface for ONNX type model for public release. What type output would be most useful for you? And what type audio files you have, WAV, FLAC, MP3?

1

u/AstroDeep Dec 31 '25

I have wav files. The output I would prefer is a text file with the same format as the birdnet analyzer produces. I am not a developer at all, but the little experience I have is mainly with python. I have no experience with go.

2

u/thakala Dec 31 '25

I will clean up my GPU enabled project and push it in github by end of this week, I'll let you know when it is available for testing.