Main Content

labelDefinitionCreatorMultisignal

Object for storing, modifying, and creating label definitions table for multisignal workflow

Since R2020a

Description

The labelDefinitionCreatorMultisignal object stores definitions of labels, sublabels, and attributes to label ground truth data for a multisignal workflow. Use Object Functions to add, remove, modify, or display label definitions. Use the create object function to create a label definitions table from the labelDefinitionCreatorMultisignal object. You can use this label definitions table with the Ground Truth Labeler app.

Creation

Description

example

ldc = labelDefinitionCreatorMultisignal creates an empty label definition creator object ldc for a multisignal workflow. Add label definitions to this object using Object Functions. Use the info function to inspect details of stored labels, sublabels, and attributes.

example

ldc = labelDefinitionCreatorMultisignal(labelDefs) creates a label definition creator object ldc for a multisignal workflow and stores definitions from the label definitions table labelDefs. Use Object Functions to add new label definitions or modify the existing label definitions. Use the info function to inspect details of stored labels, sublabels, and attributes.

Input Arguments

expand all

Label definitions, specified as a table with up to eight columns. The possible columns are Name, SignalType, LabelType, Group, Description, LabelColor, PixelLabelID, and Hierarchy. This table specifies the definitions of labels, sublabels, and attributes for labeling ground truth data. For more details, see LabelDefinitions property of groundTruthMultisignal object.

Output Arguments

expand all

Label definition creator for the multisignal workflow, returned as a labelDefinitionCreatorMultisignal object that contains information about label definitions associated with ground truth data.

Object Functions

addLabelAdd label to label definition creator object for multisignal workflow
addSublabelAdd sublabel to label in label definition creator object for multisignal workflow
addAttributeAdd attributes to label or sublabel in label definition creator object for multisignal workflow
removeLabelRemove label from label definition creator object for multisignal workflow
removeSublabelRemove sublabel from label in label definition creator object for multisignal workflow
removeAttributeRemove attribute from label or sublabel in label definition creator object for multisignal workflow
editLabelGroupModify label group name in label definition creator object for multisignal workflow
editGroupNameChange group name in label definition creator object for multisignal workflow
editLabelDescriptionModify label or sublabel description in label definition creator object for multisignal workflow
editAttributeDescriptionModify attribute description in label definition creator object for multisignal workflow
createCreate label definitions table from label definition creator object for multisignal workflow
infoDisplay label, sublabel, or attribute information stored in label definition creator object for multisignal workflow

Examples

collapse all

Create an empty labelDefinitionCreatorMultisignal object.

ldc = labelDefinitionCreatorMultisignal
ldc = 
labelDefinitionCreatorMultisignal with 0 labels. Use the 

Add a label with the name 'Vehicle'. Specify the type as 'Rectangle'. Adding a 'Rectangle' also adds a 'Cuboid' entry to the label definitions table.

addLabel(ldc,'Vehicle','Rectangle')

Add an attribute with the name 'Color' to the label 'Vehicle'. Specify the attribute type as a string with the value 'Red'.

addAttribute(ldc,'Vehicle','Color',attributeType.String,'Red')

Add a sublabel with the name 'Wheel' to the label 'Vehicle'. Specify the type of the sublabel as 'Rectangle'.

addSublabel(ldc,'Vehicle','Wheel','Rectangle')

Add an attribute called 'Diameter' to the sublabel 'Wheel'. Specify the attribute value as a 'Numeric' scalar.

addAttribute(ldc,'Vehicle/Wheel','Diameter','Numeric',14)

Display the details of the updated labelDefinitionCreatorMultisignal object.

ldc
ldc = 
labelDefinitionCreatorMultisignal contains the following labels:

	Vehicle with 1 sublabels and 1 attributes and belongs to None group.	(info)

For more details about attributes and sublabels, use the info method.

Create a label definitions table from the definitions stored in the object.

labelDefs = create(ldc)
labelDefs=2×7 table
       Name        SignalType    LabelType     Group      Description    LabelColor     Hierarchy  
    ___________    __________    _________    ________    ___________    __________    ____________

    {'Vehicle'}    Image         Rectangle    {'None'}       {' '}       {0x0 char}    {1x1 struct}
    {'Vehicle'}    PointCloud    Cuboid       {'None'}       {' '}       {0x0 char}    {1x1 struct}

Load an existing multisignal label definitions table into the workspace.

labelDefFile = fullfile(toolboxdir('driving'),'drivingdata','labelDefsMultiSignal.mat');
ld = load(labelDefFile)
ld = struct with fields:
    labelDefs: [6x6 table]

Create a labelDefinitionCreatorMultisignal object from the label definitions table.

ldc = labelDefinitionCreatorMultisignal(ld.labelDefs)
ldc = 
labelDefinitionCreatorMultisignal contains the following labels:

	Car with 0 sublabels and 0 attributes and belongs to None group.	(info)
	LeftLane with 0 sublabels and 0 attributes and belongs to None group.	(info)
	Road with 0 sublabels and 0 attributes and belongs to None group.	(info)
	Sunny with 0 sublabels and 0 attributes and belongs to None group.	(info)
	Urban with 0 sublabels and 0 attributes and belongs to None group.	(info)

For more details about attributes and sublabels, use the info method.

Add a new attribute to the label 'Car'.

addAttribute(ldc,'Car','Color','List',{'Red','Green','Blue'})

Display the details of the updated labelDefinitionCreatorMultisignal object.

ldc
ldc = 
labelDefinitionCreatorMultisignal contains the following labels:

	Car with 0 sublabels and 1 attributes and belongs to None group.	(info)
	LeftLane with 0 sublabels and 0 attributes and belongs to None group.	(info)
	Road with 0 sublabels and 0 attributes and belongs to None group.	(info)
	Sunny with 0 sublabels and 0 attributes and belongs to None group.	(info)
	Urban with 0 sublabels and 0 attributes and belongs to None group.	(info)

For more details about attributes and sublabels, use the info method.

Version History

Introduced in R2020a