DrCoffey / DeepSqueak

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

"Batch Reject by Threshold" doesn't work in V3.0 #119

Closed suchyun1993 closed 3 years ago

suchyun1993 commented 3 years ago

Hi Coffey,

Thanks for your recent update of version 3.0! After several days of use, I found the function "Batch Reject by Threshold" doesn't work anymore. It shows issue as below:

Error using CreateSpectrogram (line 7)
Unrecognized table variable name 'Audio'.

Error in Batch_Reject_by_Threshold_Callback (line 95)
        [I,windowsize,noverlap,nfft,rate,box] = CreateSpectrogram(Calls(i, :));

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('Batch_Reject_by_Threshold_Callback',hObject,eventdata,guidata(hObject))

Error while evaluating Menu Callback.

It seems some variables are no longer available in the new version (for example, there is no column called "Rate" in the detected mat. file). This function is quite useful to remove some false positive detection of calls from noisy environment. Could you fix this function please? Thank you very much!

Warm regards, Yun

suchyun1993 commented 3 years ago

Besides, the export function also met some problem. When I was trying to export spectrogram it shows:

Error using imwrite (line 448)
Unable to determine the file format from the file name.

Error in esportspect_Callback (line 28)
imwrite(I2,cmap,fullFileName,'png','BitDepth',8); % Re-change it to colored one

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('esportspect_Callback',hObject,eventdata,guidata(hObject))

Error while evaluating Menu Callback.

Export Audio alse needs to manually modify the format of start time.

DrCoffey commented 3 years ago

Looks like I missed updating a few functions. Batch rejection by threshold should now work. I'll get around to the other issues ASAP

DrCoffey commented 3 years ago

Ok, all of the exporting bugs you found should be fixed. Let me know if you find anything else.

suchyun1993 commented 3 years ago

Wow, thank you so much for your super fast response !! 😮 I will be using it for a long time. I will let you know if I could find anything else. Cheers 🙌