Main Content

vision.labeler.AutomationAlgorithm class

Package:vision.labeler

Interface for algorithm automation in ground truth labeling

Description

Thevision.labeler.AutomationAlgorithmclass specifies the interface for defining custom automation algorithms to run in theImage Labeler,Video Labeler, andGround Truth Labeler(Automated Driving Toolbox)apps. Classes that inherit from theAutomationAlgorithminterface can be used with the automation workflow of the labeling apps to generate ground truth labels.

You can also use a custom function that creates an automation algorithm. The function, which you can specify in the labeling apps, enables you to adjust the automation parameters. For more details, seeCreate Automation Algorithm Function for Labeling.

Thevision.labeler.AutomationAlgorithmclass is ahandleclass.

Class Attributes

Abstract
true

For information on class attributes, seeClass Attributes.

Properties

全部展开

TheAutomationAlgorithmclass predefines this set of properties.

Ground truth data, specified as agroundTruthorgroundTruthMultisignal(Automated Driving Toolbox)object. This property holds all the labels in the labeling app prior to automation.

  • For automation algorithms used in theImage LabelerorVideo Labelerapp, this property must be agroundTruthobject.

  • For automation algorithms used in theGround Truth Labeler(Automated Driving Toolbox)app, this property must be agroundTruthMultisignalobject.

Attributes:

GetAccess
public
SetAccess
private

Label definitions selected for automation in the labeling app, specified as a structure. The labeling apps support selection of only one labeling definition per automation session. In the labeling apps, the selected label definition is highlighted in yellow in either theROI LabelsorScene Labelspane on the left.

The structure contains these fields.

Field Description
Type

labelTypeenumeration that contains the type of label definition. Valid label types are:

  • labelType.Rectangle

  • labelType.Polygon

  • labelType.Cuboid(for point clouds)

  • labelType.ProjectedCuboid(for image and video data)

  • labelType.Line

  • labelType.PixelLabel

  • labelType.Scene

labelType.Customis not supported.

Name Character vector that contains the name of the label definition.
Attributes(optional)

Structure array that contains one structure for each attribute in the label definition. If the label definition does not contain attributes, then this property does not include theAttributesfield.

第一个字段attribute structure in this structure array contains the attribute name. The second field contains a structure of values that are associated with that name. If you are defining aListattribute, you must also define the list of values for that attribute. Values forNumeric Value,String, orLogicalattributes are optional. Descriptions for the attributes are optional for all cases.

PixelLabelID(optional) Positive integer that contains the pixel label ID for the label definition. ThisPixelLabelIDfield applies only for label definitions of typePixelLabel.

To view a sampleSelectedLabelDefinitionsstructure that contains an attribute, enter this code at the MATLAB®command prompt.

selectedLabelDefs.Type = labelType.Rectangle; selectedLabelDefs.Name ='Car'; selectedLabelDefs.Attributes = struct('distance',...struct('DefaultValue',0,'Description','Sensor distance'))

To view a sampleSelectedLabelDefinitionsstructure that contains pixel label definitions, enter this code at the MATLAB command prompt.

selectedLabelDefs.Type = labelType.PixelLabel; selectedLabelDefs.Name ='Car'; selectedLabelDefs.Attributes = struct('distance',...struct('DefaultValue',0,'Description','Sensor distance'))

Attributes:

GetAccess
public
SetAccess
private

Valid label definitions that the algorithm can automate, specified as a structure array. Each structure in the array corresponds to a valid label definition. To determine which label definitions are valid, the app uses thecheckLabelDefinitionmethod. This table describes the fields for each valid label definition structure.

Field Description
Type

labelTypeenumeration that contains the type of label definition. Valid label types are:

  • labelType.Rectangle

  • labelType.Polygon

  • labelType.Cuboid(for point clouds)

  • labelType.ProjectedCuboid(for image and video data)

  • labelType.Line

  • labelType.PixelLabel

  • labelType.Scene

labelType.Customis not supported.

Name Character vector that contains the name of the label definition.
Attributes(optional)

Structure array that contains one structure for each attribute in the label definition. If the label definition does not contain attributes, then this property does not include theAttributesfield.

第一个字段attribute structure in this structure array contains the attribute name. The second field contains a structure of values that are associated with that name. If you are defining aListattribute, you must also define the list of values for that attribute. Values forNumeric Value,String, orLogicalattributes are optional. Descriptions for the attributes are optional for all cases.

PixelLabelID(optional) Positive integer that contains the pixel label ID for the label definition. ThisPixelLabelIDfield applies only for label definitions of typePixelLabel.

To view a sampleValidLabelDefinitionsstructure that contains an attribute, enter this code at the MATLAB command prompt.

validLabelDefs(1).Type = labelType.Rectangle; validLabelDefs(1).Name ='Car'; validLabelDefs(2).Type = labelType.Line; validLabelDefs(2).Name ='LaneMarker'; validLabelDefs(3).Type = labelType.Scene validLabelDefs(3).Name ='Sunny';

To view a sampleValidLabelDefinitionsstructure that contains pixel label definitions, enter this code at the MATLAB command prompt.

validLabelDefs(1).Type = labelType.PixelLabel; validLabelDefs(1).Name ='Road'; validLabelDefs(1).PixelLabelID = 1; validLabelDefs(2).Type = labelType.PixelLabel; validLabelDefs(2).Name ='Sky'; validLabelDefs(2).PixelLabelID = 2

Attributes:

GetAccess
public
SetAccess
private

Index of current frame, specified as an integer. The object updatesCurrentIndexwhile the algorithm runs. Use this index value to access the current frame ground truth data from theGroundTruthproperty.

Clients of theAutomationAlgorithmclass are required to define this set of properties. These properties set up the name, description, and user instructions for your automated algorithm.

Automation algorithm name, specified as a character vector.

Attributes:

GetAccess
public
Abstract
true
Constant
true
NonCopyable
true

Algorithm description, specified as a character vector.

Attributes:

GetAccess
public
Abstract
true
Constant
true
NonCopyable
true

Algorithm directions displayed in app, specified as a cell array.UserDirectionsare specified as acellstr, with each string representing a separate direction. Use thecheckSetupmethod to verify that the directions have been adhered to.

Attributes:

GetAccess
public
Abstract
true
Constant
true
NonCopyable
true

Methods

全部展开

Version History

Introduced in R2017a