Class ObjectCountLabeler | Perception | 0.5.0-preview.1
docs.unity3d.com
    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.perceptionCamera
    CameraLabeler.sensorHandle
    CameraLabeler.OnUpdate()
    CameraLabeler.OnVisualize()
    CameraLabeler.OnVisualizeAdditionalUI()
    CameraLabeler.Cleanup()
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.Perception.GroundTruth
    Syntax
    [Serializable]
    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

    objectCountMetricId

    The ID to use for object count annotations in the resulting dataset

    Declaration
    public string objectCountMetricId
    Field Value
    Type Description
    String

    Properties

    description

    A human-readable description of the labeler

    Declaration
    public override string description { get; protected set; }
    Property Value
    Type Description
    String
    Overrides
    CameraLabeler.description

    labelConfig

    The IdLabelConfig which associates objects with labels.

    Declaration
    public IdLabelConfig labelConfig { get; }
    Property Value
    Type Description
    IdLabelConfig

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

    Methods

    OnBeginRendering()

    Called just before the camera renders each frame the the labeler is enabled and ShouldCaptureThisFrame is true.

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

    OnVisualizerEnabledChanged(Boolean)

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

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

    Setup()

    Called just before the first call to OnUpdate() or OnBeginRendering(). 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<Int32, NativeSlice<UInt32>, IReadOnlyList<IdLabelEntry>>
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023