How can I export ground truth object correctly from Image Labeler to .m script for objectDete​ctorTraini​ngData method?

조회 수: 6 (최근 30일)
I' am trying to train my own object detector. For this I have done:
1. Labeled my Images with Image Labeler
Bildschirmfoto 2019-11-26 um 14.15.16.png
2. Exported to workspace
Bildschirmfoto 2019-11-26 um 14.16.28.png
3. Used gTruth object in .m file
trainingData = objectDetectorTrainingData(gTruth,'SamplingFactor',2);
4. and then I get the following error:
Error using objectDetectorTrainingData (line 156)
The input groundTruth object/s do not contain any valid object detector training data.
Does anyone have a clue what I have done wrong?

답변 (1개)

Raunak Gupta
Raunak Gupta 2019년 12월 5일
Hi,
From the error message I can understand that the gTruth file that has been generated or variable that is saved to the workspace doesn’t contain any data that is of the class ‘Rectangle’. Since object detection problem requires data with bounding boxes, the function objectDetectorTrainingData is showing the error because the gTruth variable doesn’t contain even 1 frame which has ‘Rectangle’ type data. Otherwise objectDetectorTrainingData will read only those images which contains bounding box data.
I suggest you may check the ‘Type’ with the following command to be sure that gTruth contains ‘Rectangle’ type data.
gTruth.LabelDefinitions.Type
If Rectangle is present in the answer of the above command, then objectDetectorTrainingData will work.
  댓글 수: 2
Francois Clemens
Francois Clemens 2021년 5월 21일
This is a bit weird, so if I have only polygons I can not use this function?
yikes_pd
yikes_pd 2021년 9월 3일
Hi, i'm having the same problem. anyone have already solved the polygon labeling type data for detection?

댓글을 달려면 로그인하십시오.

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by