various fix

This commit is contained in:
Kevin
2026-05-22 10:45:47 +08:00
parent 7600c5da2f
commit 87b6a7b804
8 changed files with 178 additions and 25 deletions

View File

@@ -11,6 +11,7 @@ from pathlib import Path
from loguru import logger
from app.algo_host.bundle import load_reference_default_config, resolve_bundle_relative_path
from app.algo_host.cjk_font import resolve_cjk_font_path
from app.algo_host.transcode import VISUALIZATION_MAX_WIDTH
@@ -46,7 +47,7 @@ def build_visualization_command(
device_cfg = cfg.get("device") if isinstance(cfg.get("device"), dict) else {}
hand_raw = str((weights or {}).get("hand") or "weights/hand_detect.pt").strip()
hand_model = resolve_bundle_relative_path(bundle_dir, hand_raw)
return [
cmd = [
sys.executable,
"-X",
"faulthandler",
@@ -64,6 +65,10 @@ def build_visualization_command(
"--max-width",
str(VISUALIZATION_MAX_WIDTH),
]
font_path = resolve_cjk_font_path()
if font_path is not None:
cmd.extend(["--font-path", str(font_path)])
return cmd
def _signal_name(signum: int) -> str: