docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class CameraLabeler

    Abstract class for defining custom annotation and metric generation to be run by PerceptionCamera. Instances of CameraLabeler on labelers will be invoked each frame the camera is set to capture data (see ShouldCaptureThisFrame).

    Inheritance
    object
    CameraLabeler
    BoundingBox2DLabeler
    ObjectCountLabeler
    RenderedObjectInfoLabeler
    SemanticSegmentationLabeler
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: UnityEngine.Perception.GroundTruth
    Assembly: solution.dll
    Syntax
    [Serializable]
    public abstract class CameraLabeler

    Fields

    Name Description
    enabled

    Whether the CameraLabeler should be set up and called each frame.

    Properties

    Name Description
    description

    A human-readable description of the labeler

    hudPanel

    The heads up display (HUD) panel. Generally used to add stats to the display.

    perceptionCamera

    The PerceptionCamera that contains this labeler.

    sensorHandle

    The SensorHandle for the PerceptionCamera that contains this labeler. Use this to report annotations and metrics.

    supportsVisualization

    Labelers should set this in their setup to define if they support realtime visualization of their data.

    Methods

    Name Description
    Cleanup()

    Called when the Labeler is about to be destroyed or removed from the PerceptionCamera. Use this to clean up to state.

    OnBeginRendering()

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

    OnUpdate()

    Called during the Update each frame the the labeler is enabled and ShouldCaptureThisFrame is true.

    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) https://docs.unity3d.com/Manual/GUIScriptingGuide.html system. This called is triggered from perceptionCamera.OnGUI call. This call happens immediately before OnVisualizeAdditionalUI() so that the visualization components are drawn below the UI elements.

    OnVisualizeAdditionalUI()

    In this pass, a labeler can add custom GUI controls to the scene. Important note, all labeler's additional GUIs need to use Unity's Immediate Mode GUI (IMGUI) https://docs.unity3d.com/Manual/GUIScriptingGuide.html system. This called is triggered from perceptionCamera.OnGUI call. This call happens immediately after the OnVisualize() so that the visualization components are drawn below the UI elements.

    OnVisualizerEnabledChanged(bool)

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

    Setup()

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

    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)