From 92f69c57b920cf62ecc9f15f9ed196fa26dbf2ac Mon Sep 17 00:00:00 2001
From: chenyc <501753378@qq.com>
Date: 星期四, 29 五月 2025 20:26:16 +0800
Subject: [PATCH] gx优化

---
 dist/index.js |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/dist/index.js b/dist/index.js
index fcbc4a2..aab9d61 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -414914,14 +414914,15 @@
   }
 
   // 加载面匹配器以查找匹配面
-  const faceMatcher = new faceapi.FaceMatcher(faces, 0.5);
+  const faceMatcher = new faceapi.FaceMatcher(faces, 0.48);
   // 使用画布或其他方法读取图像
   const img = await canvas.loadImage(image);
   // // 调整图像大小
   // const resizedImage = faceapi.resizeResults(img, { width: 600, height: 600 });
 
-  // // 设置检测选项
-  const options = new faceapi.SsdMobilenetv1Options({ minConfidence: 0.3 });
+  // // 设置检测选项 味着只有当人脸检测的置信度大于或等于0.3时,该检测结果才会被接受。换句话说,如果模型认为检测到的对象是人脸的确定性低于30%,
+  //则不会将这个检测结果包含在最终输出中。这有助于减少误报(即错误地将非人脸区域识别为人脸的情况)。
+  const options = new faceapi.SsdMobilenetv1Options({ minConfidence: 0.4 });
   let temp = faceapi.createCanvasFromMedia(img);
 
   // 处理模型的图像

--
Gitblit v1.8.0