Class PerceptionEndpoint
Endpoint to write out generated data in the perception format.
Namespace: UnityEngine.Perception.GroundTruth.Consumers
Syntax
public class PerceptionEndpoint : object, IConsumerEndpoint, ICloneable, IFileSystemEndpoint
Fields
capturesPerFile
The number of captures to write to a single captures file.
Declaration
public int capturesPerFile
Field Value
Type | Description |
---|---|
Int32 |
m_CurrentPath
The runtime resolved directory path where the dataset will be written to.
Declaration
protected string m_CurrentPath
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 |
---|---|
Int32 |
Properties
basePath
The base path the endpoint will write to
Declaration
public virtual string basePath { get; set; }
Property Value
Type | Description |
---|---|
String |
Implements
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 |
Implements
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 to user if a user does not set a custom storage directory
Declaration
public virtual string defaultPath { get; }
Property Value
Type | Description |
---|---|
String |
Implements
defaultPathToken
Special token for the default storage directory. This is used to represent the default area because that value is generally in a user's local storage
Declaration
public string defaultPathToken { get; }
Property Value
Type | Description |
---|---|
String |
Implements
description
The human readable description of the endpoint
Declaration
public string description { get; }
Property Value
Type | Description |
---|---|
String |
Implements
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 |
Implements
Clone()
Declaration
public object Clone()
Returns
Type | Description |
---|---|
Object |
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. |
Implements
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 |
Implements
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 |
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 |
Implements
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 |
Implements
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 |