mirror of
https://github.com/geekwenjie/SmartJavaAI.git
synced 2026-09-10 03:28:49 +00:00
文档增加测试结果
This commit is contained in:
21
README.md
21
README.md
@@ -73,7 +73,7 @@
|
||||
<dependency>
|
||||
<groupId>ink.numberone</groupId>
|
||||
<artifactId>smartjavaai-face</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<version>1.0.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
```
|
||||
@@ -141,6 +141,25 @@ if(realTimeFeature != null){
|
||||
|
||||
- [离线下载模型代码示例](examples/face_offline.md)
|
||||
|
||||
### 7. 测试结果
|
||||
|
||||
不同电脑环境下例图的识别时间
|
||||
|
||||
| 电脑环境 | **RetinaFace 模型** | 轻量模型 | 人证核验 |
|
||||
| ------------------------- | ------------------- | --------- | --------- |
|
||||
| windows intel i5 8400 8核 | 2s左右 | 700ms左右 | 600ms左右 |
|
||||
| macOS M1 Pro芯片 | 800ms左右 | 400ms左右 | 300ms左右 |
|
||||
|
||||
测试说明:
|
||||
|
||||
(1)使用默认方法创建人脸算法,会先下载人脸模型及相关文件,所以首次运行会比较慢
|
||||
|
||||
(2)目前SmartJavaAI默认使用CPU识别,所以CPU性能越高,识别速度越快
|
||||
|
||||
(3)由于例图中人脸数量多,所以识别的速度会稍慢
|
||||
|
||||
(4)测试结果中的时间不包含创建算法时间(加载模型),实际生产环境使用,只需系统系统时创建一次算法即可
|
||||
|
||||
## 完整代码
|
||||
|
||||
`📁 examples/src/main/java/smartai/examples/face`
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<dependency>
|
||||
<groupId>ink.numberone</groupId>
|
||||
<artifactId>smartjavaai-face</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<version>1.0.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
```
|
||||
@@ -56,7 +56,7 @@ Path imagePath = Paths.get("output").resolve("retinaface_detected.jpg");
|
||||
ImageUtils.drawBoundingBoxes(image, result, imagePath.toAbsolutePath().toString());
|
||||
```
|
||||
|
||||
### 3. 人证核验示例(离线下载模型)
|
||||
### 4. 人证核验示例(离线下载模型)
|
||||
|
||||
人证核验步骤:
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<dependency>
|
||||
<groupId>ink.numberone</groupId>
|
||||
<artifactId>smartjavaai-face</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<version>1.0.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
|
||||
@@ -115,7 +115,7 @@ public class FaceDemo {
|
||||
//提取身份证人脸特征(图片仅供测试)
|
||||
float[] featureIdCard = currentAlgorithm.featureExtraction("src/main/resources/kana1.jpg");
|
||||
sw.stop();
|
||||
logger.info("人脸检测耗时:" + sw.getTime() + "ms");
|
||||
logger.info("人脸特征提取耗时:" + sw.getTime() + "ms");
|
||||
//提取身份证人脸特征(从图片流获取)
|
||||
//File input = new File("src/main/resources/kana1.jpg");
|
||||
//float[] featureIdCard = currentAlgorithm.featureExtraction(new FileInputStream(input));
|
||||
|
||||
6
pom.xml
6
pom.xml
@@ -6,7 +6,7 @@
|
||||
|
||||
<groupId>ink.numberone</groupId>
|
||||
<artifactId>smartjavaai-parent</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<version>1.0.3</version>
|
||||
<packaging>pom</packaging>
|
||||
<description>SmartJavaAI</description>
|
||||
<modules>
|
||||
@@ -34,13 +34,13 @@
|
||||
<dependency>
|
||||
<groupId>ink.numberone</groupId>
|
||||
<artifactId>smartjavaai-common</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<version>1.0.3</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>ink.numberone</groupId>
|
||||
<artifactId>smartjavaai-face</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<version>1.0.3</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<parent>
|
||||
<groupId>ink.numberone</groupId>
|
||||
<artifactId>smartjavaai-parent</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<version>1.0.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>smartjavaai-common</artifactId>
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
<parent>
|
||||
<groupId>ink.numberone</groupId>
|
||||
<artifactId>smartjavaai-parent</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<version>1.0.3</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>smartjavaai-face</artifactId>
|
||||
<version>1.0.2</version>
|
||||
<version>1.0.3</version>
|
||||
<name>smartjavaai-face</name>
|
||||
<description>SmartJavaAI</description>
|
||||
<url>https://github.com/geekwenjie/SmartJavaAI</url>
|
||||
|
||||
Reference in New Issue
Block a user