Replies: 32 comments 137 replies
-
Hello! Sorry for the late reply -- The first thing that came to mind for me was the great work going on with @audevuilli's https://github.com/audevuilli/shazam4bb you may consider reaching out to Aude there for ideas on implementation. Perhaps also you may find something of interest in this conversation 🦇 Please keep us updated on your progress getting bats into the BirdNET-Pi cave! |
Beta Was this translation helpful? Give feedback.
-
Hi @VDierks did you get anywhere with progressing this idea? |
Beta Was this translation helpful? Give feedback.
-
}\^-,-^/{ Original: 2022-09-10_21.37.05.mp4Pitch-shifted 2022-09-10_21.37.05.pitch-shifted.mp4 |
Beta Was this translation helpful? Give feedback.
-
@mcguirepr89 this is so cool! Well done you! is the model identifying? T |
Beta Was this translation helpful? Give feedback.
-
My post here is a bit off-topic. I just want to share my mind with you all about bats. I have seen a very captivating documentary on the technique bats are using to "see" their environment. Changing frequency of their pulsing signal when moving their head, to be able to discriminate the different reflections coming back. It is a stunning animal. I also learned that they possibly not see surfaces that are too planar, because there are no signal reflection coming back to their ears. |
Beta Was this translation helpful? Give feedback.
-
I wanted to share that I have the beginnings (only testing in my region on the bats outside my window) of a pretty cool new little feature for BirdNET-Pi and folks with access to an ultra-sonic microphone. The new feature is a live stream of the bats -- for folks able to check out my beta installation, you'll be able to listen to my bats live https://newbnp.birdnetpi.com |
Beta Was this translation helpful? Give feedback.
-
You can set triggered recording so that it will only save a recording when there is something worth analysing. This has been a godsend for me as I can then put detectors out for weeks instead of days. |
Beta Was this translation helpful? Give feedback.
-
I've been having similar thoughts - it'd be cool to switch the Pi to 'bat mode' once the birds have gone to bed. I'd be happy to be involved in training up a TF model if any chiropterologists out there know of a good source of labelled bat recordings? |
Beta Was this translation helpful? Give feedback.
-
Hi BirdNET-Pi team, first of all thank you for your great project! My family enjoys the BirdNET-Pi very much. In order to cover bats I currently see the following options
Of course I would honor the License terms in all this and preferentially provide pull requests to the respective projects. Let me know. |
Beta Was this translation helpful? Give feedback.
-
I have done some tests of frequency shifting for batt sounds with Patrick
one year ago.
The goal of the test was to shift down sounds recorded from bats.
In order to keep the sound quality for the automatic recognition, we had to
use a numpy script for the freq shifting process, which was quite resources
hungry.
I had a RPI3 at that time, and the computation process took about 30s for a
wav file chunk.
Now, on my RPI4, it takes about 5s for the shift.
It is important that we keep compatibility with all RPI versions, because
every people does not own a RPI4.
I am not sure that it is a good idea to introduce bats into the classifier,
because it will consume a lot of resources on every RPI, and it will be
only used by fews.
What is your opinion?
Le mer. 26 juil. 2023 à 18:01, rdz-oss ***@***.***> a écrit :
… Hi BirdNet-Pi team,
first of all thank you for your great project! My family enjoys the
BirdNet-Pi very much.
As I am also interested in bats I have checked the code to see what
options there are to extend the functionality to cover bats also. I work as
a cloud solution architect and could provide pull requests to your projects
if you are open to that in general.
In order to cover bats I currently see the following options
-
Extend the BirdNet-Pi system to make the sampling rate a configurable
variable. It currently is set to 48000 Hz. Sampling for bats would need
twice the frequency that the call on, so for a 60000 Hz call that would be
at least 120000Hz. I think I could make the necessary modifications in the
code and provide a pull request. The only thing this would do is to make
the sampling rate a configurable variable. I have a hardware setup that
already works and can record both birds and bats in principal.
-
The classifier from BirdNet-Analyzer is trained on data sampled to
48000Hz. This is fine for many animals and birds, but would only allow to
detect bats and insects to max 24000Hz. So the Network would have to be
adjusted to use say 125000 Hz.
There are a few options here:
- If the BirdNet Lite team would agree, one could try to 'upsample' the training data for birds and
add some for bats. The performance would need to be validated, but this could work.
- Alternatively, the bat calls could be shifted into the audible range and then resampled
at 48000Hz. For training and live analysis. This would additionally require a custom modification
to the BirdNET-Pi system.
- I could make a version of BirdNET Lite that operates on 125kHz. The training data would not be available to me (for birds),
but I could gather some for bats and birds from different sources and train a network myself.
This could then be plugged into the prepared BirdNET-Pi version (adjusting the sampling frequency to 125 kHz).
BirdNET-Pi would then either operate as is with 48000Hz set or be used as a bat detector with alternative classifier and 125kHz..
Of course I would honor the License terms in all this and preferentially
provide pull requests to the respective projects.
What do you think? Which version might work for you? Perhaps you have
other ideas?
Let me know.
Best regards,
Richard
—
Reply to this email directly, view it on GitHub
<#300 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANRFSITHBLJYOEWP6YJBW3XSE5PLANCNFSM5WSADX5Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
If we allow users to configure the sampling frequency, then the recognition
model must follow and be compatible.
Right? The whole chain must be coherent
Le jeu. 27 juil. 2023 à 14:15, rdz-oss ***@***.***> a écrit :
… Thank you for the Info!
I can see the point about maintaining compatibility with existing setups.
Although it would be desirable/preferable to have one system that can do
both, it might be the most pragmatic way to separate ultrasound from non
ultrasound based detection.
This would still leave the question if the systems should be separate or
if one would make BirdNET-Pi configurable for either birds - as is - or
bats/insects etc. For bats, one would need to set the sampling frequency to
a higher rate (say 125kHz or more) and use a new/different classifier.
- I could develop the ability to set the frequency as needed into
BirdNET-Pi and provide the necessary pull request. This should not be a
burden on the BirdNET-Pi system in any way. It would keep the system as the
main development branch for both purposes also in the future. Regular
BrdNET-Pi users would not even notice.
- Then, if I get enough samples for bats, I can train a network e.g.
based on BirdNet to recognize them. This would also need to operate on the
higher frequency for training and detection, but that should be possible if
I can get my hands on enough data. This can be an OSS effort also.
- The hardware setup is straight forward and the necessary ultrasound
microphones are already working with the RasPi, at least in my setup which
could serve as a template.
If somebody else would like to do any of this, of course welcome as this
is in my spare time and not done to generate money :)
But I can set out and try it in about that order. My current feeling is
this can work - depending on the quality of the classifier. If a classifier
were to be used that does not have the BirdNET interface it would require
more changes.
It hinges on the question:
Would the BirdNET-Pi team be open to making the sampling frequency a
configurable variable?
—
Reply to this email directly, view it on GitHub
<#300 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANRFSMV47SGVXMUL4FMQV3XSJLVVANCNFSM5WSADX5Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Thank you for the link! I checked the repo and it appears they are using pyTorch rather than tensorflow for the ANN part. I will look into it when I have some more time. Such a classifier can be hidden behind an API and then used in a common way. For BirdNET-Pi that would probably also require a custom adapter for integration. Can you help out with some data sources? |
Beta Was this translation helpful? Give feedback.
-
A good evening to everyone! I have good results from cross training BirdNET-Analyzer for bats! Test the classifier here, if you like: https://github.com/rdz-oss/BattyBirdNET-Analyzer |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
The classifiers for Europe are uploaded! Otherwise, have fun using the new bat sound classifiers! |
Beta Was this translation helpful? Give feedback.
-
I have done an installation in Raspberry Pi OS without any problems, but when running the analysis command I'm getting the following:
I hope you can find out whats wrong. Thanks! |
Beta Was this translation helpful? Give feedback.
-
It is fun to compare the results with what the app from wildlife acoustics said when recording. The results tend to be more detailed - myotis myotis and pipistrellus pipistrellus fly at the same location and are segmented in a plausible way by the BattyBirdNET. It would be good to make a list of interesting features and prioritize soon.
Maybe there are people who would assemble the data in the right way for ChiroVox East Asia or work on the GUI? |
Beta Was this translation helpful? Give feedback.
-
Something about my analysis seems very strange. The recordings I made at night show six species of which only two should be in the area. I have compared it to a professional inventory that was done just a couple of years ago in my area, just a few hundred meters away. Confidence value is set to 0.7. I got lots of finds of Rhinolophus ferrumequinum, a species that used to be found in southern Europe and Asia, not in Sweden. Confidence value was in most cases 1.0 or just below. I then tried to make recordings around lunch when no bats are supposed to be outside and even then got lots of finds, plus two more species. Has anyone else here made the same observations and what can be done about the problem? I hope it can be solved in a simple way. |
Beta Was this translation helpful? Give feedback.
-
NEW: REST API server.py of BattyBirdNET-Analyzer (not Pi yet) now works for bats! https://github.com/rdz-oss/BattyBirdNET-Analyzer You can start an API service to analyze your bat calls locally or remotely. You can use it start a web based analysis service for bats or for integrating into other systems such as a BirdNET-Pi running on 144kHz (I intend to provide an out of the box solution for that in the next weeks). python3 server.py --area EU e.g. using the client.py or from your remote/local application python3 client.py --i path/to/audio.wav which yields a reply such as Requesting analysis for test_data/EU/Kuhls-pipistrelle-Pipistrellus_kuhlii_Ski0145_S2_From1152515ms_To1170806ms.wav
Response: {"msg": "success", "results": [["Pipistrellus kuhlii_Kuhls pipistrelle", 0.9276], ["Myotis capaccinii_Long-fingered bat", 0.00125], ["Myotis dasycneme_Pond bat", 0.0004], ["Nyctalus leisleri_Lesser noctule", 0.0002], ["Pipistrellus nathusii_Nathusius pipistrelle", 0.0001]]}, Time: 0.1159s |
Beta Was this translation helpful? Give feedback.
-
just to understand, you are recording off-line, and you do the
classification later ?
What tool do you use for classifying ?
It is not yet Birdnet-pi ?
Le jeu. 17 août 2023 à 20:14, Svardsten53 ***@***.***> a
écrit :
… This morning I went to the forest to retrieve my recorder and have
analyzed some files. Everything seems to be working very well and two
species have been found by the program - Myotis nattereri and Pipistrellus
pygmaeus.
I also managed to segment and create spectrograms. I show one which
according to the program is a Pipistrellus pygmaeus.
[image: 0 837_101_test2]
<https://user-images.githubusercontent.com/62435779/261398250-4d9887a5-3dc1-4956-b1d3-7681989f7563.png>
In a few days I will try to make recordings in another location at an old
castle with large open fields near water.
Is it possible to add an exclusion list similar to the one found in
BirdNET-Pi? It would help to be sure that unlikely species are not included
in the results.
—
Reply to this email directly, view it on GitHub
<#300 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANRFSMVXANOFCLTNBV7WVLXVZNRDANCNFSM5WSADX5Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Done, in a very rough and ready way:
This plugs into my docker stuff, you run it instead of |
Beta Was this translation helpful? Give feedback.
-
Hi! I just discovered this discussion and I am very impressed by this bat detection stuff! However, there are a few things that appear to me as important suggestions for you in order to make a bat classifier work properly and make it reliable. (My background is in biology and I have worked many years in bat classification for nature conservation work in Central Europe).
So, to sum up:
Best regards, Frank Dziock DD4WH |
Beta Was this translation helpful? Give feedback.
-
My own coding contributions to Birdnet-Pi were mainly to introduce a new
shifting frequency feature, to allow the user to hear birds songs initially
too high in frequency.
As I don't hear myself upper than 7KHz, I was very motivated. A lot of
birds produce sounds up to 12KHz and more.
This feature is now accessible for off-line MP3 or WAV files, there is a
button to shift freq, but also now for real-time audio listening.
I wonder if the two ways I proposed the freq shifting (sox and ffmpeg)
could be compatible with such very high frequencies produced by bats.
I had a discussion with Patrick McGuire on this list about frequency
shiftings of bats WAV files.
I think it would be of interest that a user could hear bats songs.
If you are interested in this new feature for bats as well, I am available
to adapt my code for it.
If yes, could you send me some WAV files (2s chunks, for limiting size) by
mail, so I could try some python code on it ?
Le mar. 22 août 2023 à 21:18, Dr. Richard Zinck ***@***.***>
a écrit :
… Segmentation and mel spectrograms available
You can get segmented .wav files by species with a spectrogram plot (if
you install sox) by using e.g.
python3 bat_ident.py --area USA --spectrum on
Substitute USA for your regional choice .
The spectrograms can help you to better asses if the classifier is likely
right - or perhaps off.
I will provide classifiers for 288kHz also in maybe two weeks.
Sample spectrogram that is generated and classified as northern bat (what
do you think?)
[image: 0 987_2_EPTNIL_20230526_001811]
<https://user-images.githubusercontent.com/63958211/262459994-85134976-a467-41ca-8642-41a7144beae0.png>
—
Reply to this email directly, view it on GitHub
<#300 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANRFSMZZCVPAADPGGFEWETXWUAY3ANCNFSM5WSADX5Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Check out the online demo for small files ( a few seconds of bat calls) now on huggingface.co: |
Beta Was this translation helpful? Give feedback.
-
Help appreciated to fill up the data gaps! Hi - I would like to tell you a bit about what is happening. I am back at data engineering. Thank you @Inachis for the data from the UK you sent me! However, the training data is currently heavily imbalanced among species. Please consider helping if you have data for the species with less than 100 samples (see plot. The common pipistrelle is not in the plot as there are already 1600 samples). I would then point you towards an SFTP server where you could upload your data. The classifiers will only be as good as the data ! If you can help, please consider doing so. If a data donor agrees, I would add some (depending on quality etc.) of your donated bat call data to the training set under the non commercial license that e.g. also BirdNEt-Pi is under: http://creativecommons.org/licenses/by-nc-sa/4.0/ I post that also in the repository of BattyBirdNET-Analyer where I cross train the BirdNET to identify bats. This license prohibits commercial use. I personally have no commercial interest in this endeavor - for me, I am curious and know how to do these things (ML and system development) so I decided to go ahead and try. This license is also what the other data I assemble is under. This way, there should be legal clarity on the matter. So, even if some third party would use it, they would be bound by the terms of this license. For example, if some researcher or other open source initiative were to use the data in training, they would have to adhere to the above license. Reuse of the data by others would actually be really cool because it would mean that more open source, non commercial work would be done on the topic. Only with good data will there also be good non commercial, open source classifiers for all. |
Beta Was this translation helpful? Give feedback.
-
INFO on integration of BattyBirdNET-Analyzer to a PI To everyone interested in getting a BirdNET-PI for bats: I am making progress on the integration of the BattyBirdNET into a test system.
Then, in principle, it should work. As I am working on this on the weekends while the kids jump around process is slow but steady. https://github.com/rdz-oss/BattyBirdNET-Pi BR |
Beta Was this translation helpful? Give feedback.
-
This is fascinating and great work. |
Beta Was this translation helpful? Give feedback.
-
hello Richard,
you did verify that the frequency shifting as it was implemented with
ffmpeg is working well ?
The script that i sent to you (and this thread) was implementing a more
reliable way by first using a hipass filter and then shifting the high freq
content to audible frequencies.
I am not convinced that ffmpeg shifting process is compatible with batts
very high freq contents
Le sam. 14 oct. 2023 à 20:55, Dr. Richard Zinck ***@***.***>
a écrit :
… Hi @croisez <https://github.com/croisez> I integrated the classifier into
BattyBitdNET-Pi. The frequency shift mechanism viavffmpeg works like in
BirdNETz- Pi you can eg set a mapping from 40000 hertz to 4000.
—
Reply to this email directly, view it on GitHub
<#300 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AANRFSN3UH72ST5NT7ZAYLLX7LNZDAVCNFSM5WSADX52U5DIOJSWCZC7NNSXTOKENFZWG5LTONUW63SDN5WW2ZLOOQ5TOMRYGIYTEMY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Works for bats AND birds now: https://github.com/rdz-oss/BattyBirdNET-Pi |
Beta Was this translation helpful? Give feedback.
-
Hi,
i'm using an AudioMoth as my USB-Microphone, which ist capable of recording sounds in the ultrasonic range.
The analysis of bat-recordings is quite time consuming, because most recorded files contain no calls or long periods without calls.
My idea is to add an ultrasonic-option to BirdNET-pi, that stores sound-files with time-stamp to a seperate folder, when the microphone detects events above 18kHz . Automated bat identification would be a nice feature.
Beta Was this translation helpful? Give feedback.
All reactions