DrCoffey / DeepSqueak

DeepSqueak v3: Using Machine Vision to Accelerate Bioacoustics Research
BSD 3-Clause "New" or "Revised" License
373 stars 89 forks source link

Output files not reporting accurate High Frequency values #206

Open escobari opened 1 year ago

escobari commented 1 year ago

This is the first time I am analyzing USVs from rat pups. All of the animals we have recorded from emit two component USVs with distinct subtypes, which appear around 40 kHz and 80 kHz (see attached example image). The issue we are running into is that DeepSqueak only seems to recognize one component of the two-component signal (typically the lower frequency USV). When we export the data, the High Freq values only represent the max frequency of the lower component, not the higher component. When I move the contour box to only encompass one component of the USV, it displays the correct min and max frequency values. Is there any setting that can be changed to accurately report the Low and High frequency values?

Settings used: Neural Network Selected: Rat Detector YOLO R1.mat Low frequency cutoff: 18 High Frequency Cutoff: 120

Additional information: I am running on Windows 10. Matlab version R2023a. Deepsqueak version 3.1.0 rat pup usv

VoiceScientist commented 1 year ago

It looks like you are picking up a very strong harmonic, which is simply double the fundamental frequency. If you're interested in labeling harmonic versus non-harmonic calls, you could do that manually with a label when reviewing the calls. I don't know of any literature on the mechanism of USV harmonics, although I suspect that all USVs have a second harmonic and that the reason we often don't see them in the higher (50 kHz) USVs is more of a technical matter of our recording equipment (e.g. sampling rate, gain settings, etc.) rather than a biological reason.

DrCoffey commented 1 year ago

Hey @escobari, I agree with everything @VoiceScientist mentioned here. There is more discussion regarding harmonics in the closed issue #144: https://github.com/DrCoffey/DeepSqueak/issues/144

I also include some modified functions if you want your xlsx output file to include the complete box bandwidth.

escobari commented 1 year ago

Thank you both for your responses! I think labelling harmonic versus non-harmonic calls is a good idea.

I used the modified functions and they worked to obtain the total frequency bandwidth. I'll use this to calculte the max frequency of the harmonic. Thank you again!