Skip to content

boxmot.engine.dataset_variants.fps

Select dataset frames on a time grid and align their evaluation annotations.

validate_dataset_fps

validate_dataset_fps(fps: float) -> float

Require a finite, positive dataset sampling rate.

select_sequence_frames

select_sequence_frames(
    timestamps: Sequence[float | None],
    *,
    fps: float,
    sequence_id: str,
) -> tuple[int, ...]

Keep the first frame in each occupied target-FPS time bin.

Bins start at the first capture timestamp. Empty bins never duplicate frames, and bin boundaries stay anchored to that timestamp so fractional rate ratios do not accumulate stride-rounding error.

materialize_fps_ground_truth

materialize_fps_ground_truth(
    config: Mapping[str, Any],
    catalog: SourceCatalog,
    output_root: str | Path,
    *,
    data_root: str | Path | None = None,
) -> tuple[Path, Path]

Publish sampled frames and annotations beneath an evaluation-owned root.

The source catalog supplies the exact original-to-sampled frame mapping. Images are symlinked to their original bytes; annotation columns beyond the one-based frame ID are preserved for AABB, OBB, and flat annotation layouts. Capture timestamps remain unchanged in the generated sequence sidecars.