class documentation

class TemporalDetection(_HasID, Label): (source)

View In Hierarchy

A temporal detection in a video whose support is defined by a start and end frame.

Parameters
labelthe label string
supportthe [first, last] frame numbers, inclusive
confidencea confidence in [0, 1] for the detection
Class Method from_timestamps Creates a TemporalDetection instance from [start, stop] timestamps for the specified video.
Method to_timestamps Returns the [start, stop] timestamps, in seconds, for this temporal detection in the given video.
Class Variable confidence Undocumented
Class Variable label Undocumented
Class Variable support Undocumented

Inherited from _HasID:

Class Variable tags Undocumented
Instance Variable id Undocumented
Method _id.setter Undocumented
Property _id Undocumented

Inherited from Label (via _HasID):

Method delete_attribute Deletes the attribute with the given name.
Method get_attribute_value Gets the value of the attribute with the given name.
Method has_attribute Determines whether the label has an attribute with the given name.
Method iter_attributes Returns an iterator over the custom attributes of the label.
Method set_attribute_value Sets the value of the attribute with the given name.
@classmethod
def from_timestamps(cls, timestamps, sample=None, metadata=None, **kwargs): (source)

Creates a TemporalDetection instance from [start, stop] timestamps for the specified video.

You must provide either sample or metadata to inform the conversion.

Parameters
timestampsthe [start, stop] timestamps, in seconds or "HH:MM:SS.XXX" format
sample:Nonea video fiftyone.core.sample.Sample whose metadata field is populated
metadata:Nonea fiftyone.core.metadata.VideoMetadata instance
**kwargsadditional arguments for TemporalDetection
Returns
a TemporalDetection
def to_timestamps(self, sample=None, metadata=None): (source)

Returns the [start, stop] timestamps, in seconds, for this temporal detection in the given video.

You must provide either sample or metadata to inform the conversion.

Parameters
sample:Nonea video fiftyone.core.sample.Sample whose metadata field is populated
metadata:Nonea fiftyone.core.metadata.VideoMetadata instance
Returns
the [start, stop] timestamps of this detection, in seconds
confidence: None = (source)

Undocumented

Undocumented

Undocumented