docker-compose brings up PostgreSQL 16 with pgvector and Redis 7 on non-standard host ports so it never collides with an existing local database. scripts/smoke.sh is the proof: compose, migrate, boot the API, issue a token, call the real DeepSeek API and print the resulting ob_ai_call and bl_ledger rows. services/vision and services/matting are placeholders noting that the local RTX 5090 makes BiRefNet and RTMPose developable without cloud GPU.
31 lines
1.3 KiB
Markdown
31 lines
1.3 KiB
Markdown
# `services/vision/` — 视觉服务(占位)
|
||
|
||
架构 §8.2。独立服务,CPU + ONNX。
|
||
|
||
```
|
||
POST /internal/vision/analyze
|
||
├─ segment_portrait 腾讯云 SegmentPortraitPic → 前景掩膜
|
||
├─ body_keypoints RTMPose ONNX(自建,腾讯云已下线,ADR-06)
|
||
├─ face_landmarks 腾讯云 AnalyzeFace(90点) / AnalyzeDenseLandmarks(888点)
|
||
├─ face_attributes 腾讯云 DetectFaceAttributes
|
||
├─ color_sampling 自研:按关键点定位采样区 → Lab,稳健统计(去高光/阴影)
|
||
└─ body_measure 自研:掩膜宽度剖面法(TD-06、ADR-07)
|
||
返回:结构化特征 + 每项置信度 + 质量问题标记
|
||
```
|
||
|
||
## 本地有 RTX 5090
|
||
|
||
**RTMPose ONNX 推理可以完全在本地开发和调参,不需要租云 GPU。**
|
||
准确率验证(体型 ≥ 80%、季型 ≥ 75%、脸型 ≥ 80%,各 30~50 样本,FR-RPT-05)
|
||
也可以在本地跑完。
|
||
|
||
## 质量门禁必须前置
|
||
|
||
架构 §8.2:图片质量不达标(多人、遮挡、侧脸过大、光线过暗)应在分析**前**就
|
||
返回明确的重拍指引,而不是硬算出一个低置信度结果。
|
||
**用户宁愿重拍一次,也不愿收到一份错的报告。**
|
||
|
||
## 人脸原图
|
||
|
||
不落盘。处理完立即删除(TD-20 / CR-02)。只返回派生特征。
|