フィルターのクリア

what is wrong in this code..?

4 ビュー (過去 30 日間)
Dimuthu Dissanayake
Dimuthu Dissanayake 2018 年 3 月 19 日
コメント済み: Dave Eccles 2021 年 11 月 15 日
I trained a faster rcnn object detector using the example code. the training process sucessfully finished but i came up with this error.when this code runs,
___________________________________
I = imread('image1.png');
% Run the detector.
[bboxes, scores] = detect(detector, I);
% Annotate detections in the image.
I = insertObjectAnnotation(I, 'rectangle', bboxes, scores);
figure
imshow(I)
....
then this error came
Error using insertObjectAnnotation
Expected LABEL to be nonempty.
Error in insertObjectAnnotation
Error in insertObjectAnnotation
Error in insertObjectAnnotation
Error in t27_trainFasterrcnn (line 139)
I = insertObjectAnnotation(I, 'rectangle', bboxes, scores);
please help me.
  5 件のコメント
omar A.alghafoor
omar A.alghafoor 2020 年 5 月 29 日
2019a same error
Dave Eccles
Dave Eccles 2021 年 11 月 15 日
Same issue - was this resolved? Can this be solved by increasing the number of epochs used in the model?

サインインしてコメントする。

回答 (1 件)

Kanika Gupta
Kanika Gupta 2020 年 6 月 24 日
The insertAnnotation function excepts labels to be passed as na arguments.
Try cloading labels using
[bboxes,scores,labels] = detect(detector,I)
Then call insertAnnotation function using
detectedI = insertObjectAnnotation(I,'Rectangle',bboxes,cellstr(labels));
Refer to this link for an example: Object detection using faster R CNN

Community Treasure Hunt

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

Start Hunting!

Translated by