DrCoffey / DeepSqueak

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

Detect Calls = "Error in network, skiping audio chunk" #210

Closed Krscatte closed 11 months ago

Krscatte commented 1 year ago

I was hoping to use DeepSqueak to conduct a study on rat vocalizations. I installed MatLab + Simulink as well as the computer vision toolbox, deep learning toolbox, curve fitting toolbox, and image processing toobox. I'm not sure if I'm missing anything I might need further but I don't believe there are any conflicting detection functions as this is a fresh install of MatLab. Apologies in advance if I've missed something obvious; this is my first time using MatLab.

Describe the bug When trying to use the "detect calls" function on the interface using the example files, the neural network appears to load but I then get this error message and no calls are detected. This happens whether I click this button alone, click load calls first, or click load audio first. Below is the MatLab error message:

Error in Network, Why Broken? Warning: Undefined function 'spectrogram' for input arguments of type 'double'.

Error in SqueakDetect (line 90) [~,fr,ti,p] = spectrogram(audio(:,1),wind,noverlap,nfft,audio_info.SampleRate,'yaxis'); % Just use the first audio channel

Error in multinetdect_Callback (line 80) Calls = [Calls; SqueakDetect(AudioFile,NeuralNetwork,handles.audiofiles(CurrentAudioFile).name,Settings(:,k),j,length(audioselections),networkname)];

Error in gui_mainfcn (line 95) feval(varargin{:});

Error in DeepSqueak (line 29) gui_mainfcn(gui_State, varargin{:});

Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)DeepSqueak('multinetdect_Callback',hObject,eventdata,guidata(hObject),1)

In SqueakDetect (line 136) In multinetdect_Callback (line 80) In gui_mainfcn (line 95) In DeepSqueak (line 29) In matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)DeepSqueak('multinetdect_Callback',hObject,eventdata,guidata(hObject),1) No Calls found in: Example Rat Recording

To Reproduce Steps to reproduce the behavior:

  1. Start up MatLab
  2. Enter "DeepSqueak" to open the GUI
  3. Set Neural Network to either Long Rat Detector YOLO R1.mat or Rat Detector YOLO R1.mat
  4. Set Audio Files to Example Rat Recording.flac
  5. Set Detect Call Files to Example Rat Recording 2021-02-25 1_24 PM.mat
  6. Click "Detect Calls"
  7. Keep default settings except the frequency cutoff at 125 kHz.

Expected behavior I would have expected some calls would have been detected in the example audio.

Additional context Windows 11/MATLAB 2023b

DrCoffey commented 1 year ago

It looks like you are missing the Spectrogram() function which is in the Signal Processing Toolbox.

Krscatte commented 1 year ago

It looks like you are missing the Spectrogram() function which is in the Signal Processing Toolbox.

Perfect, I think that did it! Many thanks.