courtvision.swiss
get_latest_file(dir, file_suffix='.pt')
Fetch the model_path of the latest model in model_dir
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
model_dir |
Path
|
path to directory of models. |
required |
model_suffix |
str
|
extention of model format. Defaults to ".pt". |
required |
Returns:
Name | Type | Description |
---|---|---|
Path |
Path
|
path to most recent model. |
Source code in courtvision/swiss.py
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
mark_as_deprecated(to_be_removed_in_version, details, moved_to=None)
Marks a function as deprecated.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
to_be_removed_in_version |
tuple[int, int, int]
|
after which version the function will be removed. |
required |
details |
str
|
Message for the caller. |
required |
moved_to |
Optional[str]
|
If a function exists that callers should migrate to. Defaults to None. |
None
|
Returns:
Name | Type | Description |
---|---|---|
Callable |
function wrapper |
Source code in courtvision/swiss.py
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
|
save_camera_params(*, file_name, homography, intrinsic_matrix=None, distortion_coeffs=None)
Save camera parameters to a file.
Source code in courtvision/swiss.py
11 12 13 14 15 16 17 18 19 20 |
|