Error training Yolo V4 object detector
Show older comments
Hi,
I am running the scripts in Gazebo Simulation of Semi-Structured Intelligent Bin Picking for UR5e Using YOLO and PCA-Based Object Detection example and everthing works well. However, when I try to train the detector by using the trainYoloV4ForSimCuboidObject.mlx live script, I get this error:
Intermediate dot '.' indexing produced a comma-separated list with 0 values, but it must produce a single value when followed by subsequent indexing operations.
plY{i} = layerAnalyzer.Outputs.Meta{1};
[sizes, formats] = iForwardExampleInputsLayerGraph(net, opts.Outputs, X{:});
[orderedNetworkActivationSizes, ~] = deep.internal.sdk.forwardDataAttributes(lgraph,'Outputs',orderedDetectionNetworkSource);
[lgraph, params.DetectionNetworkSource] = iConfigureDetector(lgraph,numClasses,params.AnchorBoxes,params.DetectionNetworkSource,params.PredictedBoxType);
params = yolov4ObjectDetector.parseDetectorInputs(varargin{:});
I didn't change anything and I provided the recommended donwnloaded dataset folders. So, what could be the cause of this error?
2 Comments
Ali
on 16 Jun 2024
Hi Jose,
I got the same error when trying to train my own network. I don't have a solution but I may be able to share a bit of useful insight for someone.
Tracing it through, it took me to the line : deep.internal.sdk.forwardDataAttributes(lgraph,'Outputs',orderedDetectionNetworkSource)
The lgraph that I am passing it appears to be a 1x0 empty array so when it tries to form the output names, I think it is falling over on the dot indexing there.
It may be because you (like me) used googleNet. When the outputs are pooled together I presume the output of this is 1 and therefore the layerWithLowestOutputSize function returns this and then subsequently removes it on line 1877: lgraph = iRemoveLayersAfterSpecifiedLayerAndUnconnectedLayers(lgraph,layerWithLowestOutputSize);
Removing a pool is not going to do the network any good at all.
Without the above line being altered, I can't see how it can progress hence why I am a bit puzzled myself - we are pretty deep at this point, pun intended :).
Apologies I can't be more help, but it might spark a lightbulb for someone more familiar with this.
(I can confirm that changing the network to squeezeNet doesn't fix it when set up the same way, again perhaps as the outputs are pooled in this one as well.)
Kind regards,
Alastair
Jose
on 17 Jun 2024
Accepted Answer
More Answers (0)
Categories
Find more on Object Detection in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!