How to train object detector for Line and Polygon Labels?

7 visualizzazioni (ultimi 30 giorni)
Andrey Senkov
Andrey Senkov il 3 Dic 2023
Risposto: Aastha il 5 Dic 2024 alle 3:26
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.

Risposte (1)

Aastha
Aastha il 5 Dic 2024 alle 3:26
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