docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ObjectCountLabeler

    Labeler which produces object counts for each label in the associated IdLabelConfig each frame.

    Inheritance
    object
    CameraLabeler
    ObjectCountLabeler
    Inherited Members
    CameraLabeler.enabled
    CameraLabeler.hudPanel
    CameraLabeler.overlayPanel
    CameraLabeler.visualizationEnabled
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Perception.GroundTruth.Labelers
    Assembly: Unity.Perception.Runtime.dll
    Syntax
    [Serializable]
    [MovedFrom("UnityEngine.Perception.GroundTruth")]
    public sealed class ObjectCountLabeler : CameraLabeler

    Constructors

    ObjectCountLabeler()

    Creates a new ObjectCountLabeler. This constructor should only be used by serialization. For creation from user code, use ObjectCountLabeler(IdLabelConfig).

    Declaration
    public ObjectCountLabeler()

    ObjectCountLabeler(IdLabelConfig)

    Creates a new ObjectCountLabeler with the given IdLabelConfig.

    Declaration
    public ObjectCountLabeler(IdLabelConfig labelConfig)
    Parameters
    Type Name Description
    IdLabelConfig labelConfig

    The label config for resolving the label for each object.

    Fields

    labelConfig

    The IdLabelConfig which associates objects with labels.

    Declaration
    public IdLabelConfig labelConfig
    Field Value
    Type Description
    IdLabelConfig

    objectCountMetricId

    Metric Id, that can be set via Unity editor UI

    Declaration
    public string objectCountMetricId
    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
    CameraLabeler.description

    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
    CameraLabeler.labelerId

    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
    bool
    Overrides
    CameraLabeler.supportsVisualization

    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
    CameraLabeler.OnBeginRendering(ScriptableRenderContext)

    OnVisualizerEnabledChanged(bool)

    Called when the labeler's visualization capability is turned on or off.

    Declaration
    protected override void OnVisualizerEnabledChanged(bool isEnabled)
    Parameters
    Type Name Description
    bool isEnabled
    Overrides
    CameraLabeler.OnVisualizerEnabledChanged(bool)

    Setup()

    Called just before the first call to OnUpdate() or OnBeginRendering(ScriptableRenderContext). Implement this to initialize state.

    Declaration
    protected override void Setup()
    Overrides
    CameraLabeler.Setup()

    Events

    ObjectCountsComputed

    Fired when the object counts are computed for a frame.

    Declaration
    public event Action<int, NativeSlice<uint>, IReadOnlyList<IdLabelEntry>> ObjectCountsComputed
    Event Type
    Type Description
    Action<int, NativeSlice<uint>, IReadOnlyList<IdLabelEntry>>
    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)