Create bboxο
Computes per-frame bounding boxes from detector predictions and saves them as
CSV files. Run litpose predict first to generate the predictions.
For video inputs, bbox files are saved to:
<model_dir>/
βββ video_preds/
βββ <video_stem>_bbox.csv
For labeled-frames inputs (CSV), bbox files are saved to:
<model_dir>/
βββ image_preds/
βββ <csv_file_name>/
βββ bbox.csv
The bounding boxes produced here can optionally be smoothed with
litpose smooth_bbox before passing them to litpose crop.
For an end-to-end usage example, see the user guide: Cropzoom pipeline.
usage: litpose create_bbox <model_dir> <input_path:video|csv>... [--crop_ratio=CROP_RATIO | --crop_size=CROP_SIZE] [--anchor_keypoints=x,y,z]
Positional Argumentsο
- model_dir
path to a detector model directory
- input_path
one or more video files, CSV files, or directories (directories are expanded to their contained *.mp4 files)
Named Argumentsο
- --crop_ratio
size the bounding box this many times larger than the animal keypoint span (default 2.0 when neither βcrop_ratio nor βcrop_size is given). Mutually exclusive with βcrop_size.
- --crop_size
fixed square bounding box side length in pixels, centred on the per-frame mean of the anchor keypoints. Mutually exclusive with βcrop_ratio.
- --anchor_keypoints
comma-separated list of anchor keypoint names; defaults to all keypoints
Default:
''