How to train object detector for Line and Polygon Labels?

조회 수: 3 (최근 30일)
Andrey Senkov
Andrey Senkov 2023년 12월 3일
답변: Aastha 2024년 12월 5일
I can train object detector oly for Rectangle ROI labels:
[imds,pxds] = objectDetectorTrainingData(gTruth);
cds = combine(imds,pxds);
But I also have to detect Line and Polygon labels on my images. There are Line and Polygon label types in the image labeller. But there is absolutely no information about how to get training data of them.

답변 (1개)

Aastha
Aastha 2024년 12월 5일
To create training data with Line and Polygon ROI labels in MATLAB, you can refer to the steps outlined in the MathWorks documentation of Image Labeler whose link is mentioned below:
After labelling the objects in the images using the steps mentioned in the documentation, export them as a groundTruth object.
The groundTruth object contains the following properties:
  • DataSource: the source of the ground truth data.
  • LabelDefinitions: a table with the label types and their definitions.
  • LabelData: a timetable containing the label data.
gTruth =
groundTruth with properties:
DataSource: [1×1 groundTruthDataSource]
LabelDefinitions: [2x6 table]
LabelData: [531×3 timetable]
To view the types of labels used in the groundTruth object, access them using "gTruth.LabelDefinitions.Type". This will show the label types, such as rectangle, line, and polygon.
I hope this helps!

Community Treasure Hunt

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

Start Hunting!

Translated by