docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class LabelConfig<T>

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

    Inheritance
    object
    Object
    ScriptableObject
    LabelConfig<T>
    IdLabelConfig
    SemanticSegmentationLabelConfig
    Inherited Members
    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
    [MovedFrom("UnityEngine.Perception.GroundTruth")]
    public class LabelConfig<T> : ScriptableObject where T : ILabelEntry
    Type Parameters
    Name Description
    T

    The entry type. Must derive from ILabelEntry

    Fields

    m_LabelEntries

    List of LabelEntry items added to this label configuration

    Declaration
    [FormerlySerializedAs("LabelEntries")]
    [FormerlySerializedAs("LabelingConfigurations")]
    [SerializeField]
    protected List<T> m_LabelEntries
    Field Value
    Type Description
    List<T>

    Properties

    labelEntries

    A sequence of ILabelEntry which defines the labels relevant for this configuration and their values.

    Declaration
    public IReadOnlyList<T> labelEntries { get; }
    Property Value
    Type Description
    IReadOnlyList<T>

    Methods

    DoesLabelMatchAnEntry(string)

    Does the given string match any of the label entries added to this label configuration.

    Declaration
    public bool DoesLabelMatchAnEntry(string label)
    Parameters
    Type Name Description
    string label
    Returns
    Type Description
    bool

    Init(IEnumerable<T>)

    Initialize the list of LabelEntries on this LabelingConfiguration. Should only be called immediately after instantiation.

    Declaration
    public void Init(IEnumerable<T> newLabelEntries)
    Parameters
    Type Name Description
    IEnumerable<T> newLabelEntries

    The LabelEntry values to associate with this LabelingConfiguration

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown once the LabelConfig has been used at runtime. The specific timing of this depends on the LabelConfig implementation.

    OnInit()

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

    Declaration
    protected virtual void OnInit()

    TryGetMatchingConfigurationEntry(Labeling, out T)

    Attempts to find the matching index in m_LabelEntries for the given Labeling.

    Declaration
    public bool TryGetMatchingConfigurationEntry(Labeling labeling, out T labelEntry)
    Parameters
    Type Name Description
    Labeling labeling

    The Labeling to match

    T labelEntry

    When this method returns, contains the matching ILabelEntry, or

    default
    if no match was found.
    Returns
    Type Description
    bool

    Returns true if a match was found. False if not.

    Remarks

    The matching index is the first class name in the given Labeling which matches an entry in m_LabelEntries.

    TryGetMatchingConfigurationEntry(Labeling, out T, out int)

    Attempts to find the matching index in m_LabelEntries for the given Labeling.

    Declaration
    public bool TryGetMatchingConfigurationEntry(Labeling labeling, out T labelEntry, out int labelEntryIndex)
    Parameters
    Type Name Description
    Labeling labeling

    The Labeling to match

    T labelEntry

    When this method returns, contains the matching ILabelEntry, or

    default
    if no match was found.
    int labelEntryIndex

    When this method returns, contains the index of the matching ILabelEntry, or

    -1
    if no match was found.
    Returns
    Type Description
    bool

    Returns true if a match was found. False if not.

    Remarks

    The matching index is the first class name in the given Labeling which matches an entry in m_LabelEntries.

    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)