Runtime Configuration#
All runtime behavior is configured through make up variables (forwarded to
docker compose as environment variables) or CLI flags applied through the
EXTRA passthrough. There are no in-app UI controls — the display window only
renders detections and exits on ESC.
Sources#
Select the frame source with SOURCE.
|
Argument variable |
Notes |
|---|---|---|
|
|
Basler serial number; empty selects the first camera. Use |
|
|
|
|
|
Container-side video path, e.g. |
Examples:
make up SOURCE=camera SERIAL=<SERIAL_NUMBER>
make up SOURCE=webcam DEVICE_INDEX=0
make up SOURCE=file SOURCE_ARG=/videos/polyp_test.mp4
Low-latency profile switch#
Param |
Values |
Effect |
|---|---|---|
|
|
Master switch. |
Recommended low-latency invocation on a 60 Hz panel:
make up LOWLATENCY=1 CAMERA_TRIGGER=vsync VSYNC_DIVISOR=2 SERIAL=<SERIAL_NUMBER>
Capture knobs#
Param |
Values |
Effect |
|---|---|---|
|
|
|
|
integer |
vsync only: capture every Nth vblank. |
|
microseconds |
Fixed shutter time. Empty leaves the camera as-is. Lower = less latency and motion blur, but darker — validate illumination. |
Display knobs#
Param |
Values |
Effect |
|---|---|---|
|
|
Display backend. |
|
|
|
|
|
Emit per-stage latency CSV to stdout. |
|
|
|
Inference knobs#
Param |
Values |
Effect |
|---|---|---|
|
|
OpenVINO inference device. |
|
|
Detection confidence cutoff. |
|
integer |
Run inference every Nth captured frame. Display still shows every captured frame. |
|
container path |
OpenVINO IR ( |
Examples:
make up SERIAL=<SERIAL_NUMBER> DEVICE=GPU # default
make up SERIAL=<SERIAL_NUMBER> DEVICE=CPU
make up SERIAL=<SERIAL_NUMBER> DEVICE=NPU # requires /dev/accel on the host
Bind-mount paths#
Param |
Default |
Effect |
|---|---|---|
|
|
Host folder mounted to |
|
|
Host folder mounted to |
Image source#
Param |
Default |
Effect |
|---|---|---|
|
|
|
|
|
Prefix used to resolve the pulled image. |
|
|
Image tag. |
Core pinning + real-time priority#
Pin the capture / inference / display threads to dedicated CPU cores and raise
their scheduling priority. These are first-class make up variables:
make up SOURCE=camera LOWLATENCY=1 CAMERA_TRIGGER=vsync VSYNC_DIVISOR=2 SERIAL=<SERIAL_NUMBER> \
CPU_CAPTURE=1 CPU_INFERENCE=2 CPU_DISPLAY=3 RT_PRIORITY=80
Use make show-cores to see which cores are P-cores and pick distinct indices.
RT_PRIORITY > 0 uses SCHED_FIFO (needs CAP_SYS_NICE + rtprio ulimit,
both granted by the compose file). It falls back to normal scheduling when not
permitted.
Other single-purpose knobs have their own variables — e.g. CAMERA_FPS=60
(cap capture rate when CAMERA_TRIGGER=off) and HEADLESS=1 (no display
window).
Full flag / env reference#
Flag |
Env |
Default |
Purpose |
|---|---|---|---|
|
|
|
|
|
|
|
path / device index / camera serial |
|
|
|
|
|
|
|
OpenVINO IR path |
|
|
|
detection confidence |
|
|
|
NMS IoU |
|
|
|
infer every Nth frame |
|
|
|
capture resolution |
|
|
|
Basler capture-rate cap (0 = free-running) |
|
|
off |
no window (benchmark / server) |
|
|
|
|
|
|
off |
GL fullscreen direct-scanout |
|
|
|
|
|
|
|
vsync: capture every Nth vblank |
|
|
off |
per-stage latency CSV |
|
|
— |
write annotated |
|
|
|
window scale |
|
|
|
how long a detection stays overlaid |
|
|
loop on |
stop file at EOF instead of looping |
|
|
camera as-is |
Basler manual exposure / gain |
|
|
— |
pin capture thread to this CPU core |
|
|
— |
pin inference thread to this CPU core |
|
|
— |
pin display thread to this CPU core |
|
|
|
|
Latency reality check#
On a 60 Hz monitor, photon-to-pixel is physically floored at ~one refresh (~16 ms). Fullscreen direct-scanout removes the compositor’s 1-2 frames but cannot beat the panel. Single-digit ms requires a 144-240 Hz+ low-lag panel with the compositor off.
The CSV trigger_to_display_ms ends at frame hand-off and excludes
present → GPU → scanout + exposure, so it reads lower than an external
photon-to-pixel measurement rig. Use it for before/after comparison, not as an
absolute figure.