module documentation

View stages.

Copyright 2017-2025, Voxel51, Inc.

Class Concat Concatenates the contents of the given fiftyone.core.collections.SampleCollection to this collection.
Class Exclude Excludes the samples with the given IDs from a collection.
Class ExcludeBy Excludes the samples with the given field values from a collection.
Class ExcludeFields Excludes the fields with the given names from the samples in a collection.
Class ExcludeFrames Excludes the frames with the given IDs from a video collection.
Class ExcludeGroups Excludes the groups with the given IDs from a grouped collection.
Class ExcludeLabels Excludes the specified labels from a collection.
Class Exists Returns a view containing the samples in a collection that have (or do not have) a non-None value for the given field or embedded field.
Class FilterField Filters the values of a given field or embedded field of each sample in a collection.
Class FilterKeypoints Filters the individual fiftyone.core.labels.Keypoint.points elements in the specified keypoints field of each sample in the collection.
Class FilterLabels Filters the fiftyone.core.labels.Label field of each sample in a collection.
Class Flatten Returns a flattened view that contains all samples in a dynamic grouped collection.
Class GeoNear Sorts the samples in a collection by their proximity to a specified geolocation.
Class GeoWithin Filters the samples in a collection to only match samples whose geolocation is within a specified boundary.
Class GroupBy Creates a view that groups the samples in a collection by a specified field or expression.
Class Limit Creates a view with at most the given number of samples.
Class LimitLabels Limits the number of fiftyone.core.labels.Label instances in the specified labels list field of each sample in a collection.
Class MapLabels Maps the label values of a fiftyone.core.labels.Label field to new values for each sample in a collection.
Class Match Filters the samples in the collection by the given filter.
Class MatchFrames Filters the frames in a video collection by the given filter.
Class MatchLabels Selects the samples from a collection that contain (or do not contain) at least one label that matches the specified criteria.
Class MatchTags Returns a view containing the samples in the collection that have or don't have any/all of the given tag(s).
Class Mongo A view stage defined by a raw MongoDB aggregation pipeline.
Class Select Selects the samples with the given IDs from a collection.
Class SelectBy Selects the samples with the given field values from a collection.
Class SelectFields Selects only the fields with the given names from the samples in the collection. All other fields are excluded.
Class SelectFrames Selects the frames with the given IDs from a video collection.
Class SelectGroups Selects the groups with the given IDs from a grouped collection.
Class SelectGroupSlices Selects the samples in a group collection from the given slice(s).
Class SelectLabels Selects only the specified labels from a collection.
Class SetField Sets a field or embedded field on each sample in a collection by evaluating the given expression.
Class Shuffle Randomly shuffles the samples in a collection.
Class Skip Omits the given number of samples from the head of a collection.
Class SortBy Sorts the samples in a collection by the given field(s) or expression(s).
Class SortBySimilarity Sorts a collection by similarity to a specified query.
Class Take Randomly samples the given number of samples from a collection.
Class ToClips Creates a view that contains one sample per clip defined by the given field or expression in a video collection.
Class ToEvaluationPatches 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.
Class ToFrames Creates a view that contains one sample per frame in a video collection.
Class ToPatches Creates a view that contains one sample per object patch in the specified field of a collection.
Class ToTrajectories 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.
Class ViewStage Abstract base class for all view stages.
Exception ViewStageError An error raised when a problem with a ViewStage is encountered.
Variable fob Undocumented
Variable foc Undocumented
Variable focl Undocumented
Variable fod Undocumented
Variable fop Undocumented
Variable foug Undocumented
Variable fov Undocumented
Variable fovi Undocumented
Class _GeoStage No class docstring; 2/2 properties, 0/3 instance variable, 0/2 method documented
Class _ViewStageRepr Undocumented
Function _extract_filter_field Undocumented
Function _get_default_similarity_run Undocumented
Function _get_field_mongo_filter Undocumented
Function _get_field_only_matches_expr Undocumented
Function _get_filter_field_pipeline Undocumented
Function _get_filter_frames_field_pipeline Undocumented
Function _get_filter_frames_list_field_pipeline Undocumented
Function _get_filter_list_field_pipeline Undocumented
Function _get_frames_field_only_matches_expr Undocumented
Function _get_frames_list_field_only_matches_expr Undocumented
Function _get_group_id Undocumented
Function _get_label_field_only_matches_expr Undocumented
Function _get_list_field_mongo_filter Undocumented
Function _get_list_field_only_matches_expr Undocumented
Function _get_list_trajectory_mongo_filter Undocumented
Function _get_meta_filtered_fields Undocumented
Function _get_rng Undocumented
Function _get_roots Undocumented
Function _get_selected_excluded_fields Undocumented
Function _get_trajectories_filter Undocumented
Function _get_trajectory_mongo_filter Undocumented
Function _make_match_empty_labels_pipeline Undocumented
Function _make_omit_empty_labels_pipeline Undocumented
Function _matches_field_meta Undocumented
Function _merge_frame_paths Undocumented
Function _parse_frame_ids Undocumented
Function _parse_group_ids Undocumented
Function _parse_labels Undocumented
Function _parse_labels_field Undocumented
Function _parse_paths Undocumented
Function _parse_sample_ids Undocumented
Function _parse_similarity_query Undocumented
Function _parse_sort_order Undocumented
Function _parse_stages Undocumented
Function _recursive_match Undocumented
Function _remove_path_collisions Undocumented
Function _render_filter Undocumented
Function _replace_prefix Undocumented
Function _serialize_sort_expr Undocumented
Constant _STAGES Undocumented
Constant _STAGES_THAT_SELECT_FIRST Undocumented
Constant _STAGES_THAT_SELECT_OR_REORDER Undocumented
Variable _repr Undocumented

