把微信联系人头像建成人脸锚点,照片处理时自动认出"这是谁",标注时直接带名字。
- data:Person 加 faceEmbedding 锚点字段 + 迁移 v4→v5(ALTER 加 BLOB 列,
DDL 对过 Room;真机迁移零数据损失);PersonDao anchors/getByContactRef
- FaceMatcher:gallery 统一 = 人物锚点(头像) + 已标注脸样本;match() 共享余弦匹配;
PhotoProcessor 改用统一 gallery
- WeChatEnrollWorker:读 filesDir/wx_enroll/(enroll.json + 头像) → 对每张头像跑
**端上 FaceEngine**(必须同引擎才能跟照片人脸比),恰 1 脸就建 Person(name,
contactRef=wechat:wxid, avatarPath, faceEmbedding)。幂等、单轮预算 8min、retry 续
- UI:人物页「从微信导入联系人」按钮;人物卡片标注「微信/声纹」来源
- server/services/wechat/extract-wechat-avatars.py:Mac 侧提取脚本
(sqlcipher 解密 EnMicroMsg.db → rcontact⨝img_flag 筛真人 → 下载头像)
实测:4338 真人联系人,头像有脸覆盖率 41%(1796/4337),端上 90s 建 284 锚点(继续后台跑)。
头像/姓名属敏感 PII,存 _wx_enroll/ 已 gitignore。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>