2024-10-07 15:30:45 -05:00
|
|
|
from enum import Enum
|
2026-09-11 12:53:55 -05:00
|
|
|
from typing import TYPE_CHECKING, TypedDict
|
2022-04-16 17:40:04 +02:00
|
|
|
|
2024-09-27 15:53:23 +03:00
|
|
|
from frigate.camera import CameraMetrics
|
2025-01-10 12:44:30 -07:00
|
|
|
from frigate.data_processing.types import DataProcessorMetrics
|
2025-04-15 07:55:38 -06:00
|
|
|
from frigate.object_detection.base import ObjectDetectProcess
|
2022-04-16 17:40:04 +02:00
|
|
|
|
2026-09-11 12:53:55 -05:00
|
|
|
if TYPE_CHECKING:
|
|
|
|
|
from frigate.storage import StorageMaintainer
|
|
|
|
|
|
2022-04-16 17:40:04 +02:00
|
|
|
|
|
|
|
|
class StatsTrackingTypes(TypedDict):
|
2024-09-27 15:53:23 +03:00
|
|
|
camera_metrics: dict[str, CameraMetrics]
|
2026-08-12 08:55:34 -05:00
|
|
|
embeddings_metrics: DataProcessorMetrics
|
2022-11-03 22:23:09 -04:00
|
|
|
detectors: dict[str, ObjectDetectProcess]
|
2022-04-16 17:40:04 +02:00
|
|
|
started: int
|
|
|
|
|
latest_frigate_version: str
|
2023-01-27 12:20:41 +00:00
|
|
|
last_updated: int
|
2023-05-05 01:58:59 +03:00
|
|
|
processes: dict[str, int]
|
2026-09-11 12:53:55 -05:00
|
|
|
storage_maintainer: "StorageMaintainer | None"
|
2024-10-07 15:30:45 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class ModelStatusTypesEnum(str, Enum):
|
|
|
|
|
not_downloaded = "not_downloaded"
|
|
|
|
|
downloading = "downloading"
|
|
|
|
|
downloaded = "downloaded"
|
|
|
|
|
error = "error"
|
2025-06-05 09:13:12 -06:00
|
|
|
training = "training"
|
|
|
|
|
complete = "complete"
|
2025-11-09 15:21:13 -07:00
|
|
|
failed = "failed"
|
2024-11-18 12:26:44 -06:00
|
|
|
|
|
|
|
|
|
2026-01-06 09:20:19 -06:00
|
|
|
class JobStatusTypesEnum(str, Enum):
|
|
|
|
|
pending = "pending"
|
|
|
|
|
queued = "queued"
|
|
|
|
|
running = "running"
|
|
|
|
|
success = "success"
|
|
|
|
|
failed = "failed"
|
|
|
|
|
cancelled = "cancelled"
|
|
|
|
|
|
|
|
|
|
|
2024-11-18 12:26:44 -06:00
|
|
|
class TrackedObjectUpdateTypesEnum(str, Enum):
|
|
|
|
|
description = "description"
|
2025-04-28 16:43:03 -06:00
|
|
|
face = "face"
|
|
|
|
|
lpr = "lpr"
|
2025-11-23 09:40:25 -06:00
|
|
|
classification = "classification"
|