Class RenderedObjectInfoLabeler
Labeler which produces label id, instance id, and visible pixel count in a single metric each frame for each object which takes up one or more pixels in the camera's frame.
Inherited Members
Namespace: UnityEngine.Perception.GroundTruth
Syntax
public sealed class RenderedObjectInfoLabeler : CameraLabeler
Constructors
RenderedObjectInfoLabeler()
Creates a new RenderedObjectInfoLabeler. Be sure to assign idLabelConfig before adding to a PerceptionCamera.
Declaration
public RenderedObjectInfoLabeler()
RenderedObjectInfoLabeler(IdLabelConfig)
Creates a new RenderedObjectInfoLabeler with an IdLabelConfig.
Declaration
public RenderedObjectInfoLabeler(IdLabelConfig idLabelConfig)
Parameters
Type | Name | Description |
---|---|---|
IdLabelConfig | idLabelConfig | The IdLabelConfig which associates objects with labels. |
Fields
idLabelConfig
The IdLabelConfig which associates objects with labels.
Declaration
public IdLabelConfig idLabelConfig
Field Value
Type | Description |
---|---|
IdLabelConfig |
objectInfoMetricId
The metric ID
Declaration
public string objectInfoMetricId
Field Value
Type | Description |
---|---|
String |
Properties
description
A human-readable description of the labeler
Declaration
public override string description { get; }
Property Value
Type | Description |
---|---|
String |
Overrides
labelerId
The GUID id to associate with the data produced by this labeler.
Declaration
public override string labelerId { get; }
Property Value
Type | Description |
---|---|
String |
Overrides
supportsVisualization
Labelers should set this in their setup to define if they support realtime visualization of their data.
Declaration
protected override bool supportsVisualization { get; }
Property Value
Type | Description |
---|---|
Boolean |
Overrides
Methods
OnBeginRendering(ScriptableRenderContext)
Called just before the camera renders each frame the the labeler is enabled and ShouldCaptureThisFrame is true.
Declaration
protected override void OnBeginRendering(ScriptableRenderContext scriptableRenderContext)
Parameters
Type | Name | Description |
---|---|---|
ScriptableRenderContext | scriptableRenderContext | The current context from the Scriptable Render Pipeline. |
Overrides
OnVisualizerEnabledChanged(Boolean)
Called when the labeler's visualization capability is turned on or off.
Declaration
protected override void OnVisualizerEnabledChanged(bool isEnabled)
Parameters
Type | Name | Description |
---|---|---|
Boolean | isEnabled |
Overrides
Setup()
Called just before the first call to OnUpdate() or OnBeginRendering(ScriptableRenderContext). Implement this to initialize state.
Declaration
protected override void Setup()