module documentation
Clips views.
Class |
|
A fiftyone.core.view.DatasetView of clips from a video fiftyone.core.dataset.Dataset . |
Class |
|
A clip in a ClipsView . |
Class |
|
A ClipsView of object trajectories from a video fiftyone.core.dataset.Dataset . |
Function | make |
Creates a dataset that contains one sample per clip defined by the given field or expression in the collection. |
Class | _ |
Undocumented |
Function | _get |
Undocumented |
Function | _get |
Undocumented |
Function | _is |
Undocumented |
Function | _make |
Undocumented |
Function | _to |
Undocumented |
Function | _write |
Undocumented |
Function | _write |
Undocumented |
Function | _write |
Undocumented |
Function | _write |
Undocumented |
Function | _write |
Undocumented |
def make_clips_dataset(sample_collection, field_or_expr, other_fields=None, tol=0, min_len=0, trajectories=False, name=None, persistent=False, _generated=False):
(source)
¶
Creates a dataset that contains one sample per clip defined by the given field or expression in the collection.
The returned dataset will contain:
- A sample_id field that records the sample ID from which each clip was taken
- A support field that records the [first, last] frame support of each clip
- All frame-level information from the underlying dataset of the input collection
In addition, sample-level fields will be added for certain clipping strategies:
- When field_or_expr is a temporal detection(s) field, the field
will be converted to a
fiftyone.core.labels.Classification
field - When trajectories is True, a sample-level label field will be added recording the label and index of each trajectory
Note
The returned dataset will directly use the frame collection of the input dataset.
Parameters | |
sample | a
fiftyone.core.collections.SampleCollection |
field | can be any of the following:
|
otherNone | controls whether sample fields other than the default sample fields are included. Can be any of the following:
|
tol:0 | the maximum number of false frames that can be overlooked when generating clips. Only applicable when field_or_expr is a frame-level list field or expression |
min | the minimum allowable length of a clip, in frames. Only applicable when field_or_expr is a frame-level list field or an expression |
trajectories:False | whether to create clips for each unique object trajectory defined by their (label, index). Only applicable when field_or_expr is a frame-level field |
name:None | a name for the dataset |
persistent:False | whether the dataset should persist in the database after the session terminates |
_generated | Undocumented |
Returns | |
a fiftyone.core.dataset.Dataset |
def _write_expr_clips(dataset, src_collection, expr, other_fields=None, tol=0, min_len=0):
(source)
¶
Undocumented