Class BoundingBox2DLabeler | Perception | 0.5.0-preview.1
docs.unity3d.com
    Show / Hide Table of Contents

    Class BoundingBox2DLabeler

    Produces 2d bounding box annotations for all visible objects each frame.

    Inheritance
    Object
    CameraLabeler
    BoundingBox2DLabeler
    Inherited Members
    CameraLabeler.enabled
    CameraLabeler.hudPanel
    CameraLabeler.perceptionCamera
    CameraLabeler.sensorHandle
    CameraLabeler.OnVisualizerEnabledChanged(Boolean)
    CameraLabeler.OnUpdate()
    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 BoundingBox2DLabeler : CameraLabeler

    Constructors

    BoundingBox2DLabeler()

    Creates a new BoundingBox2DLabeler. Be sure to assign idLabelConfig before adding to a PerceptionCamera.

    Declaration
    public BoundingBox2DLabeler()

    BoundingBox2DLabeler(IdLabelConfig)

    Creates a new BoundingBox2DLabeler with the given IdLabelConfig.

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

    The label config for resolving the label for each object.

    Fields

    annotationId

    The GUID id to associate with the annotations produced by this labeler.

    Declaration
    public string annotationId
    Field Value
    Type Description
    String

    idLabelConfig

    The IdLabelConfig which associates objects with labels.

    Declaration
    [FormerlySerializedAs("labelingConfiguration")]
    public IdLabelConfig idLabelConfig
    Field Value
    Type Description
    IdLabelConfig

    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

    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()

    OnVisualize()

    Labeling pass to display labeler's visualization components, if applicable. Important note, all labeler's visualizations need to use Unity's Immediate Mode GUI (IMGUI) system. This called is triggered from call. This call happens immediately before OnVisualizeAdditionalUI() so that the visualization components are drawn below the UI elements.

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

    Setup()

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

    Declaration
    protected override void Setup()
    Overrides
    CameraLabeler.Setup()
    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