From 09818f79e6fc712d86c23e11aa3208870c4ca46f Mon Sep 17 00:00:00 2001 From: foefl Date: Thu, 9 Oct 2025 10:50:32 +0200 Subject: [PATCH] change type signature --- src/dopt_sensor_anomalies/types.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/dopt_sensor_anomalies/types.py b/src/dopt_sensor_anomalies/types.py index 259f251..c0cd9cc 100644 --- a/src/dopt_sensor_anomalies/types.py +++ b/src/dopt_sensor_anomalies/types.py @@ -2,10 +2,19 @@ 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] -InferenceResult: TypeAlias = tuple[npt.NDArray, npt.NDArray, float, bool] +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):