(raw: str)
| 481 | # ─── helpers ────────────────────────────────────────────────────────── |
| 482 | |
| 483 | def _parse_det_size(raw: str) -> tuple[int, int]: |
| 484 | raw = raw.strip().lower().replace(" ", "") |
| 485 | if "x" in raw: |
| 486 | w, h = raw.split("x", 1) |
| 487 | return (int(w), int(h)) |
| 488 | n = int(raw) |
| 489 | return (n, n) |
| 490 | |
| 491 | |
| 492 | def _locate_insightface_pack(options: dict[str, str], name: str) -> str | None: |