class documentation
class TrajectoriesView(ClipsView): (source)
Constructor: TrajectoriesView(source_collection, clips_stage, clips_dataset, _stages, ...)
A ClipsView
of object trajectories from a video
fiftyone.core.dataset.Dataset
.
Trajectories views contain an ordered collection of clips, each of which corresponds to a unique object trajectory from the source collection.
Clips retrieved from trajectories views are returned as ClipView
objects.
Parameters | |
source | the
fiftyone.core.collections.SampleCollection from which this
view was created |
clips | the fiftyone.core.stages.ToTrajectories stage
that defines how the clips were created |
clips | the fiftyone.core.dataset.Dataset that serves
the clips in this view |
Method | __copy__ |
Undocumented |
Method | __init__ |
Undocumented |
Class Variable | __slots__ |
Undocumented |
Property | is |
Whether the view is a saved view or not. |
Property | media |
The media type of the view. |
Property | name |
The name of the view if it is a saved view; otherwise None. |
Static Method | _make |
Undocumented |
Method | _set |
Undocumented |
Method | _set |
Undocumented |
Instance Variable | __media |
Undocumented |
Instance Variable | __name |
Undocumented |
Instance Variable | __stages |
Undocumented |
Instance Variable | _classification |
Undocumented |
Instance Variable | _clips |
Undocumented |
Instance Variable | _clips |
Undocumented |
Instance Variable | _num |
Undocumented |
Instance Variable | _source |
Undocumented |
Property | _all |
Undocumented |
Property | _stages |
Undocumented |
Inherited from ClipsView
:
Method | keep |
Deletes all clips that are not in this view from the underlying dataset. |
Method | keep |
Deletes any frame fields that have been excluded in this view from the frames of the underlying dataset. |
Method | reload |
Reloads the view. |
Method | save |
Saves the clips in this view to the underlying dataset. |
Method | set |
Sets the fields of the specified labels in the collection to the given values. |
Method | set |
Sets the field or embedded field on each sample or frame in the collection to the given values. |
Static Method | _get |
Undocumented |
Method | _sync |
Undocumented |
Method | _sync |
Undocumented |
Method | _sync |
Undocumented |
Method | _sync |
Undocumented |
Method | _tag |
Undocumented |
Method | _to |
Undocumented |
Method | _untag |
Undocumented |
Property | _base |
Undocumented |
Property | _dataset |
The fiftyone.core.dataset.Dataset that serves the samples in this collection. |
Property | _root |
The root fiftyone.core.dataset.Dataset from which this collection is derived. |
Property | _sample |
Undocumented |
Inherited from DatasetView
(via ClipsView
):
Method | __eq__ |
Undocumented |
Method | __getitem__ |
Undocumented |
Method | __len__ |
Undocumented |
Method | app |
Undocumented |
Method | classes |
Undocumented |
Method | clear |
Deletes all samples in the view from the underlying dataset. |
Method | clear |
Clears the values of the frame-level field from all samples in the view. |
Method | clear |
Clears the values of the frame-level fields from all samples in the view. |
Method | clear |
Deletes all frame labels from the samples in the view from the underlying dataset. |
Method | clear |
Clears the values of the field from all samples in the view. |
Method | clear |
Clears the values of the fields from all samples in the view. |
Method | clone |
Creates a new dataset containing a copy of the contents of the view. |
Method | clone |
Clones the frame-level field of the view into a new field. |
Method | clone |
Clones the frame-level fields of the view into new frame-level fields of the dataset. |
Method | clone |
Clones the given sample field of the view into a new field of the dataset. |
Method | clone |
Clones the given sample fields of the view into new fields of the dataset. |
Method | default |
Undocumented |
Method | default |
Undocumented |
Method | default |
Undocumented |
Method | description |
Undocumented |
Method | ensure |
Ensures that the video view contains frame instances for every frame of each sample's source video. |
Method | get |
Returns a view containing the samples from a dynamic grouped view with the given group value. |
Method | get |
Returns a schema dictionary describing the fields of the samples in the view. |
Method | get |
Returns a schema dictionary describing the fields of the frames of the samples in the view. |
Method | get |
Returns a dict containing the samples for the given group ID. |
Method | group |
Undocumented |
Method | info |
Undocumented |
Method | iter |
Returns an iterator over the dynamic groups in the view. |
Method | iter |
Returns an iterator over the groups in the view. |
Method | iter |
Returns an iterator over the samples in the view. |
Method | keep |
For each sample in the view, deletes all frames labels that are not in the view from the underlying dataset. |
Method | mask |
Undocumented |
Method | skeletons |
Undocumented |
Method | summary |
Returns a string summary of the view. |
Method | tags |
Undocumented |
Method | to |
Returns a JSON dictionary representation of the view. |
Method | view |
Returns a copy of this view. |
Property | app |
Dataset-specific settings that customize how this collection is visualized in the :ref:`FiftyOne App <fiftyone-app>`. |
Property | classes |
The classes of the underlying dataset. |
Property | dataset |
The name of the underlying dataset. |
Property | default |
The default classes of the underlying dataset. |
Property | default |
The default group slice of the view, or None if the view is not grouped. |
Property | default |
The default mask targets of the underlying dataset. |
Property | default |
The default keypoint skeleton of the underlying dataset. |
Property | description |
A description of the underlying dataset. |
Property | group |
The group field of the view, or None if the view is not grouped. |
Property | group |
A dict mapping group slices to media types, or None if the view is not grouped. |
Property | group |
The current group slice of the view, or None if the view is not grouped. |
Property | group |
The list of group slices of the view, or None if the view is not grouped. |
Property | info |
The info dict of the underlying dataset. |
Property | mask |
The mask targets of the underlying dataset. |
Property | skeletons |
The keypoint skeletons of the underlying dataset. |
Property | tags |
The list of tags of the underlying dataset. |
Static Method | _build |
Undocumented |
Method | _add |
Returns a fiftyone.core.view.DatasetView containing the contents of the collection with the given fiftyone.core.stages.ViewStage` appended to its aggregation pipeline. |
Method | _aggregate |
Runs the MongoDB aggregation pipeline on the collection and returns the result. |
Method | _dynamic |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _init |
Undocumented |
Method | _init |
Undocumented |
Method | _iter |
Undocumented |
Method | _iter |
Undocumented |
Method | _iter |
Undocumented |
Method | _make |
Undocumented |
Method | _make |
Undocumented |
Method | _make |
Undocumented |
Method | _needs |
Undocumented |
Method | _outputs |
Undocumented |
Method | _parse |
Undocumented |
Method | _pipeline |
Returns the MongoDB aggregation pipeline for the collection. |
Method | _serialize |
Undocumented |
Method | _slice |
Undocumented |
Instance Variable | __dataset |
Undocumented |
Instance Variable | __group |
Undocumented |
Instance Variable | _make |
Undocumented |
Instance Variable | _make |
Undocumented |
Property | _frame |
Undocumented |
Property | _has |
Undocumented |
Property | _is |
Whether this collection contains clips. |
Property | _is |
Whether this collection contains dynamic groups. |
Property | _is |
Whether this collection contains frames of a video dataset. |
Property | _is |
Whether this collection's contents is generated from another collection. |
Property | _is |
Whether this collection contains patches. |
Property | _parent |
Undocumented |
Inherited from SampleCollection
(via ClipsView
, DatasetView
):
Class Method | list |
Returns a list of all available methods on this collection that apply fiftyone.core.aggregations.Aggregation operations to this collection. |
Class Method | list |
Returns a list of all available methods on this collection that apply fiftyone.core.stages.ViewStage operations to this collection. |
Method | __add__ |
Undocumented |
Method | __bool__ |
Undocumented |
Method | __contains__ |
Undocumented |
Method | __iter__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | add |
Applies the given fiftyone.core.stages.ViewStage to the collection. |
Method | aggregate |
Aggregates one or more fiftyone.core.aggregations.Aggregation instances. |
Method | annotate |
Exports the samples and optional label field(s) in this collection to the given annotation backend. |
Method | apply |
Applies the model to the samples in the collection. |
Method | bounds |
Computes the bounds of a numeric field of the collection. |
Method | compute |
Computes embeddings for the samples in the collection using the given model. |
Method | compute |
Populates the metadata field of all samples in the collection. |
Method | compute |
Computes embeddings for the image patches defined by patches_field of the samples in the collection using the given model. |
Method | concat |
Concatenates the contents of the given SampleCollection to this collection. |
Method | count |
Counts the number of field values in the collection. |
Method | count |
Counts the occurrences of all label tags in the specified label field(s) of this collection. |
Method | count |
Counts the occurrences of sample tags in this collection. |
Method | count |
Counts the occurrences of field values in the collection. |
Method | create |
Creates an index on the given field or with the given specification, if necessary. |
Method | delete |
Deletes the annotation run with the given key from this collection. |
Method | delete |
Deletes all annotation runs from this collection. |
Method | delete |
Deletes the brain method run with the given key from this collection. |
Method | delete |
Deletes all brain method runs from this collection. |
Method | delete |
Deletes the evaluation results associated with the given evaluation key from this collection. |
Method | delete |
Deletes all evaluation results from this collection. |
Method | delete |
Deletes the run with the given key from this collection. |
Method | delete |
Deletes all runs from this collection. |
Method | distinct |
Computes the distinct values of a field in the collection. |
Method | draw |
Renders annotated versions of the media in the collection with the specified label data overlaid to the given directory. |
Method | drop |
Drops the index for the given field or name, if necessary. |
Method | evaluate |
Evaluates the classification predictions in this collection with respect to the specified ground truth labels. |
Method | evaluate |
Evaluates the specified predicted detections in this collection with respect to the specified ground truth detections. |
Method | evaluate |
Evaluates the regression predictions in this collection with respect to the specified ground truth values. |
Method | evaluate |
Evaluates the specified semantic segmentation masks in this collection with respect to the specified ground truth masks. |
Method | exclude |
Excludes the samples with the given IDs from the collection. |
Method | exclude |
Excludes the samples with the given field values from the collection. |
Method | exclude |
Excludes the fields with the given names from the samples in the collection. |
Method | exclude |
Excludes the frames with the given IDs from the video collection. |
Method | exclude |
Excludes the groups with the given IDs from the grouped collection. |
Method | exclude |
Excludes the specified labels from the collection. |
Method | exists |
Returns a view containing the samples in the collection that have (or do not have) a non-None value for the given field or embedded field. |
Method | export |
Exports the samples in the collection to disk. |
Method | filter |
Filters the values of a field or embedded field of each sample in the collection. |
Method | filter |
Filters the individual fiftyone.core.labels.Keypoint.points elements in the specified keypoints field of each sample in the collection. |
Method | filter |
Filters the fiftyone.core.labels.Label field of each sample in the collection. |
Method | first |
Returns the first sample in the collection. |
Method | flatten |
Returns a flattened view that contains all samples in the dynamic grouped collection. |
Method | geo |
Sorts the samples in the collection by their proximity to a specified geolocation. |
Method | geo |
Filters the samples in this collection to only include samples whose geolocation is within a specified boundary. |
Method | get |
Returns information about the annotation run with the given key on this collection. |
Method | get |
Returns information about the brain method run with the given key on this collection. |
Method | get |
Gets the classes list for the given field, or None if no classes are available. |
Method | get |
Returns a schema dictionary describing the dynamic fields of the samples in the collection. |
Method | get |
Returns a schema dictionary describing the dynamic fields of the frames in the collection. |
Method | get |
Returns information about the evaluation with the given key on this collection. |
Method | get |
Returns the field instance of the provided path, or None if one does not exist. |
Method | get |
Returns a dictionary of information about the indexes on this collection. |
Method | get |
Gets the mask targets for the given field, or None if no mask targets are available. |
Method | get |
Returns information about the run with the given key on this collection. |
Method | get |
Gets the keypoint skeleton for the given field, or None if no skeleton is available. |
Method | group |
Creates a view that groups the samples in the collection by a specified field or expression. |
Method | has |
Whether this collection has an annotation run with the given key. |
Method | has |
Whether this collection has a brain method run with the given key. |
Method | has |
Determines whether this collection has a classes list for the given field. |
Method | has |
Whether this collection has an evaluation with the given key. |
Method | has |
Determines whether the collection has a field with the given name. |
Method | has |
Determines whether the collection has a frame-level field with the given name. |
Method | has |
Determines whether this collection has mask targets for the given field. |
Method | has |
Whether this collection has a run with the given key. |
Method | has |
Determines whether the collection has a sample field with the given name. |
Method | has |
Determines whether this collection has a keypoint skeleton for the given field. |
Method | head |
Returns a list of the first few samples in the collection. |
Method | histogram |
Computes a histogram of the field values in the collection. |
Method | init |
Initializes a config instance for a new run. |
Method | init |
Initializes a results instance for the run with the given key. |
Method | last |
Returns the last sample in the collection. |
Method | limit |
Returns a view with at most the given number of samples. |
Method | limit |
Limits the number of fiftyone.core.labels.Label instances in the specified labels list field of each sample in the collection. |
Method | list |
Returns a list of annotation keys on this collection. |
Method | list |
Returns a list of brain keys on this collection. |
Method | list |
Returns a list of evaluation keys on this collection. |
Method | list |
Returns the list of index names on this collection. |
Method | list |
Returns a list of run keys on this collection. |
Method | list |
Extracts the value type(s) in a specified list field across all samples in the collection. |
Method | load |
Loads the results for the annotation run with the given key on this collection. |
Method | load |
Loads the fiftyone.core.view.DatasetView on which the specified annotation run was performed on this collection. |
Method | load |
Downloads the labels from the given annotation run from the annotation backend and merges them into this collection. |
Method | load |
Loads the results for the brain method run with the given key on this collection. |
Method | load |
Loads the fiftyone.core.view.DatasetView on which the specified brain method run was performed on this collection. |
Method | load |
Loads the results for the evaluation with the given key on this collection. |
Method | load |
Loads the fiftyone.core.view.DatasetView on which the specified evaluation was performed on this collection. |
Method | load |
Loads the results for the run with the given key on this collection. |
Method | load |
Loads the fiftyone.core.view.DatasetView on which the specified run was performed on this collection. |
Method | make |
Makes a unique field name with the given root name for the collection. |
Method | map |
Maps the label values of a fiftyone.core.labels.Label field to new values for each sample in the collection. |
Method | match |
Filters the samples in the collection by the given filter. |
Method | match |
Filters the frames in the video collection by the given filter. |
Method | match |
Selects the samples from the collection that contain (or do not contain) at least one label that matches the specified criteria. |
Method | match |
Returns a view containing the samples in the collection that have or don't have any/all of the given tag(s). |
Method | max |
Computes the maximum of a numeric field of the collection. |
Method | mean |
Computes the arithmetic mean of the field values of the collection. |
Method | merge |
Merges the labels from the given input field into the given output field of the collection. |
Method | min |
Computes the minimum of a numeric field of the collection. |
Method | mongo |
Adds a view stage defined by a raw MongoDB aggregation pipeline. |
Method | one |
Returns a single sample in this collection matching the expression. |
Method | quantiles |
Computes the quantile(s) of the field values of a collection. |
Method | register |
Registers a run under the given key on this collection. |
Method | rename |
Replaces the key for the given annotation run with a new key. |
Method | rename |
Replaces the key for the given brain run with a new key. |
Method | rename |
Replaces the key for the given evaluation with a new key. |
Method | rename |
Replaces the key for the given run with a new key. |
Method | save |
Returns a context that can be used to save samples from this collection according to a configurable batching strategy. |
Method | save |
Saves run results for the run with the given key. |
Method | schema |
Extracts the names and types of the attributes of a specified embedded document field across all samples in the collection. |
Method | select |
Selects the samples with the given IDs from the collection. |
Method | select |
Selects the samples with the given field values from the collection. |
Method | select |
Selects only the fields with the given names from the samples in the collection. All other fields are excluded. |
Method | select |
Selects the frames with the given IDs from the video collection. |
Method | select |
Selects the samples in the group collection from the given slice(s). |
Method | select |
Selects the groups with the given IDs from the grouped collection. |
Method | select |
Selects only the specified labels from the collection. |
Method | set |
Sets a field or embedded field on each sample in a collection by evaluating the given expression. |
Method | shuffle |
Randomly shuffles the samples in the collection. |
Method | skip |
Omits the given number of samples from the head of the collection. |
Method | sort |
Sorts the samples in the collection by the given field(s) or expression(s). |
Method | sort |
Sorts the collection by similarity to a specified query. |
Method | split |
Splits the labels from the given input field into the given output field of the collection. |
Method | stats |
Returns stats about the collection on disk. |
Method | std |
Computes the standard deviation of the field values of the collection. |
Method | sum |
Computes the sum of the field values of the collection. |
Method | sync |
Syncs the last_modified_at property(s) of the dataset. |
Method | tag |
Adds the tag(s) to all labels in the specified label field(s) of this collection, if necessary. |
Method | tag |
Adds the tag(s) to all samples in this collection, if necessary. |
Method | tail |
Returns a list of the last few samples in the collection. |
Method | take |
Randomly samples the given number of samples from the collection. |
Method | to |
Creates a view that contains one sample per clip defined by the given field or expression in the video collection. |
Method | to |
Creates a view based on the results of the evaluation with the given key that contains one sample for each true positive, false positive, and false negative example in the collection, respectively. |
Method | to |
Creates a view that contains one sample per frame in the video collection. |
Method | to |
Returns a JSON string representation of the collection. |
Method | to |
Creates a view that contains one sample per object patch in the specified field of the collection. |
Method | to |
Creates a view that contains one clip for each unique object trajectory defined by their (label, index) in a frame-level field of a video collection. |
Method | untag |
Removes the tag from all labels in the specified label field(s) of this collection, if necessary. |
Method | untag |
Removes the tag(s) from all samples in this collection, if necessary. |
Method | update |
Updates the run config for the run with the given key. |
Method | validate |
Validates that the collection has a field of the given type. |
Method | validate |
Validates that the collection has field(s) with the given name(s). |
Method | values |
Extracts the values of a field from all samples in the collection. |
Method | write |
Writes the colllection to disk in JSON format. |
Property | has |
Whether this collection has any annotation runs. |
Property | has |
Whether this collection has any brain runs. |
Property | has |
Whether this collection has any evaluation results. |
Property | has |
Whether this collection has any runs. |
Async Method | _async |
Undocumented |
Method | _build |
Undocumented |
Method | _build |
Undocumented |
Method | _build |
Undocumented |
Method | _build |
Undocumented |
Method | _contains |
Undocumented |
Method | _contains |
Undocumented |
Method | _delete |
Undocumented |
Method | _do |
Undocumented |
Method | _edit |
Undocumented |
Method | _edit |
Undocumented |
Method | _expand |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Computes the total size of the frame documents in the collection. |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Returns a dictionary mapping frame IDs to document sizes (in bytes) for each frame in the video collection. |
Method | _get |
Returns a dictionary mapping sample IDs to document sizes (in bytes) for each sample in the collection. |
Method | _get |
Returns a dictionary mapping sample IDs to total frame document sizes (in bytes) for each sample in the video collection. |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Computes the total size of the sample documents in the collection. |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _get |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _handle |
Undocumented |
Method | _has |
Undocumented |
Method | _has |
Undocumented |
Method | _has |
Undocumented |
Method | _is |
Undocumented |
Method | _is |
Undocumented |
Method | _is |
Undocumented |
Method | _is |
Undocumented |
Method | _is |
Undocumented |
Method | _is |
Undocumented |
Method | _list |
Undocumented |
Method | _make |
Undocumented |
Method | _make |
Undocumented |
Method | _max |
Undocumented |
Method | _min |
Undocumented |
Method | _parse |
Undocumented |
Method | _parse |
Undocumented |
Method | _parse |
Undocumented |
Method | _parse |
Undocumented |
Method | _parse |
Undocumented |
Method | _parse |
Undocumented |
Method | _parse |
Undocumented |
Method | _parse |
Undocumented |
Method | _parse |
Undocumented |
Method | _parse |
Undocumented |
Method | _parse |
Undocumented |
Method | _parse |
Undocumented |
Method | _process |
Undocumented |
Method | _serialize |
Undocumented |
Method | _serialize |
Undocumented |
Method | _serialize |
Undocumented |
Method | _serialize |
Undocumented |
Method | _serialize |
Undocumented |
Method | _serialize |
Undocumented |
Method | _serialize |
Undocumented |
Method | _set |
Undocumented |
Method | _set |
Undocumented |
Method | _set |
Undocumented |
Method | _set |
Undocumented |
Method | _set |
Undocumented |
Method | _set |
Undocumented |
Method | _set |
Undocumented |
Method | _split |
Undocumented |
Method | _sync |
Undocumented |
Method | _sync |
Undocumented |
Method | _to |
Undocumented |
Method | _unwind |
Undocumented |
Method | _validate |
Undocumented |
Constant | _FRAMES |
Undocumented |
Constant | _GROUPS |
Undocumented |
Property | _element |
Undocumented |
Property | _elements |
Undocumented |
def __init__(self, source_collection, clips_stage, clips_dataset, _stages=None, _media_type=None, _name=None):
(source)
¶
overrides
fiftyone.core.clips.ClipsView.__init__
Undocumented
overrides
fiftyone.core.clips.ClipsView.name
The name of the view if it is a saved view; otherwise None.
@staticmethod
def _make_trajectory_stages(source_collection, clips_stage, clips_dataset): (source) ¶
def _make_trajectory_stages(source_collection, clips_stage, clips_dataset): (source) ¶
Undocumented