import dataclasses as dc
from pathlib import Path
from typing import TypeAlias, TypedDict

import numpy as np
import numpy.typing as npt

Box: TypeAlias = tuple[tuple[float, float], tuple[float, float], float]
CsvData: TypeAlias = list[str | int]


@dc.dataclass(kw_only=True, slots=True)
class InferenceResult:
    img: npt.NDArray[np.uint8]
    anomaly_map_resized: npt.NDArray
    anomaly_score: float
    anomaly_label: bool


class SensorImages(TypedDict):
    left: npt.NDArray
    right: npt.NDArray


class DetectionModels(TypedDict):
    left: Path
    right: Path
