-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfig.ini
192 lines (180 loc) · 6.95 KB
/
config.ini
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
[general]
# run in headless mode (true/false)
# this disables GUI, detections are only logged to console and saved
# Set to True to enable headless mode
headless = False
# Default confidence threshold (above which to alert)
default_conf_threshold = 0.7
# Default model variant to use
default_model_variant = yolov8m
[hardware]
# Preferred CUDA device ID
# e.g., 0 means "cuda:0", 1 means "cuda:1"
cuda_device_id = 0
# If the chosen device isn't available, automatically fallback to the next available device?
# true/false
cuda_fallback_if_unavailable = true
[input]
use_webcam = false
webcam_index = 0
[stream]
# Stream URL to read the detection from
# (Default RTMP stream URL)
stream_url = rtmp://127.0.0.1:1935/live/stream
[region_masker]
# use this if you're using ./utils/region_masker.py to configure regions
video_source = rtmp://127.0.0.1:1935/live/stream
# select to turn special regions (ignore/min detection level) on/off (true/false)
enable_masked_regions = true
# masked regions json file name; created with: ./utils/region_masker.py
output_json = ./data/ignore_zones.json
[detection]
# Draw rectangles around detection areas (True/False)
draw_rectangles = True
# Save full-frame images when detections occur (True/False)
save_full_frames = True
# Save detection areas as separate images (True/False)
save_detection_areas = True
# Saved image format & quality settings
# Supported values for image formats: jpg, png, webp
# Options: jpg, png, webp
full_frame_image_format = jpg
# Options: jpg, png, webp
detection_area_image_format = webp
# Set image quality for jpg and webp formats (1-100)
# For jpg, higher values indicate better quality
# For webp, this controls lossy compression quality; lossless compression is enabled separately
image_quality = 95
# PNG compression level (0-9)
# 0 = No compression (fastest, largest files)
# 9 = Maximum compression (slowest, smallest files)
png_compression_level = 0
# Enable lossless compression for WebP images (True/False)
# note that all OpenCV builds might not recognize
webp_lossless = True
# The number of pixels to expand the bounding box on each side when saving detection area images
detection_area_margin = 100
# Directory settings
# Set this to True to use the environment-specified save directory
use_env_save_dir = True
# Name of the environment variable, if set to `true`
env_save_dir_var = YOLO_SAVE_DIR
# Directory to save detection images if we're not using an env var
default_save_dir = ./yolo_detections/
# Directory to use as a fallback if the environment-specified directory isn't available
fallback_save_dir = ./yolo_detections/
# For WebUI previews; should be the same one as your save dir
# Default save directory if environment variable is not used
save_dir_base = ./yolo_detections/
# Create date-based sub-directories (detections_directory/year/month/day/)
create_date_subdirs = True
# Retry delay if stream cannot be connected
# Delay in seconds before retrying to connect to the stream
retry_delay = 2
# Maximum number of retries to connect to the stream
max_retries = 10
# Rescale the input frames (True/False)
rescale_input = False
# Target height for rescaling the frames if RESCALE_INPUT is enabled
target_height = 1080
# Toggle denoising on/off (True/False)
denoise = False
# Use a custom processing FPS (i.e., drop the frame rate for the inbound material)
use_process_fps = False
# If custom processing FPS is enabled, processing frames per second
process_fps = 15
# Timeout in seconds, increase for handling larger bitrate streams
timeout = 60
# Cooldown period for TTS announcements in seconds
tts_cooldown = 2
[performance]
# 'image_save_queue_maxsize' defines the maximum frame queue size when saving detections.
# Too high of a value may introduce lag or dropouts while saving.
# 10 or 20 might be a good starter for many. Can be easily 100-1000.
# Set to 0 or negative for unlimited queue size.
image_save_queue_maxsize = 5000
[logging]
enable_detection_logging_to_file = True
log_directory = ./logs
log_file = logging.log
detection_log_file = detections.log
access_log_file = access.log
[webserver]
enable_webserver = true
# webserver_host = 0.0.0.0
# set to 127.0.0.1 if you want it to localhost (not available outside of your computer):
webserver_host = 127.0.0.1
webserver_port = 5000
# Set your desired max FPS for the web server's output
# Note that especially on higher resolutions, high FPS's may introduce
# computational overhead where the stream starts to lag.
webserver_max_fps = 10
# interval checking for webUI connections true/false
interval_checks = true
# check interval in seconds for active connections
check_interval = 15
[aggregation]
# setting the option below to `true` saves aggregated detections across sessions
enable_persistent_aggregated_detections = true
aggregated_detections_file = ./logs/aggregated_detections.json
# log rotation (WIP atm)
# Max size in bytes (e.g., 1MB)
# max_aggregated_detections_size = 1048576
# keep_old_aggregations = true
# max_old_aggregations = 5
# maximum number of aggregated entries to fetch for webui (larger lists may clog up the works!)
webui_max_aggregation_entries = 100
[webui]
# Web UI Configuration
# Aggregate all detections within X seconds to a singular field
# This avoids clutter in the web UI
webui_cooldown_aggregation = 30
# How many detections until they show up in **bold**
webui_bold_threshold = 10
[telegram]
# Get detection alerts via Telegram
enable_telegram_alerts = true
# send TG alerts immediately without waiting for cooldowns
enable_immediate_alerts = true
aggregation_interval = 1
confidence_warning_threshold = 0.68
detection_count_warning_threshold = 5
# Cooldown for detections (i.e. interval when there's been no detections)
# This value will define when the summary alert will be sent.
detection_cooldown = 30
[remote_sync]
# Enable remote sync feature (true/false)
enabled = true
# Toggle between paramiko (true) and system SSH (false)
use_paramiko = false
# Read remote config from environment variables (true/false)
read_remote_config_from_env = true
# Environment variables for remote sync
remote_user_env_var = DVR_YOLOV8_REMOTE_USER
remote_host_env_var = DVR_YOLOV8_REMOTE_HOST
remote_dir_env_var = DVR_YOLOV8_REMOTE_DIR
# If 'read_remote_config_from_env' is false, provide the remote configuration here
remote_user =
remote_host =
remote_dir =
# Optionally, set remote_ssh_key if you want to use a specific key
# remote_ssh_key = /path/to/your/ssh_key
#
# Files to sync to remote
sync_aggregated_detections = true
sync_detection_area_images = true
sync_full_frame_images = false
# strip the local path (/path/to/your/files/) from the remote sync
# (recommended to be set to `true`)
strip_local_path = true
# File send queuing options
max_retries = 10
retry_delay = 1
# Maximum number of worker threads for remote sync
remote_sync_queue_maxsize = 0
# Maximum number of simultaneous remote worker accounts
max_workers = 1
# Interval in seconds to batch files before syncing.
# Set to 0 to disable batching (sync files immediately).
# ATTN: the batch interval is currently NOT implemented.
batch_interval = 1