Class LabelConfig<T> | Perception | 0.5.0-preview.1
docs.unity3d.com
    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, Boolean)
    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, Boolean)
    Object.Destroy(Object, Single)
    Object.Destroy(Object)
    Object.DestroyImmediate(Object, Boolean)
    Object.DestroyImmediate(Object)
    Object.FindObjectsOfType(Type)
    Object.DontDestroyOnLoad(Object)
    Object.DestroyObject(Object, Single)
    Object.DestroyObject(Object)
    Object.FindSceneObjectsOfType(Type)
    Object.FindObjectsOfTypeIncludingAssets(Type)
    Object.FindObjectsOfType<T>()
    Object.FindObjectOfType<T>()
    Object.FindObjectsOfTypeAll(Type)
    Object.FindObjectOfType(Type)
    Object.ToString()
    Object.name
    Object.hideFlags
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: UnityEngine.Perception.GroundTruth
    Syntax
    public class LabelConfig<T> : ScriptableObject where T : ILabelEntry
    Type Parameters
    Name Description
    T

    The entry type. Must derive from ILabelEntry

    Fields

    labelEntriesFieldName

    The name of the serialized field for label entries.

    Declaration
    public const string labelEntriesFieldName = "m_LabelEntries"
    Field Value
    Type Description
    String

    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

    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 UnityEngine.Perception.GroundTruth.LabelConfig`1.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
    Boolean

    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 UnityEngine.Perception.GroundTruth.LabelConfig`1.m_LabelEntries.

    TryGetMatchingConfigurationEntry(Labeling, out T, out Int32)

    Attempts to find the matching index in UnityEngine.Perception.GroundTruth.LabelConfig`1.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.

    Int32 labelEntryIndex

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

    -1
    if no match was found.

    Returns
    Type Description
    Boolean

    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 UnityEngine.Perception.GroundTruth.LabelConfig`1.m_LabelEntries.

    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