-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmads.ini
More file actions
114 lines (84 loc) · 4.47 KB
/
Copy pathmads.ini
File metadata and controls
114 lines (84 loc) · 4.47 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
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
# ___ _ _ _ ___ __ _ _
# / _ \| \ | | \ | \ \/ / / \ __ _ ___ _ __ | |_
# | | | | \| | \| |\ / / _ \ / _` |/ _ \ '_ \| __|
# | |_| | |\ | |\ |/ \ / ___ \ (_| | __/ | | | |_
# \___/|_| \_|_| \_/_/\_\ /_/ \_\__, |\___|_| |_|\__|
# |___/
# ─── Broker / shared settings ────────────────────────────────────────────────
[agents]
# Settings shared by all agents.
frontend_address = "tcp://localhost:9090"
backend_address = "tcp://localhost:9091"
settings_address = "tcp://localhost:9092"
timecode_fps = 25
# ── ONNX inference engine settings (apply to all agents) ────────────────────
# Execution provider. Supported values:
# cpu – CPU only (always available, default).
# coreml – Apple CoreML (macOS/iOS with ANE or GPU; graceful CPU fallback).
# cuda – NVIDIA CUDA (Linux/Windows GPU build only; graceful CPU fallback).
# directml – DirectX ML (Windows GPU build only; graceful CPU fallback).
# webgpu – WebGPU EP (experimental; graceful CPU fallback).
# auto – pick the best available EP on the current platform.
# If the requested EP is not compiled into this ONNX Runtime build a yellow
# warning is printed at startup and inference falls back to CPU automatically.
execution_provider = "cpu"
# Intra-op thread count (parallelism inside a single operator).
# 0 = let ORT decide (recommended; typically uses all available cores).
# Positive values cap the thread pool. The old default of 1 was a pessimisation.
intra_op_threads = 0
# Inter-op thread count (parallelism across independent graph nodes).
# 0 = let ORT decide. Rarely needs tuning.
inter_op_threads = 0
# GPU device index (used only when execution_provider = "cuda" or "directml").
gpu_device_id = 0
# ─── Broker ──────────────────────────────────────────────────────────────────
[broker]
frontend_address = "tcp://*:9090"
backend_address = "tcp://*:9091"
settings_address = "tcp://*:9092"
# auth_verbose = false
# ip_whitelist = ["127.0.0.1"]
# ─── ONNX source agent ───────────────────────────────────────────────────────
# Section name: executable minus "mads-" prefix → [onnx-source].
[onnx-source]
# Path to the ONNX classification model (e.g. MobileNetV2).
model_path = "examples/imagenet/mobilenetv2-12.onnx"
# Path to the ImageNet class labels file (1000 lines, one label per line).
labels_path = "examples/imagenet/imagenet_classes.txt"
# Publication topic.
pub_topic = "onnx-source"
# Loop period in milliseconds (100 ms → ~10 fps max).
period = 100
# Number of top predictions to publish.
top_k = 5
# Camera device index (0 = default system camera).
camera = 0
# Requested capture resolution (hint; camera may deliver a different size).
capture_width = 640
capture_height = 480
capture_fps = 30.0
# ── Image pre-processing constants ──────────────────────────────────────────
# Target model input size.
input_width = 224
input_height = 224
# Layout: true → NCHW (MobileNetV2 / most ONNX zoo models).
nchw = true
# Channel order: true → convert BGR (OpenCV default) to RGB.
rgb = true
# Pixel scale: multiply raw [0,255] values by this factor before mean/std.
scale = 0.00392156862745098 # 1/255
# Per-channel mean and std (ImageNet normalisation defaults).
mean = [0.485, 0.456, 0.406]
std = [0.229, 0.224, 0.225]
# Model input tensor name (from --inspect output).
input_tensor_name = "input"
# ─── ONNX filter agent ───────────────────────────────────────────────────────
# Section name follows MADS convention: executable name minus "mads-" prefix,
# with dots replaced by dashes → [onnx-filter].
[onnx-filter]
# Path to the ONNX model file. Can be overridden by --model-path on the CLI.
model_path = "/path/to/your/model.onnx"
# Topic to publish inference results on.
pub_topic = "onnx-filter"
# Topics to subscribe to. Must be an array; use [""] to subscribe to all.
sub_topic = ["onnx-filter-input"]