Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detection Calls: Error in Network, skipping Audio Chunk #217

Open
katze-lucky opened this issue Dec 14, 2023 · 7 comments
Open

Detection Calls: Error in Network, skipping Audio Chunk #217

katze-lucky opened this issue Dec 14, 2023 · 7 comments

Comments

@katze-lucky
Copy link

Describe the bug
Dear DeepSqueak team,

I'm using Matlab 2022b and installed the toolboxes required(Computer Vision System Toolbox™, Curve Fitting Toolbox™, Deep Learning Toolbox™ (formerly Neural Network Toolbox™), Image Processing Toolbox™, Parallel Computing Toolbox™, Signal Processing Toolbox™, Statistics and Machine Learning Toolbox™), and run DeepSqueak to detect rat calls for audio files recorded through Avisoft systsm. But it popped up the error window: Error in Network, skipping Audio Chunk and displayed the error details in the command window as below,

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

Error in SqueakDetect (line 108)
[bboxes, scores, Class] = detect(network, im2uint8(im), 'ExecutionEnvironment','auto','SelectStrongest',1);

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: PND12_after_Injec_0004

Actually I had the same error window of ' Error in Network, skipping Audio Chunk ' when I used Matlab2022b 2 days ago, but it ran well 2-3 weeks ago in Matlab 2022b. Unfortunately I didn't save the error details when I had this issue in Matlab2022b, then I upgraded the Matlab to 2023b as my university's IT department suggested, and I still had this error in Matlab2023b. I am not sure if the error details are the same between this 2 Matlab version. But I put the error details of Matlab2023b here and hope you could help me to resolve this issue.

To Reproduce
Steps to reproduce the behavior:
With the attached audio/detection files:

1. Start up MatLab
2. Enter "DeepSqueak" to open the GUI
3. Select Network folder, Audio folder and detection folder
4. Set Neural Network to Rat Detector YOLO R1.mat
5. Select a wav. file recorded through Avisoft systm (I wanted to attached an audio file here but the webpage doesn't support the file format). I used many wav files to run DeepSqueak but all reported the same error as mentioned above.
6. Hit Detect Calls (Keep default settings )
7. Displayed the error as above.
8. No detection file generated. 

Expected behavior
A detection file (.mat file) generated in the detection folder without any error. The Audio files I used do have calls when I ran them in Avisoft and in Matlab2022b two weeks ago when there was no such error.

Additional context
Windows 10 Education / MATLAB 2023b

I am very looking forward to your response, since may lab members in my lab have confronted this error. Thank you so much for your time. :)

@DrCoffey
Copy link
Owner

Hey @katze-lucky, that is a generic error when there is something wrong with the detect function. The most common reason is the computer vision toolbox is not installed. It may also be that there are 2 detect functions in the path and matlab is using the wrong one. you can highlight the detect function in that offending line and hit ctrl+D to open it. It should be the one in the computer vision toolbox.

@katze-lucky
Copy link
Author

Hey DrCoffey, thank you so much for your reply! We did install computer vision system. I’m not sure if I did correctly as you instructed, I highlighted the ‘detect’ just under the line of ‘Error in SqueakDetect(line 108)’ and hit ctrl+D, it opened up a .m file named rcnnObjectDetector.m. Is it the function in computer vision toolbox. I checked the toolbox, it seems to be that one in the toolbox.

@rebka1989
Copy link

rebka1989 commented Dec 28, 2023

Hi Dr Coffey,
Happy holidays :)
I see this is a reoccurring error, and I am having trouble with it myself. Any help would be greatly appreciated.
I'm using (and need to use) Matlab2018b and Deepsqueak 2.6.2
I have the computer vision toolbox properly installed. rcnnObjectDetector.m is located in the vision toolbox.
When I run multidetect with the all shortcalls network, I get the following "skiping audio chunk" errors:

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

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

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

Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)DeepSqueak('multinetdect_Callback',hObject,eventdata,guidata(hObject),0)
Error in Network, Skiping Audio Chunk
Warning: Undefined function 'prctile' for input arguments of type 'double'.

Error in SqueakDetect (line 117)
im = im - prctile(im,5,2);
Error in DeepSqueak (line 30)
gui_mainfcn(gui_State, varargin{:});

Any idea on how to fix this?

Best,
Rebecca (from the Yizhar lab)

@DrCoffey
Copy link
Owner

Hey @rebka1989, you appear to be missing the prctile function. In older versions of Matlab this is in the Statistics and Machine Learning Toolbox.

https://www.mathworks.com/help/matlab/ref/prctile.html

@rebka1989
Copy link

Thank you! :)

@KeyiYu0331
Copy link

Hey guys, I realized instead of the computer vision toolbox, statistics and machine learning toolbox, you also need to download the deep learning toolbox in order to let it run properly.

@reflexchem
Copy link

@KeyiYu0331 Can confirm deep learning toolbox is needed. I'm on v.2020b. Cheers Thanks All :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants