This commit is contained in:
2026-03-23 15:52:03 -03:00
parent b57da622cb
commit 4fdbdfc6d3
11 changed files with 599 additions and 5 deletions

28
detect/state.py Normal file
View File

@@ -0,0 +1,28 @@
"""
LangGraph state definition for the detection pipeline.
This TypedDict flows through all graph nodes. Each node reads what
it needs and writes its outputs. LangGraph manages the state transitions.
"""
from __future__ import annotations
from typing import TypedDict
from detect.models import BrandDetection, DetectionReport, Frame, PipelineStats
class DetectState(TypedDict, total=False):
# Input
video_path: str
job_id: str
profile_name: str
# Stage outputs
frames: list[Frame]
filtered_frames: list[Frame]
detections: list[BrandDetection]
report: DetectionReport
# Running stats (updated by each stage)
stats: PipelineStats