-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshared_types.py
More file actions
24 lines (22 loc) · 889 Bytes
/
Copy pathshared_types.py
File metadata and controls
24 lines (22 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# shared_types.py — Person 1 creates this file
from dataclasses import dataclass, field
from typing import Tuple, Literal
# Set to 0 for real-time testing (no intentional AV delay)
AV_DELAY_SECONDS = 0.0
@dataclass
class DetectionEvent:
type: Literal["face", "plate", "card", "nsfw", "text_pii"]
bbox: Tuple[int, int, int, int] # (x1, y1, x2, y2) in ORIGINAL frame pixels
confidence: float # 0.0 to 1.0
frame_id: int
blur: bool = True # False = whitelisted (don't blur)
@dataclass
class PipelineConfig:
blur_faces: bool = True
blur_plates: bool = True
blur_cards: bool = True
blur_nsfw: bool = True
blur_text_pii: bool = True
detection_cadence: int = 15 # run detection every N frames
blur_strength: int = 51 # gaussian kernel size (must be odd number)
face_similarity_threshold: float = 0.4