docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class DatasetCapture

    Global manager for frame scheduling and output capture for simulations. Data capture follows the schema defined in TODO: Expose schema publicly

    Inheritance
    object
    DatasetCapture
    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
    Assembly: Unity.Perception.Runtime.dll
    Syntax
    public static class DatasetCapture

    Properties

    activateEndpoint

    Retrieve a handle to the active endpoint.

    Declaration
    public static IConsumerEndpoint activateEndpoint { get; }
    Property Value
    Type Description
    IConsumerEndpoint

    perceptionVersion

    The current perception version

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

    schemaVersion

    The json metadata schema version the DatasetCapture's output conforms to.

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

    Methods

    GetSequenceAndStepFromFrame(int)

    Retrieves the sequence and step numbers from a simulation frame.

    Declaration
    public static (int sequence, int step) GetSequenceAndStepFromFrame(int frame)
    Parameters
    Type Name Description
    int frame

    The simulation frame

    Returns
    Type Description
    (int sequence, int step)

    The sequence and step numbers

    OverrideEndpoint(IConsumerEndpoint)

    Overrides the currently configured endpoint.

    Declaration
    public static void OverrideEndpoint(IConsumerEndpoint endpoint)
    Parameters
    Type Name Description
    IConsumerEndpoint endpoint

    The new endpoint to configure.

    RegisterAnnotationDefinition(AnnotationDefinition)

    Registers an annotation with the running simulation.

    Declaration
    public static void RegisterAnnotationDefinition(AnnotationDefinition definition)
    Parameters
    Type Name Description
    AnnotationDefinition definition

    The annotation to register

    RegisterMetric(MetricDefinition)

    Registers a metric with the running simulation.

    Declaration
    public static void RegisterMetric(MetricDefinition metricDefinition)
    Parameters
    Type Name Description
    MetricDefinition metricDefinition

    The metric to register

    RegisterSensor(SensorDefinition)

    Registers a sensor with the current simulation.

    Declaration
    public static SensorHandle RegisterSensor(SensorDefinition sensor)
    Parameters
    Type Name Description
    SensorDefinition sensor

    The sensor to register

    Returns
    Type Description
    SensorHandle

    A handle to the registered sensor

    ReportMetadata(string, bool)

    Report simulation metadata

    Declaration
    public static void ReportMetadata(string key, bool value)
    Parameters
    Type Name Description
    string key

    The key of the metadata

    bool value

    The value of the metadata

    ReportMetadata(string, bool[])

    Report simulation metadata

    Declaration
    public static void ReportMetadata(string key, bool[] value)
    Parameters
    Type Name Description
    string key

    The key of the metadata

    bool[] value

    The value of the metadata

    ReportMetadata(string, int)

    Report simulation metadata

    Declaration
    public static void ReportMetadata(string key, int value)
    Parameters
    Type Name Description
    string key

    The key of the metadata

    int value

    The value of the metadata

    ReportMetadata(string, int[])

    Report simulation metadata

    Declaration
    public static void ReportMetadata(string key, int[] value)
    Parameters
    Type Name Description
    string key

    The key of the metadata

    int[] value

    The value of the metadata

    ReportMetadata(string, float)

    Report simulation metadata

    Declaration
    public static void ReportMetadata(string key, float value)
    Parameters
    Type Name Description
    string key

    The key of the metadata

    float value

    The value of the metadata

    ReportMetadata(string, float[])

    Report simulation metadata

    Declaration
    public static void ReportMetadata(string key, float[] value)
    Parameters
    Type Name Description
    string key

    The key of the metadata

    float[] value

    The value of the metadata

    ReportMetadata(string, string)

    Report simulation metadata

    Declaration
    public static void ReportMetadata(string key, string value)
    Parameters
    Type Name Description
    string key

    The key of the metadata

    string value

    The value of the metadata

    ReportMetadata(string, string[])

    Report simulation metadata

    Declaration
    public static void ReportMetadata(string key, string[] value)
    Parameters
    Type Name Description
    string key

    The key of the metadata

    string[] value

    The value of the metadata

    ReportMetadata(string, uint)

    Report simulation metadata

    Declaration
    public static void ReportMetadata(string key, uint value)
    Parameters
    Type Name Description
    string key

    The key of the metadata

    uint value

    The value of the metadata

    ReportMetric(MetricDefinition)

    Reports a metric for the activate frame that is not associated with a sensor or an annotation. To report a metric associated with an annotation use ReportMetric(MetricDefinition, Metric), to report a metric associated with a sensor user ReportMetric(MetricDefinition, Metric).

    Declaration
    public static AsyncFuture<Metric> ReportMetric(MetricDefinition definition)
    Parameters
    Type Name Description
    MetricDefinition definition

    The metric definition to use

    Returns
    Type Description
    AsyncFuture<Metric>

    Metric to be reported

    ReportMetric(MetricDefinition, Metric)

    Reports a metric for the activate frame that is not associated with a sensor or an annotation. To report a metric associated with an annotation use ReportMetric(MetricDefinition, Metric), to report a metric associated with a sensor user ReportMetric(MetricDefinition, Metric).

    Declaration
    public static void ReportMetric(MetricDefinition definition, Metric metric)
    Parameters
    Type Name Description
    MetricDefinition definition

    The metric definition to use

    Metric metric

    The metric to report

    ResetSimulation()

    Shuts down the active simulation and starts a new simulation.

    Declaration
    public static void ResetSimulation()

    SetOutputPath(string)

    Sets the current output path for IFileSystemEndpoint endpoints. This will set the path for the next simulation, it will not affect a simulation that is currently executing. In order for this to take effect the caller should call ResetSimulation()

    Declaration
    public static void SetOutputPath(string outputPath)
    Parameters
    Type Name Description
    string outputPath

    The path to set

    Remarks

    If the current endpoint is not an IFileSystemEndpoint the value will be unused

    StartNewSequence()

    Starts a new sequence in the capture.

    Declaration
    public static void StartNewSequence()

    Events

    SimulationEnding

    Called when the simulation ends. The simulation ends on playmode exit, application exit, or when ResetSimulation() is called.

    Declaration
    public static event Action SimulationEnding
    Event Type
    Type Description
    Action
    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)