Predict
Predicts keypoints on videos or images.
Video predictions are saved to:
<model_dir>/ └── video_preds/ ├── <video_filename>.csv (predictions) ├── <video_filename>_<metric>.csv (losses) └── labeled_videos/ └── <video_filename>_labeled.mp4Image predictions are saved to:
<model_dir>/ └── image_preds/ └── <image_dirname | csv_filename | timestamp>/ ├── predictions.csv ├── predictions_<metric>.csv (losses) └── <image_filename>_labeled.png
usage: litpose predict <model_dir> <input_path:video|image|dir|csv>... [OPTIONS]
Positional Arguments
- model_dir
path to a model directory
- input_path
one or more video files, image files, CSV files, or directories to run prediction on
directories: iterates over videos or images in the directory
- CSV file: must be formatted as a label file. predicts on the frames and computes
pixel error against keypoint labels
Named Arguments
- --overrides
overrides attributes of the config file. Uses hydra syntax: https://hydra.cc/docs/advanced/override_grammar/basic/
- --overwrite
overwrite videos that already have prediction files
Default:
False- --bbox_dir
directory containing bbox CSV files produced by
litpose create_bboxor a compatible external source. For CSV inputs, looks forbbox.csvinside this directory. For video inputs, looks for<video_stem>_bbox.csvinside this directory. When provided, each frame is cropped to its bounding box before being passed to the model, and predictions are saved in the original coordinate space.
post-prediction
- --skip_viz
skip generating prediction-annotated images/videos
Default:
False