calculate the area of Estimate Anchor Boxes

조회 수: 3 (최근 30일)
weam
weam 2023년 2월 10일
편집: weam 2023년 2월 22일
Hello, I was recently programmed in MATLAB to detect certain parts by yoloV4 ..and I reached the training stage to calculate the area of anchor boxes, at the beginning of the code for calculating it. it begin appear error, I don't know why
the code, the error in [anchors,meanIoU]
trainingDataForEstimation = transform(trainingData,@(data)preprocessData(data,inputSize));
numAnchors = 9;
[anchors,meanIoU] = estimateAnchorBoxes(trainingDataForEstimation, numAnchors);
the message error :-
92 [anchors,meanIoU] = estimateAnchorBoxes(trainingDataForEstimation, numAnchors);
Invalid transform function defined on datastore.
The cause of the error was:
Unable to perform assignment because the size of the left side is 1-by-3 and the size of the right side is 1-by-2.
Error in recognitionThree>preprocessData (line 220)
data(ii,2:4) = {I, Wboxes}
Error in recognitionThree>@(data)preprocessData(data,inputSize) (line 90)
trainingDataForEstimation = transform(trainingData,@(data)preprocessData(data,inputSize));
Error in matlab.io.datastore.TransformedDatastore/applyTransforms (line 723)
data = ds.Transforms{ii}(data);
Error in matlab.io.datastore.TransformedDatastore/read (line 235)
[data, info] = ds.applyTransforms(data, info);
Error in matlab.io.datastore.TransformedDatastore/readall (line 300)
data{end+1} = read(copyds); %#ok<AGROW>
Error in estimateAnchorBoxes>iReadallBoxes (line 270)
boxes = readall(ds);
Error in estimateAnchorBoxes>iCheckBoxesFromDatastore (line 215)
boxes = iReadallBoxes(ds);
Error in estimateAnchorBoxes>iParseInputs (line 168)
boxes = iCheckBoxesFromDatastore(datastore);
Error in estimateAnchorBoxes (line 136)
[boxes, numAnchors, params] = iParseInputs(datastore, numAnchors, varargin{:});
Error in recognitionThree (line 92)
[anchors,meanIoU] = estimateAnchorBoxes(trainingDataForEstimation, numAnchors);

답변 (1개)

Walter Roberson
Walter Roberson 2023년 2월 11일
편집: Walter Roberson 2023년 2월 11일
recognitionThree appears to be code you wrote. The code
data(ii,2:4) = {I, Wboxes}
appears to be your code. You are trying to assign a cell array of length 2 into an array that expects 3 elements.
If WBoxes is already a cell of length 2, then use
data(ii,2:4) = [I, Wboxes(:).'];

카테고리

Help CenterFile Exchange에서 Recognition, Object Detection, and Semantic Segmentation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by