docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class IdLabelConfig

    A definition for how a Labeling should be resolved to a single label and id for ground truth generation.

    Inheritance
    object
    Object
    ScriptableObject
    LabelConfig<IdLabelEntry>
    IdLabelConfig
    Inherited Members
    LabelConfig<IdLabelEntry>.m_LabelEntries
    LabelConfig<IdLabelEntry>.labelEntries
    LabelConfig<IdLabelEntry>.TryGetMatchingConfigurationEntry(Labeling, out IdLabelEntry)
    LabelConfig<IdLabelEntry>.DoesLabelMatchAnEntry(string)
    LabelConfig<IdLabelEntry>.Init(IEnumerable<IdLabelEntry>)
    LabelConfig<IdLabelEntry>.TryGetMatchingConfigurationEntry(Labeling, out IdLabelEntry, out int)
    ScriptableObject.SetDirty()
    ScriptableObject.CreateInstance(string)
    ScriptableObject.CreateInstance(Type)
    ScriptableObject.CreateInstance<T>()
    Object.GetInstanceID()
    Object.GetHashCode()
    Object.Equals(object)
    Object.Instantiate(Object, Vector3, Quaternion)
    Object.Instantiate(Object, Vector3, Quaternion, Transform)
    Object.Instantiate(Object)
    Object.Instantiate(Object, Transform)
    Object.Instantiate(Object, Transform, bool)
    Object.Instantiate<T>(T)
    Object.Instantiate<T>(T, Vector3, Quaternion)
    Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
    Object.Instantiate<T>(T, Transform)
    Object.Instantiate<T>(T, Transform, bool)
    Object.Destroy(Object, float)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, bool)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.FindObjectsOfType(Type, bool)
    Object.FindObjectsByType(Type, FindObjectsSortMode)
    Object.FindObjectsByType(Type, FindObjectsInactive, FindObjectsSortMode)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, float)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectsByType<T>(FindObjectsSortMode)
    Object.FindObjectsOfType<T>(bool)
    Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
    Object.FindObjectOfType<T>()
    Object.FindObjectOfType<T>(bool)
    Object.FindFirstObjectByType<T>()
    Object.FindAnyObjectByType<T>()
    Object.FindFirstObjectByType<T>(FindObjectsInactive)
    Object.FindAnyObjectByType<T>(FindObjectsInactive)
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.FindFirstObjectByType(Type)
    Object.FindAnyObjectByType(Type)
    Object.FindObjectOfType(Type, bool)
    Object.FindFirstObjectByType(Type, FindObjectsInactive)
    Object.FindAnyObjectByType(Type, FindObjectsInactive)
    Object.ToString()
    Object.name
    Object.hideFlags
    object.Equals(object, object)
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: UnityEngine.Perception.GroundTruth.LabelManagement
    Assembly: Unity.Perception.Runtime.dll
    Syntax
    [CreateAssetMenu(fileName = "IdLabelConfig", menuName = "Perception/ID Label Config", order = 1)]
    [MovedFrom("UnityEngine.Perception.GroundTruth")]
    public class IdLabelConfig : LabelConfig<IdLabelEntry>

    Fields

    autoAssignIds

    Whether the inspector will auto-assign ids based on the id of the first element.

    Declaration
    public bool autoAssignIds
    Field Value
    Type Description
    bool

    startingLabelId

    Whether the inspector will start label ids at zero or one when autoAssignIds is enabled.

    Declaration
    public StartingLabelId startingLabelId
    Field Value
    Type Description
    StartingLabelId

    Methods

    CreateLabelEntryMatchCache(Allocator)

    Creates a LabelEntryMatchCache from the currently registered labeled objects, which can be used to look up labeling information in future frames, even after the objects have been destroyed. Due to timing of labeled object registration, if this is called during or before LateUpdate, this cache may become invalid.

    It is recommended to only use this method in rendering, as the cache is guaranteed to be in its final state for ground truth generation.

    Declaration
    public LabelEntryMatchCache CreateLabelEntryMatchCache(Allocator allocator)
    Parameters
    Type Name Description
    Allocator allocator

    The allocator for creating the cache.

    Returns
    Type Description
    LabelEntryMatchCache

    The created cache.

    GetAnnotationSpecification()

    Returns the label entries as structures suited for writing out to JSON datasets.

    Declaration
    public IdLabelConfig.LabelEntrySpec[] GetAnnotationSpecification()
    Returns
    Type Description
    LabelEntrySpec[]

    The JSON ready label entries.

    OnInit()

    Called when the labelEntries list is assigned using Init(IEnumerable<T>)

    Declaration
    protected override void OnInit()
    Overrides
    LabelConfig<IdLabelEntry>.OnInit()

    TryGetLabelEntryFromInstanceId(uint, out IdLabelEntry)

    Attempts to find the label id for the given instance id.

    Declaration
    public bool TryGetLabelEntryFromInstanceId(uint instanceId, out IdLabelEntry labelEntry)
    Parameters
    Type Name Description
    uint instanceId

    The instanceId of the object for which the labelId should be found

    IdLabelEntry labelEntry

    The LabelEntry associated with the object. default if not found

    Returns
    Type Description
    bool

    True if a labelId is found for the given instanceId.

    TryGetLabelEntryFromInstanceId(uint, out IdLabelEntry, out int)

    Attempts to find the label id for the given instance id.

    Declaration
    public bool TryGetLabelEntryFromInstanceId(uint instanceId, out IdLabelEntry labelEntry, out int index)
    Parameters
    Type Name Description
    uint instanceId

    The instanceId of the object for which the labelId should be found

    IdLabelEntry labelEntry

    The LabelEntry associated with the object. default if not found

    int index

    The index of the found LabelEntry in labelEntries. -1 if not found

    Returns
    Type Description
    bool

    True if a labelId is found for the given instanceId.

    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)