基于中科视拓的seetaface6封装的免费人脸识别项目后端接口
shentao
2025-09-22 6474cdddb5933d64efdf0207614be2596a7a3600
降低识别精度,增加速度
2个文件已修改
4 ■■■■ 已修改文件
code/src/main/java/com/code2roc/fastface/config/FaceConfig.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
code/src/main/java/com/code2roc/fastface/util/SeetaFaceHepler.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
code/src/main/java/com/code2roc/fastface/config/FaceConfig.java
@@ -33,7 +33,7 @@
    public FaceRecognizerProxy faceRecognizer() throws FileNotFoundException {
        Path tempDir = Paths.get(System.getProperty("user.dir"), modelPath);
        SeetaConfSetting detectorPoolSetting = new SeetaConfSetting(
                new SeetaModelSetting(0, new String[]{tempDir + File.separator + "face_recognizer.csta"}, SeetaDevice.SEETA_DEVICE_CPU));
                new SeetaModelSetting(0, new String[]{tempDir + File.separator + "face_recognizer_light.csta"}, SeetaDevice.SEETA_DEVICE_CPU));
        FaceRecognizerProxy faceRecognizerProxy = new FaceRecognizerProxy(detectorPoolSetting);
        return faceRecognizerProxy;
    }
code/src/main/java/com/code2roc/fastface/util/SeetaFaceHepler.java
@@ -36,7 +36,7 @@
    public void init() throws Exception {
        Path tempDir = Paths.get(System.getProperty("user.dir"), modelPath);
        LoadNativeCore.LOAD_NATIVE(SeetaDevice.SEETA_DEVICE_CPU);
        faceDatabase = new FaceDatabase(new SeetaModelSetting(0, new String[]{tempDir + File.separator + "face_recognizer.csta"}, SeetaDevice.SEETA_DEVICE_CPU));
        faceDatabase = new FaceDatabase(new SeetaModelSetting(0, new String[]{tempDir + File.separator + "face_recognizer_light.csta"}, SeetaDevice.SEETA_DEVICE_CPU));
        File file = new File(Paths.get(System.getProperty("user.dir"), dataBasePath).toString());
        if (!file.exists()) {
            file.createNewFile();