sportslabkit.cli#
Overview#
Classes#
- class sportslabkit.cli.CLI[source]#
CLI for soccertrack.
Overview
Methods# test_logger(log_level)Test the output of soccertrack’s logger
download(dataset, output, quiet)Download data from google drive
find_calibration_parameters(checkerboard_files, output, fps, scale, pts, calibration_method)_summary_
calibrate_from_npz(input, npzfile, output, calibration_method, keypoint_xml, **kwargs)Calibrate a video using precomputed calibration parameters
calibrate(input, checkerboard, output, fps, scale, pts, calibration_method, keypoint_xml)Calibrate video from input
Members
- test_logger(log_level: str = 'INFO')[source]#
Test the output of soccertrack’s logger
- Parameters:
log_level (str) – The log level to use. Defaults to “INFO”.
- download(dataset: str = 'all', output: str = './data', quiet: bool = False)[source]#
Download data from google drive
- Parameters:
- Raises:
ValueError – _description_
- find_calibration_parameters(checkerboard_files: str, output: str, fps: int = 1, scale: int = 1, pts: int = 50, calibration_method: str = 'zhang')[source]#
_summary_
- Parameters:
checkerboard_files (str) – Path to the checkerboard video (wildcards are supported).
output (str) – Path to save the calibration parameters.
fps (int, optional) – _description_. Defaults to 1.
scale (int, optional) – _description_. Defaults to 1.
pts (int, optional) – _description_. Defaults to 50.
calibration_method (str, optional) – _description_. Defaults to “zhang”.
- calibrate_from_npz(input: str, npzfile: str, output: str, calibration_method: str = 'zhang', keypoint_xml: str | None = None, **kwargs)[source]#
Calibrate a video using precomputed calibration parameters
- Parameters:
Note
kwargs are passed to make_video, so it is recommended that you refere to the documentation for make_video.
- calibrate(input: str, checkerboard: str, output: str, fps: int = 1, scale: int = 1, pts: int = 50, calibration_method: str = 'zhang', keypoint_xml: str | None = None)[source]#
Calibrate video from input
- Parameters:
input (str) – Path to the input video (wildcards are supported).
checkerboard (str) – Path to the checkerboard video (wildcards are supported).
output (str) – Path to the output video.
fps (int, optional) – Number of frames per second to use for calibration. Defaults to 1.
scale (int, optional) – Scale factor for the checkerboard. Scales the checkerboard video by 1/s. Defaults to 1.
pts (int, optional) – Number of points to use for calibration. Defaults to 50.
calibration_method (str, optional) – Calibration method. Defaults to “zhang”.
keypoint_xml (Optional[str], optional) – Path to the keypoint xml file. Defaults to None.