<!-- # hard line break macro for HTML -->

# fiftyone.core.selection

Exact episode and segment membership shared by selections and saved subsets.

Copyright 2017-2026, Voxel51, Inc.
<br/>
[voxel51.com](https://voxel51.com/)
<br/>
<br/>

**Functions:**

| [`normalize_members`](#fiftyone.core.selection.normalize_members)(members)             | Validates and deduplicates members without merging overlapping ranges.   |
|----------------------------------------------------------------------------------------|--------------------------------------------------------------------------|
| [`member_key`](#fiftyone.core.selection.member_key)(member)                            | Returns a canonical identity excluding provenance and dataset scope.     |
| [`intersect_members`](#fiftyone.core.selection.intersect_members)(candidates, allowed) | Clips candidates to an explicit subset boundary on time and streams.     |
| [`select_parents`](#fiftyone.core.selection.select_parents)(collection, ids)           | Selects parents by id, reaching into every slice of a grouped dataset.   |
| [`group_members`](#fiftyone.core.selection.group_members)(members[, samples])          | Groups stored members without changing full/segment coexistence.         |
| [`count_members`](#fiftyone.core.selection.count_members)(members[, unavailable_ids])  | Counts parent episodes separately from full-episode and segment units.   |

### fiftyone.core.selection.normalize_members(members)

Validates and deduplicates members without merging overlapping ranges.

Bounds are decimal integers on a named native timebase. Frame events use
zero-based, half-open sequence bounds; nanosecond sources retain their
exact integer precision. Stream sets are resolved before capture.

* **Parameters:**
  **members** – an iterable of episode/segment dictionaries
* **Returns:**
  the normalized members, with combined provenance for duplicates

### fiftyone.core.selection.member_key(member)

Returns a canonical identity excluding provenance and dataset scope.

Storage always pairs this identity with a dataset ID and subset ID.

### fiftyone.core.selection.intersect_members(candidates, allowed)

Clips candidates to an explicit subset boundary on time and streams.

Whole-episode membership admits either scope. Segment-only membership
cannot admit a full-episode candidate. Distinct saved intervals remain
distinct even when overlapping.

### fiftyone.core.selection.select_parents(collection, ids)

Selects parents by id, reaching into every slice of a grouped dataset.

### fiftyone.core.selection.group_members(members, samples=None)

Groups stored members without changing full/segment coexistence.

### fiftyone.core.selection.count_members(members, unavailable_ids=())

Counts parent episodes separately from full-episode and segment units.
