Error, Detector in YOLO V4
10 次查看(过去 30 天)
显示 更早的评论
Hello everyone, can you help me? I am using the example "Object Detection Using YOLO v4 Deep Learning" in the document Matlab help, but with a change in the dataset (customs data). when I reach to detector appear the error.
this code :-
detector = yolov4ObjectDetector("csp-darknet53-coco",className1,className2,anchorBoxes,InputSize=inputSize);
this error appear:-
Error using yolov4ObjectDetector/parsePretrainedDetectorInputs
Expected a string scalar or character vector for the parameter name.
Error in yolov4ObjectDetector (line 218)
params = yolov4ObjectDetector.parsePretrainedDetectorInputs(varargin{:});
Error in recognitionThree (line 113)
detector = yolov4ObjectDetector("csp-darknet53-coco",className1,className2,anchorBoxes,InputSize=inputSize);
0 个评论
回答(2 个)
Walter Roberson
2023-3-6
detector = yolov4ObjectDetector("csp-darknet53-coco",className1,className2,anchorBoxes,InputSize=inputSize);
So in your call, the name parameter is being passed as "csp-darknet53-coco" . The classes parameter is being passed as className1 . The aboxes parameter is being passed as className2 . Then you get to the anchorBoxes parameter in your call, and since the positional parameter locations have been filled, the code has to match the contents of anchorBoxes to one of the option names. But your anchorBoxes variable is not a character vector or a string array, so you get an error message.
The classes has to be passed as a single parameter, such as {className1, className2}
7 个评论
Walter Roberson
2023-3-12
the error message says
Error in recognitionThree>augmentData (line 231)
bboxes = A{ii,{1,1}};
but that line does not exist in the augmentData function that you posted.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!