[Roland Meertens] has a bat detector, or rather, he has a device that can record ultrasound – the type of sound that bats use to echolocate. What he wants is a bat detector. When he discovered bats living behind his house, he set to work creating a program that would use his recorder to detect when bats were around.
[Roland]’s workflow consists of breaking up a recording from his backyard into one second clips, loading them in to a Python program and running some machine learning code to determine whether the clip is a recording of a bat or not and using this to determine the number of bats flying around. He uses several Python libraries to do this including Tensorflow and LibROSA.
The Python code breaks each one second clip into twenty-two parts. For each part, he determines the max, min, mean, standard deviation, and max-min of the sample – if multiple parts of the signal have certain features (such as a high standard deviation), then the software has detected a bat call. Armed with this, [Roland] turned his head to the machine learning so that he could offload the work of detecting the bats. Again, he turned to Python and the Keras library.
With a 95% success rate, [Roland] now has a bat detector! One that works pretty well, too. For more on detecting bats and machine learning, check out the bat detector in this list of ultrasonic projects and check out this IDE for working with Tensorflow and machine learning.
12 thoughts on “We Should Stop Here, It’s Bat Country!”
Anyone having problems playing the sounds straight from the webpage? I had to download to listen.
I made a bat detector: had to dead-bug the opamp but it appears to work.
Shame that the board corroded, when it got to the summer it was virtually a mass of dust and unusable parts.
Aw, I hate when that happens to me. I’ve sworn off alkaline batteries for that very reason.
the problem with some “bat-detectors” you can buy for cheap is that they don’t cover the whole frequency range needed to find the various bat types (that also have different flight heights and times-of-start). Around here we have at least 3-4 different types that signal at frequencies quite distant to one another – at least 2 kinds are flying at roughly the same time, so the freq range has to be quite wide to get both kinds captured.
Also, when you HEAR the knack-knack, you usually have about 1 second until you SEE the bat that sent it. Not much time to do sound conversion/neural networking, considering that you, the human delay factor, need some time to switch from hearing to seeing.
I have a bat detector which does not distinguish between many bats who echo locate on similar frequencies. Can you think of a solution?
I toyed around with this years ago but then realized that the best way to achieve bat detection was to just watch my cat, Mitchell.
So why does he want to detect bats? They’re pretty easy to spot visually.
Perhaps just for the heck of it? New to this site? Why does anybody do anything at all? Seems like a fun project.
One day I plan to buy some land and when I do one of the first things I’ll do is build some bat boxes to help reduce insect population.
Establishing a bat colony in an area can be a bit of a challenge as they are very selective in where they roost and having a detector that can count the population would be handy for tracking your progress and if any recent changes have affected that population.
Na na na na na na na na na na na na na na na na Bat Detector!
(Sorry. I had to do it.)
Maybe Us Embassy in Havana would be a tester/customer…
Please be kind and respectful to help make the comments section excellent. (Comment Policy)