-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
40 lines (32 loc) · 1.07 KB
/
config.py
File metadata and controls
40 lines (32 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# config.py — single place to change everything
# Video source
# 0 → default webcam
# 1, 2, … → other USB cameras
# "rtsp://user:pass@192.168.1.x:554/stream" → real IP camera
# "video.mp4" → local file (great for demos)
SOURCE = 0
# YOLOv8 model (auto-downloads on first run)
# yolov8n fastest / smallest
# yolov8s good balance
# yolov8m more accurate
MODEL = "yolov8n.pt"
# Inference settings
CONFIDENCE = 0.40 # minimum detection confidence
IOU_THRESHOLD = 0.45 # NMS IoU threshold
IMGSZ = 640 # inference resolution
# Alert zone — list of (x, y) points as FRACTIONS of frame size (0.0–1.0)
# Default: centre rectangle covering ~25% of the frame
# Set to [] to disable zone alerting
ALERT_ZONE = [
(0.35, 0.35),
(0.65, 0.35),
(0.65, 0.65),
(0.35, 0.65),
]
# Which classes trigger the zone alert (COCO names). Empty list = all classes.
ALERT_CLASSES = ["person"]
# Display
SHOW_FPS = True
SHOW_COUNTS = True
SHOW_ZONE = True
WINDOW_NAME = "CV Pipeline — press Q to quit"