worker 侧从 Mock 替换为真实算法: - face_analysis 包:detector(MediaPipe 478点) / pose(solvePnP 姿态) / calibration(虹膜直径法) / hair_segmenter+bisenet_model(方案B 头发分割) / measure(方案A兜底+B/A决策+七眼+换算) / annotation(numpy渐变线+中文标注) - app.py:/api/v1/face/measure 接真实实现,返回 annotated_image_base64 (不落盘不拼URL,落盘由网关做);加 X-Internal-Token 鉴权、/health 就绪态、 可配置分辨率门槛、异常兜底 - 部署:start.sh/run_worker.sh/hair-worker.service 监听 8187;worker_config 示例 - 测试 tests/:Tier1合成真值<1e-6 + Tier2缩放不变 + Tier3叠加 + 错误码集成 + 数值回归,pytest 24 项全绿 - 文档补实测基线表 + RTX5090/torch 说明 注:worker 为 RTX 5090(sm_120),pinned torch 2.2.2(cu121) 只到 sm_90, BiSeNet 已自动回退 CPU(方案B 正常);要用 GPU 需换 torch cu128(≥2.7)。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
20 lines
391 B
Plaintext
20 lines
391 B
Plaintext
venv/
|
||
__pycache__/
|
||
*.pyc
|
||
.env
|
||
|
||
|
||
# 网关配置(含密码,不入 git)
|
||
gateway/config.json
|
||
|
||
# worker 配置(含鉴权密码,不入 git)
|
||
worker_config.json
|
||
|
||
# 模型权重(不入 git,由 scripts/download_weights.sh 拉取,见 OFFLINE_ASSETS.md)
|
||
face_analysis/weights/*.pth
|
||
|
||
# 生成的标注图、测试输出
|
||
static/annotations/*
|
||
!static/annotations/.gitkeep
|
||
tests/output/
|