predict_video
- lightning_pose.utils.predictions.predict_video(video_file: str, model: Model, output_pred_file: str | None = None, progress_file: Path | None = None, reader: _Reader | None = None, bbox_file: str | Path | None = None) DataFrame[source]
- lightning_pose.utils.predictions.predict_video(video_file: list[str], model: Model, output_pred_file: list[str] | None = None, progress_file: Path | None = None, reader: _Reader | None = None) list[DataFrame]
- Parameters:
video_file – Predict on a video, or for true multiview models, a list of videos (order: 1-1 correspondence with cfg.data.view_names).
model – The model to predict with.
output_pred_file – (optional) File to save predictions in. For multiview, a list of files (1-1 correspondance to cfg.data.view_names).
bbox_file – (optional) path to a bbox CSV (columns x, y, h, w; one row per frame). when provided, DALI delivers full-resolution frames and the wrapper crops each frame to the bbox before resizing to the model’s input dims. single-view only.
reader – (optional) which video-reading backend to use: “dali”, “pynvvc”, or “opencv”. None (default) auto-selects pynvvc if it’s usable on this machine for this video, else dali if it’s installed, else opencv (the portable fallback, always available). Independent of the model’s runtime (eager/onnx) and –compile – this only controls video ingestion.