From 4dd4b7c43e1934c27172083b09d5c74928ebf093 Mon Sep 17 00:00:00 2001
From: dengwenjie <775747758@qq.com>
Date: Mon, 14 Apr 2025 14:02:59 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=9B=AE=E6=A0=87=E6=A3=80?=
=?UTF-8?q?=E6=B5=8B=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/README.md b/README.md
index 6b35284..8a3a0ef 100644
--- a/README.md
+++ b/README.md
@@ -95,7 +95,9 @@
1.0.8
```
+
### 3、人脸检测运行流程
+
@@ -161,6 +163,30 @@ https://gitee.com/dengwenjie/SmartJavaAI-Demo
└── 📄[ObjectDetection.java](https://gitee.com/dengwenjie/SmartJavaAI-Demo/blob/master/src/main/java/smartai/examples/objectdetection/ObjectDetection.java) *(目标检测示例代码)*
+### 5、运行设备
+默认将使用CPU运行模型,如果需要使用GPU,需要在创建模型接口中手动指定运行设备
+
+GPU中运行需要满足如下条件:
+
+(1)安装CUDA v12.4及cuDNN v8.9.7
+
+(2)将缓存目录加入到环境变量中,并删除其他cuda环境变量
+
+ windows配置如下:
+
+
+
+
+
+
+(3)示例代码:
+
+```java
+FaceModelConfig config = new FaceModelConfig();
+config.setModelEnum(FaceModelEnum.RETINA_FACE);//人脸模型
+config.setDevice(DeviceEnum.GPU);//指定GPU
+FaceModel faceModel = FaceModelFactory.getInstance().getModel(config);
+```
## 🙏 鸣谢