MCPcopy
hub / github.com/mudler/LocalAI / _parse_det_size

Function _parse_det_size

backend/python/insightface/engines.py:483–489  ·  view source on GitHub ↗
(raw: str)

Source from the content-addressed store, hash-verified

481# ─── helpers ──────────────────────────────────────────────────────────
482
483def _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
492def _locate_insightface_pack(options: dict[str, str], name: str) -> str | None:

Callers 2

prepareMethod · 0.85
prepareMethod · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected