vision.labeler.AutomationAlgorithm class
Package: vision.labeler
Interface for algorithm automation in ground truth labeling
Description
The vision.labeler.AutomationAlgorithm
class specifies the interface for
defining custom automation algorithms to run in the Image Labeler, Video Labeler, and
Ground Truth Labeler (Automated Driving Toolbox) apps. Classes that inherit from the AutomationAlgorithm
interface can be used with the automation workflow of the
labeling apps to generate ground truth labels.
The vision.labeler.AutomationAlgorithm
class is a handle
class.
Properties
The AutomationAlgorithm
class predefines this set of
properties.
GroundTruth
— Ground truth data
groundTruth
object | groundTruthMultisignal
object
Ground truth data, specified as a groundTruth
or groundTruthMultisignal
(Automated Driving Toolbox) object. This property holds all the labels in the
labeling app prior to automation.
For automation algorithms used in the Image Labeler or Video Labeler app, this property must be a
groundTruth
object.For automation algorithms used in the Ground Truth Labeler (Automated Driving Toolbox) app, this property must be a
groundTruthMultisignal
object.
Attributes:
GetAccess | public |
SetAccess | private |
SelectedLabelDefinitions
— Selected label definitions
structure
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 the ROI Labels or Scene Labels pane on the left.
The structure contains these fields.
Field | Description |
---|---|
Type |
|
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 the The first
field of each 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 a |
PixelLabelID (optional) | Positive integer that contains the pixel label ID for the label definition. This PixelLabelID field applies only for label definitions of type PixelLabel . |
To view a sample SelectedLabelDefinitions
structure 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 sample SelectedLabelDefinitions
structure 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 |
ValidLabelDefinitions
— Valid label definitions
structure array
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 the checkLabelDefinition
method. This table describes the fields for each valid
label definition structure.
Field | Description |
---|---|
Type |
|
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 the The first
field of each 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 a |
PixelLabelID (optional) | Positive integer that contains the pixel label ID for the label definition. This PixelLabelID field applies only for label definitions of type PixelLabel . |
To view a sample ValidLabelDefinitions
structure 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 sample ValidLabelDefinitions
structure 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 |
Clients of the AutomationAlgorithm
class are required to
define this set of properties. These properties set up the name, description, and user
instructions for your automated algorithm.
Name
— Automation algorithm name
character vector
Automation algorithm name, specified as a character vector.
Attributes:
GetAccess | public |
Abstract | true |
Constant | true |
NonCopyable | true |
Description
— Automation algorithm description
character vector
Algorithm description, specified as a character vector.
Attributes:
GetAccess | public |
Abstract | true |
Constant | true |
NonCopyable | true |
UserDirections
— Algorithm directions displayed in app
cell array
Algorithm directions displayed in app, specified as a cell array.
UserDirections
are specified as a cellstr
,
with each string representing a separate direction. Use the checkSetup
method to verify that the directions have been adhered
to.
Attributes:
GetAccess | public |
Abstract | true |
Constant | true |
NonCopyable | true |
Methods
Public Methods
Clients of an AutomationAlgorithm
implement these
user-defined functions to define execution of the algorithm. For more information on
creating your own automation algorithm, see Create Automation Algorithm for Labeling.
checkLabelDefinition | Validate label definition |
checkSignalType | Validate signal type |
supportsMultisignalAutomation | Set multisignal algorithm automation flag |
checkSetup | Set up validation (optional) |
initialize | Initialize state for algorithm execution (optional) |
run | Run label automation on every frame in interval |
terminate | Terminate automated algorithm (optional) |
settingsDialog | Display algorithm settings (optional) |
Version History
See Also
Apps
- Image Labeler | Ground Truth Labeler (Automated Driving Toolbox) | Video Labeler
Functions
groundTruth
|groundTruthMultisignal
(Automated Driving Toolbox) |labelType
|vision.labeler.mixin.Temporal
|vision.labeler.mixin.BlockedImageAutomation
Topics
- Create Automation Algorithm for Labeling
- Temporal Automation Algorithms
- Blocked Image Automation Algorithms
- Automate Ground Truth Labeling of Lane Boundaries (Automated Driving Toolbox)
- Automate Ground Truth Labeling for Semantic Segmentation (Automated Driving Toolbox)
- Automate Attributes of Labeled Objects (Automated Driving Toolbox)
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)