feat: align surgery API with schemas and extend client tooling

- Refactor app API and schemas; adjust surgery pipeline, repository, and session manager.

- Improve consumption TSV logging and consumable vision integration; trim voice resolution.

- Add Baidu Face 1:N search script, .env.example entries, and client API integration doc.

- Update demo client, staging checklist, surgery interface doc, and related tests; add sample face image.

Made-with: Cursor
This commit is contained in:
Kevin
2026-04-23 16:09:20 +08:00
parent 0c05463617
commit 69980d8073
20 changed files with 994 additions and 610 deletions

View File

@@ -219,6 +219,13 @@ def cls_top3_from_result(
n3 = str(cls.names.get(int(t5i[2]), "")).strip()
c3 = _ci(2)
def _pid(label: str) -> str:
lb = (label or "").strip()
if not lb:
return ""
norm = _norm_product_name(lb)
return (name_to_code.get(norm) or name_to_code.get(lb) or "").strip()
return ClsTop3(
t1_name=n1,
t1_conf=c1,
@@ -226,9 +233,9 @@ def cls_top3_from_result(
t2_conf=c2,
t3_name=n3,
t3_conf=c3,
t1_pid=name_to_code.get(n1, ""),
t2_pid=name_to_code.get(n2, ""),
t3_pid=name_to_code.get(n3, ""),
t1_pid=_pid(n1),
t2_pid=_pid(n2),
t3_pid=_pid(n3),
)