docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class PerceptionEndpoint

    Endpoint to write out generated data in the perception format.

    Inheritance
    object
    PerceptionEndpoint
    Implements
    IConsumerEndpoint
    ICloneable
    IFileSystemEndpoint
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: UnityEngine.Perception.GroundTruth.Consumers
    Assembly: Unity.Perception.Runtime.dll
    Syntax
    [Serializable]
    public class PerceptionEndpoint : IConsumerEndpoint, ICloneable, IFileSystemEndpoint

    Fields

    capturesPerFile

    The number of captures to write to a single captures file.

    Declaration
    public int capturesPerFile
    Field Value
    Type Description
    int

    m_CurrentPathDoNotUseDirectly

    The runtime resolved directory path where the dataset will be written to. This value should not be accessed directly. Please use currentPath

    Declaration
    protected string m_CurrentPathDoNotUseDirectly
    Field Value
    Type Description
    string

    metricsPerFile

    The number of metrics to write to a single metrics file.

    Declaration
    public int metricsPerFile
    Field Value
    Type Description
    int

    Properties

    basePath

    The base path the endpoint will write to

    Declaration
    public virtual string basePath { get; set; }
    Property Value
    Type Description
    string

    currentFrame

    Current frame in the dataset generation

    Declaration
    public int currentFrame { get; }
    Property Value
    Type Description
    int

    currentPath

    The current base path that generated data is being serialized to. This path is the base path plus a GUID. If the base is set to default or if the simulation is being run in USim, then this path will be the default simulation path.

    Declaration
    public virtual string currentPath { get; }
    Property Value
    Type Description
    string

    datasetPath

    The path that the dataset json files are written to.

    Declaration
    public string datasetPath { get; }
    Property Value
    Type Description
    string

    defaultPath

    The default path the endpoint will write to

    Declaration
    public string defaultPath { get; }
    Property Value
    Type Description
    string

    description

    The human readable description of the endpoint

    Declaration
    public string description { get; }
    Property Value
    Type Description
    string

    version

    output version

    Declaration
    public static string version { get; }
    Property Value
    Type Description
    string

    Methods

    AnnotationRegistered(AnnotationDefinition)

    Called when an annotation is registered with the perception engine.

    Declaration
    public void AnnotationRegistered(AnnotationDefinition annotationDefinition)
    Parameters
    Type Name Description
    AnnotationDefinition annotationDefinition

    The registered annotation definition

    Clone()

    Creates a copy of PerceptionEndpoint. Copies capturesPerFile and metricsPerFile

    Declaration
    public object Clone()
    Returns
    Type Description
    object

    New object PerceptionEndpoint

    FrameGenerated(Frame)

    Called at the end of each frame. Contains all of the generated data for the frame. This method is called after the frame has entirely finished processing.

    Declaration
    public void FrameGenerated(Frame frame)
    Parameters
    Type Name Description
    Frame frame

    The frame data.

    IsValid(out string)

    Checks to see if an endpoint is configured properly. If an endpoint is invalid the endpoint will not be able to properly produce generated data.

    Declaration
    public bool IsValid(out string errorMessage)
    Parameters
    Type Name Description
    string errorMessage

    If validation fails, this will be updated with an error message

    Returns
    Type Description
    bool

    True if validation is successful

    MetricRegistered(MetricDefinition)

    Called when a metric is registered with the perception engine.

    Declaration
    public void MetricRegistered(MetricDefinition metricDefinition)
    Parameters
    Type Name Description
    MetricDefinition metricDefinition

    The registered metric definition

    RegisterFile(string)

    Override this method to register a newly written file after it is written to disk.

    Declaration
    public virtual void RegisterFile(string path)
    Parameters
    Type Name Description
    string path

    ResumeSimulationFromCrash(int)

    Placeholder for crash resumption logic.

    Declaration
    public (string, int) ResumeSimulationFromCrash(int maxFrameCount)
    Parameters
    Type Name Description
    int maxFrameCount
    Returns
    Type Description
    (string, int)
    Remarks

    Not supported for Perception Endpoint

    SensorRegistered(SensorDefinition)

    Called when a sensor is registered with the perception engine.

    Declaration
    public void SensorRegistered(SensorDefinition sensor)
    Parameters
    Type Name Description
    SensorDefinition sensor

    The registered sensor definition

    SimulationCompleted(SimulationMetadata)

    Called at the end of the simulation. Contains metadata describing the entire simulation process.

    Declaration
    public void SimulationCompleted(SimulationMetadata metadata)
    Parameters
    Type Name Description
    SimulationMetadata metadata

    Metadata describing the entire simulation process

    SimulationStarted(SimulationMetadata)

    Called when the simulation begins. Provides simulation wide metadata to the consumer.

    Declaration
    public void SimulationStarted(SimulationMetadata metadata)
    Parameters
    Type Name Description
    SimulationMetadata metadata

    Metadata describing the active simulation

    Implements

    IConsumerEndpoint
    ICloneable
    IFileSystemEndpoint
    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)