Hello all, I am getting an error "Dot indexing is not supported for variables of this type."

1 view (last 30 days)
Below is the error code.
Dot indexing is not supported for variables of this type.
Error in yolov2ObjectDetector/parseDetectInputs (line 580)
networkInputSize = network.Layers(this.LayerIndices.ImageLayerIdx).InputSize;
Error in yolov2ObjectDetector/detect (line 413)
params = this.parseDetectInputs(I,varargin{:});
Error in secondpage>pushbutton1_Callback (line 242)
[bboxes,scores,label] = detect(detector,s(k).cdata);
Error in gui_mainfcn (line 95)
Error in secondpage (line 42)
gui_mainfcn(gui_State, varargin{:});
Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)secondpage('pushbutton1_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
May you please help resolve this.
Thank you
Amanpreet on 26 Sep 2022
@Walter Roberson Thanks for helping with the same. Code is running now. I did the debugging to track back and it said that Deep learning toolbox was not installed.

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 27 Sep 2022
Edited: Walter Roberson on 27 Sep 2022
I do not get that error when I test with R2022b on my system. Which MATLAB release are you using?
I did have to make some changes to files to get the code to run on my system, because it had hardcoded paths and used \ as the directory separator; I also worked around a warning. I have attached the modified versions.
Also, most of the test videos do not work at all on my system; I had to use sdVideo.mp4

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!