si-m1-face-package/README.zh-CN.md

77 lines
2.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# AISU SI-M1 Face SDK
`xin.aisu.si-m1.face` 是面向 AISU SI-M1 人脸识别模组的 Unity SDK,提供串口通信、协议封包/拆包、模组生命周期管理、人脸验证、人脸录入、用户管理、图片抓拍、二维码、UVC 参数、Mock 通信和示例场景。
English documentation: [README.md](README.md).
## 包信息
| 项目 | 值 |
|---|---|
| Package Name | `xin.aisu.si-m1.face` |
| Display Name | `AISU SI-M1 Face SDK` |
| Runtime Assembly | `Aisu.SIM1.Face.Runtime.dll` |
| Editor Assembly | `Aisu.SIM1.Face.Editor.dll` |
| Unity Version | `2021.3` 或更高 |
| 配置资产路径 | `Assets/Resources/AISU/SI-M1 Face SDK/FaceSdkSettings.asset` |
## 快速开始
1. 打开 `AISU/SI-M1 Face SDK/Settings`。
2. 配置串口号、波特率、Mock 模式、自动验证和日志选项。
3. 在场景中保留一个 `FaceModuleManager`,并绑定配置资产。
4. 通过 `FaceModuleManager` 调用 SDK 服务。
```csharp
using Aisu.SIM1.Face.Core;
using UnityEngine;
public sealed class FaceExample : MonoBehaviour
{
[SerializeField] private FaceModuleManager manager;
private async void Start()
{
manager.Open();
await manager.WaitReadyAsync();
var version = await manager.Basic.GetVersionAsync();
Debug.Log("SI-M1 version: " + version);
}
private void OnApplicationQuit()
{
manager?.Close();
}
}
```
## Samples
在 Unity Package Manager 中导入 Samples,然后打开 `Assets/Samples` 下的场景。
```text
Assets/Samples/AISU SI-M1 Face SDK/0.1.6/SI-M1 Face Demo/Scenes/FaceModuleDemo.unity
Assets/Samples/AISU SI-M1 Face SDK/0.1.6/Face Detection Demo/Scenes/FaceDetectionDemo.unity
```
不要直接打开 `Packages/xin.aisu.si-m1.face/Samples` 下的示例场景,Git UPM 包内容在 Unity 中是只读的。
`SI-M1 Face Demo` 用于完整 SDK 命令测试。`Face Detection Demo` 用于摄像头、串口、录入、识别和用户列表的最小流程测试。
## 文档
| English | 中文 |
|---|---|
| [Quick Start](Documentation~/SDK_QuickStart.md) | [快速开始](Documentation~/SDK_QuickStart.zh-CN.md) |
| [Configuration](Documentation~/SDK_Configuration.md) | [配置说明](Documentation~/SDK_Configuration.zh-CN.md) |
| [API Reference](Documentation~/SDK_API_Reference.md) | [API 参考](Documentation~/SDK_API_Reference.zh-CN.md) |
| [Mock and Testing](Documentation~/SDK_Mock_And_Testing.md) | [Mock 与测试](Documentation~/SDK_Mock_And_Testing.zh-CN.md) |
| [Demo UI](Documentation~/README_UI.md) | [Demo UI](Documentation~/README_UI.zh-CN.md) |
## 运行注意
- 每个场景只保留一个 `FaceModuleManager`。
- 离开场景或退出应用时调用 `Close()` 或 `CloseAsync()`。
- 开启自动验证后,录入、用户管理、二维码、抓拍等独占操作前调用 `StopFaceOperationAsync()`。