Undocumented

Undocumented

Undocumented

Undocumented

Undocumented

Undocumented

Undocumented

Undocumented

def _extract_filter_field(val): (source)

Undocumented

def _get_default_similarity_run(sample_collection, supports_prompts=False): (source)

Undocumented

def _get_field_mongo_filter(filter_arg, prefix='$this'): (source)

Undocumented

def _get_field_only_matches_expr(field): (source)

Undocumented

def _get_filter_field_pipeline(sample_collection, filter_field, new_field, filter_arg, only_matches=True): (source)

Undocumented

def _get_filter_frames_field_pipeline(sample_collection, filter_field, new_field, filter_arg, only_matches=True): (source)

Undocumented

def _get_filter_frames_list_field_pipeline(sample_collection, filter_field, new_field, filter_arg, only_matches=True): (source)

Undocumented

def _get_filter_list_field_pipeline(sample_collection, filter_field, new_field, filter_arg, only_matches=True): (source)

Undocumented

def _get_frames_field_only_matches_expr(field): (source)

Undocumented

def _get_frames_list_field_only_matches_expr(field): (source)

Undocumented

def _get_group_id(sample_or_group): (source)

Undocumented

def _get_label_field_only_matches_expr(sample_collection, field, new_field=None, prefix=''): (source)

Undocumented

def _get_list_field_mongo_filter(filter_arg): (source)

Undocumented

def _get_list_field_only_matches_expr(field): (source)

Undocumented

def _get_list_trajectory_mongo_filter(filter_arg): (source)

Undocumented

def _get_meta_filtered_fields(sample_collection, meta_filter, frames=False): (source)

Undocumented

def _get_rng(seed): (source)

Undocumented

def _get_roots(path): (source)

Undocumented

def _get_selected_excluded_fields(view): (source)

Undocumented

def _get_trajectories_filter(sample_collection, field, filter_arg): (source)

Undocumented

def _get_trajectory_mongo_filter(filter_arg): (source)

Undocumented

def _make_match_empty_labels_pipeline(sample_collection, fields_map, match_empty=False): (source)

Undocumented

def _make_omit_empty_labels_pipeline(sample_collection, fields): (source)

Undocumented

def _matches_field_meta(field, matcher, query, key=None): (source)

Undocumented

def _merge_frame_paths(paths, frame_paths): (source)

Undocumented

def _parse_frame_ids(arg): (source)

Undocumented

def _parse_group_ids(arg): (source)

Undocumented

def _parse_labels(labels): (source)

Undocumented

def _parse_labels_field(sample_collection, field_path): (source)

Undocumented

def _parse_paths(paths): (source)

Undocumented

def _parse_sample_ids(arg): (source)

Undocumented

def _parse_similarity_query(query): (source)

Undocumented

def _parse_sort_order(order): (source)

Undocumented

def _parse_stages(stages): (source)

Undocumented

def _recursive_match(info, matcher, query, key=None, recursion_limit=1): (source)

Undocumented

def _remove_path_collisions(paths): (source)

Undocumented

def _render_filter(sample_collection, id_tag_expr, filter_expr_or_dict, field, var_prefix): (source)

Undocumented

def _replace_prefix(val, old, new): (source)

Undocumented

def _serialize_sort_expr(field_or_expr): (source)

Undocumented

_STAGES_THAT_SELECT_FIRST = (source)

Undocumented

Value
set([SelectGroupSlices])
_STAGES_THAT_SELECT_OR_REORDER = (source)

Undocumented

Value
set([GroupBy,
     SortBy,
     SortBySimilarity,
     Shuffle,
     Exclude,
     ExcludeBy,
     Exists,
...

Undocumented