docs(quick-260330-mb3): add summary and update state
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Project State
|
||||
|
||||
**Project:** ArcSoft Face Recognition Plugin
|
||||
**Last activity:** 2026-03-30 - Initialized project
|
||||
**Last activity:** 2026-03-30 - Completed quick task 260330-mb3: 实现完整的人脸识别示例
|
||||
|
||||
## Current Phase
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|---|-------------|------|--------|-----------|
|
||||
| 260330-ld1 | 在example的人脸识别预览页面增加注册按钮和人脸ID显示 | 2026-03-30 | 184c3a9 | [260330-ld1-example-id-id](./quick/260330-ld1-example-id-id/) |
|
||||
| 260330-ll6 | 修复注册后不显示已注册状态的问题 | 2026-03-30 | 1c4f019 | [260330-ll6-fix-registration](./quick/260330-ll6-fix-registration/) |
|
||||
| 260330-mb3 | 实现完整的人脸识别示例(注册/验证流程) | 2026-03-30 | 3c7e992 | [260330-mb3-face-recognition-example](./quick/260330-mb3-face-recognition-example/) |
|
||||
|
||||
---
|
||||
*State initialized: 2026-03-30*
|
||||
@@ -0,0 +1,40 @@
|
||||
# Quick Task 260330-mb3: 完整人脸识别示例
|
||||
|
||||
**Date:** 2026-03-30
|
||||
**Commit:** 3c7e992
|
||||
|
||||
## Summary
|
||||
|
||||
重写 example 示例代码,实现真正的 1:1 人脸识别功能。
|
||||
|
||||
## Changes
|
||||
|
||||
### example/lib/main.dart
|
||||
- 完全重写 `FaceRecognitionScreen` 类
|
||||
- 实现 `_registerFace()` 方法:使用 `extractFaceFeature(extractType: 0)` 注册模式
|
||||
- 实现 `_verifyFace()` 方法:使用 `extractFaceFeature(extractType: 1)` + `compareFaceFeature()`
|
||||
- 使用 `SharedPreferences` 存储人脸特征数据 (Base64 编码)
|
||||
- 添加注册/验证模式切换功能
|
||||
- 显示相似度百分比和验证结果
|
||||
|
||||
### example/pubspec.yaml
|
||||
- 添加 `shared_preferences: ^2.2.2` 依赖
|
||||
|
||||
## Key API Usage
|
||||
|
||||
| 流程 | API | 参数 |
|
||||
|------|-----|------|
|
||||
| 人脸检测 | `detectFaces()` | format=2050 (NV21) |
|
||||
| 注册特征提取 | `extractFaceFeature()` | extractType=0 (REGISTER) |
|
||||
| 识别特征提取 | `extractFaceFeature()` | extractType=1 (RECOGNIZE) |
|
||||
| 特征比对 | `compareFaceFeature()` | compareModel=0 (LIFE_PHOTO) |
|
||||
|
||||
## Verification Threshold
|
||||
|
||||
- 推荐阈值: 0.8 (生活照)
|
||||
- 相似度 >= 0.8 判定为同一人
|
||||
|
||||
## Files Modified
|
||||
|
||||
- `example/lib/main.dart` (+419/-208 lines)
|
||||
- `example/pubspec.yaml` (+3 lines)
|
||||
Reference in New Issue
Block a user