Source code for sportslabkit.types.types

from __future__ import annotations

from pathlib import Path
from typing import Any, TypeAlias

import numpy as np
import torch


""" Types """

[docs]Box: TypeAlias = np.ndarray # Box is of shape (1, 2xdim)
[docs]Vector: TypeAlias = np.ndarray | list[Any] | torch.Tensor # Vector is of shape (1, N)
[docs]PathLike: TypeAlias = str | Path # Path-like objects
[docs]NpImage: TypeAlias = np.ndarray # Numpy/OpenCV image alias