vision.labeler.AutomationAlgorithm class
Package:vision.labeler
Interface for algorithm automation in ground truth labeling
Description
Thevision.labeler.AutomationAlgorithm
class 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 theAutomationAlgorithm
interface 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.AutomationAlgorithm
class is ahandle
class.
Properties
TheAutomationAlgorithm
class predefines this set of properties.
GroundTruth
—Ground truth data
groundTruth
object|groundTruthMultisignal
object
Ground truth data, specified as agroundTruth
orgroundTruthMultisignal
(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 a
groundTruth
object.For automation algorithms used in theGround 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 theROI LabelsorScene Labelspane 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 第一个字段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. ThisPixelLabelID field applies only for label definitions of typePixelLabel . |
To view a sampleSelectedLabelDefinitions
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 sampleSelectedLabelDefinitions
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 thecheckLabelDefinition
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 第一个字段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. ThisPixelLabelID field applies only for label definitions of typePixelLabel . |
To view a sampleValidLabelDefinitions
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 sampleValidLabelDefinitions
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
|
CurrentIndex
—Index of current frame
integer
Index of current frame, specified as an integer. The object updatesCurrentIndex
while the algorithm runs. Use this index value to access the current frame ground truth data from theGroundTruth
property.
Clients of theAutomationAlgorithm
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 acellstr
, with each string representing a separate direction. Use thecheckSetup
method to verify that the directions have been adhered to.
Attributes:
GetAccess |
public
|
Abstract |
true
|
Constant |
true
|
NonCopyable |
true
|
Methods
Public Methods
Clients of anAutomationAlgorithm
implement these user-defined functions to define execution of the algorithm. For more information on creating your own automation algorithm, seeCreate 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
Introduced in R2017a
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
- Create Automation Algorithm Function 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)
Comando de MATLAB
Ha事实clic en un enlace que corresponde a este comando de MATLAB:
Ejecute el comando introduciéndolo en la ventana de comandos de MATLAB. Los navegadores web no admiten comandos de MATLAB.
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)