NEED HELP WITH Preprocessing gTruth label data
3 ビュー (過去 30 日間)
古いコメントを表示
Hello,
I am trying to learn object detection by following this example: https://www.mathworks.com/help/vision/examples/object-detection-using-yolo-v3-deep-learning.html#ObjectDetectionUsingYOLOV3DeepLearningExample-4
I labeled my images by using Image Labeler app, the size of the images were 480x640 and I had 3 classes. I created the trainingData from gTruth. While trying to estimate the anchorboxes It got me the following error: I started to look into it and I realised that the preprocessed trainingdataset had exactly the same values as the inital dataset and they both had most of the bounding box values as 3x4 double. By following the MATLAB example everything worked just fine and the bounding box values seemed single.
Does the issue persist because of the double value of bounding boxes? How to convert them to single?
Error using estimateAnchorBoxes>iCheckBoxesFromDatastore (line 215)
Invalid transform function defined on datastore.
Error in estimateAnchorBoxes>iParseInputs (line 168)
boxes = iCheckBoxesFromDatastore(datastore);
Error in estimateAnchorBoxes (line 136)
[boxes, numAnchors, params] = iParseInputs(datastore, numAnchors,
varargin{:});
Error in newest_detection (line 52)
[anchorBoxes, meanIoU] = estimateAnchorBoxes(trainingDataForEstimation,
numAnchors)
Caused by:
Error using bboxresize>iParseInputs (line 115)
The value of 'bboxA' is invalid. Expected input number 1, bboxA, to be
integer-valued.
4 件のコメント
回答 (1 件)
Sudheer Dunna
2021 年 4 月 9 日
Make sure that bounding box values in nonzero, nonnegative and double with no decimal value ( Eg: if value is 234.234 make it 234 using floor or int function)
totalSize=size(labelData1{:})
for i=1:totalSize(1,1)
rowSize=size(labelData1{1,1}{i,1}{:})
for j=1:rowSize(1,1)
for k=1:4
if(labelData1{1,1}{i,1}{1,1}(j,k)<=0)
labelData1{1,1}{i,1}{1,1}(j,k)=1
else
labelData1{1,1}{i,1}{1,1}(j,k)=floor(labelData1{1,1}{i,1}{1,1}(j,k))
end
end
end
end
Written code is to access individual elements of boundingBox data and validating for said conditions and updating the values if required.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!