Forráskód Böngészése

support face recognition pipeline (#2400)

* init commit with face recgnition pipeline

* add face recognition docs

* support face recognition pipeline

* rename face recognition module to face feature module
学卿 1 éve
szülő
commit
3892d429df

+ 1 - 2
docs/module_usage/tutorials/cv_modules/face_detection.md

@@ -7,7 +7,6 @@
 
 ## 二、支持模型列表
 
-
 | 模型 | AP (%)<br>Easy/Medium/Hard | GPU推理耗时 (ms) | CPU推理耗时 | 模型存储大小 (M) | 介绍                          |
 |-|:-:|-|-|-|-|
 | BlazeFace                | 77.7/73.4/49.5  |              |         | 0.447      | 轻量高效的人脸检测模型                  |
@@ -246,7 +245,7 @@ python main.py -c paddlex/configs/face_detection/PicoDet_LCNet_x2_5_face.yaml \
 
 1.**产线集成**
 
-人脸目标检测模块可以集成的PaddleX产线有[**人脸识别**](../../../pipeline_usage/tutorials/cv_pipelines/face_recognition.md),只需要替换模型路径即可完成相关产线的人脸检测模块的模型更新。在产线集成中,你可以使用高性能部署和服务化部署来部署你得到的模型。
+人脸检测模块可以集成的PaddleX产线有[**人脸识别**](../../../pipeline_usage/tutorials/cv_pipelines/face_recognition.md),只需要替换模型路径即可完成相关产线的人脸检测模块的模型更新。在产线集成中,你可以使用高性能部署和服务化部署来部署你得到的模型。
 
 2.**模块集成**
 

+ 16 - 16
docs/module_usage/tutorials/cv_modules/face_recognition.md → docs/module_usage/tutorials/cv_modules/face_feature.md

@@ -1,9 +1,9 @@
-简体中文 | [English](face_recognition_en.md)
+简体中文 | [English](face_feature_en.md)
 
-# 人脸识别模块使用教程
+# 人脸特征模块使用教程
 
 ## 一、概述
-人脸识别模型通常以经过检测提取和关键点矫正处理的标准化人脸图像作为输入。人脸识别模型从这些图像中提取具有高度辨识性的人脸特征,以便供后续模块使用,如人脸匹配和验证等任务。
+人脸特征模块通常以经过检测提取和关键点矫正处理的标准化人脸图像作为输入,从这些图像中提取具有高度辨识性的人脸特征,以便供后续模块使用,如人脸匹配和验证等任务。
 
 ## 二、支持模型列表
 
@@ -12,8 +12,8 @@
 
 | 模型            | 输出特征维度 | AP (%)<br>AgeDB-30/CFP-FP/LFW | GPU推理耗时 (ms) | CPU推理耗时 | 模型存储大小 (M) | 介绍                                  |
 |---------------|--------|-------------------------------|--------------|---------|------------|-------------------------------------|
-| MobileFaceNet | 128    | 96.28/96.71/99.58             |              |         | 4.1        | 基于MobileFaceNet在MS1Mv3数据集上训练的人脸识别模型 |
-| ResNet50_face      | 512    | 98.12/98.56/99.77             |              |         | 87.2       | 基于ResNet50在MS1Mv3数据集上训练的人脸识别模型      |
+| MobileFaceNet | 128    | 96.28/96.71/99.58             |              |         | 4.1        | 基于MobileFaceNet在MS1Mv3数据集上训练的人脸特征提取模型 |
+| ResNet50_face      | 512    | 98.12/98.56/99.77             |              |         | 87.2       | 基于ResNet50在MS1Mv3数据集上训练的人脸特征提取模型      |
 
 注:以上精度指标是分别在AgeDB-30、CFP-FP和LFW数据集上测得的Accuracy。所有模型 GPU 推理耗时基于 NVIDIA Tesla T4 机器,精度类型为 FP32, CPU 推理速度基于 Intel(R) Xeon(R) Gold 5117 CPU @ 2.00GHz,线程数为8,精度类型为 FP32。
 </details>
@@ -21,7 +21,7 @@
 ## 三、快速集成
 > ❗ 在快速集成前,请先安装 PaddleX 的 wheel 包,详细请参考 [PaddleX本地安装教程](../../../installation/installation.md)
 
-完成whl包的安装后,几行代码即可完成人脸识别模块的推理,可以任意切换该模块下的模型,您也可以将人脸识别的模块中的模型推理集成到您的项目中。运行以下代码前,请您下载[示例图片](https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/face_classification_001.jpg)到本地。
+完成whl包的安装后,几行代码即可完成人脸特征模块的推理,可以任意切换该模块下的模型,您也可以将人脸特征模块中的模型推理集成到您的项目中。运行以下代码前,请您下载[示例图片](https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/face_recognition_001.jpg)到本地。
 
 ```python
 from paddlex import create_model
@@ -29,7 +29,7 @@ from paddlex import create_model
 model_name = "MobileFaceNet"
 
 model = create_model(model_name)
-output = model.predict("face_classification_001.jpg", batch_size=1)
+output = model.predict("face_recognition_001.jpg", batch_size=1)
 
 for res in output:
     res.print(json_format=False)
@@ -38,10 +38,10 @@ for res in output:
 
 关于更多 PaddleX 的单模型推理的 API 的使用方法,可以参考[PaddleX单模型Python脚本使用说明](../../instructions/model_python_API.md)。
 ## 四、二次开发
-如果你追求更高精度的现有模型,可以使用PaddleX的二次开发能力,开发更好的人脸识别模型。在使用PaddleX开发人脸识别模型之前,请务必安装PaddleX的PaddleClas插件,安装过程可以参考 [PaddleX本地安装教程](../../../installation/installation.md)
+如果你追求更高精度的现有模型,可以使用PaddleX的二次开发能力,开发更好的人脸特征模型。在使用PaddleX开发人脸特征模型之前,请务必安装PaddleX的PaddleClas插件,安装过程可以参考 [PaddleX本地安装教程](../../../installation/installation.md)
 
 ### 4.1 数据准备
-在进行模型训练前,需要准备相应任务模块的数据集。PaddleX 针对每一个模块提供了数据校验功能,**只有通过数据校验的数据才可以进行模型训练**。此外,PaddleX为每一个模块都提供了demo数据集,您可以基于官方提供的 Demo 数据完成后续的开发。若您希望用私有数据集进行后续的模型训练,人脸识别模块的训练数据集采取通用图像分类数据集格式组织,可以参考[PaddleX图像分类任务模块数据标注教程](../../../data_annotations/cv_modules/image_classification.md)。若您希望用私有数据集进行后续的模型评估,请注意人脸识别模块的验证数据集格式与训练数据集的方式有所不同,请参考[4.1.4节 人脸识别模块数据集组织方式](#414-人脸识别模块数据集组织方式)
+在进行模型训练前,需要准备相应任务模块的数据集。PaddleX 针对每一个模块提供了数据校验功能,**只有通过数据校验的数据才可以进行模型训练**。此外,PaddleX为每一个模块都提供了demo数据集,您可以基于官方提供的 Demo 数据完成后续的开发。若您希望用私有数据集进行后续的模型训练,人脸特征模块的训练数据集采取通用图像分类数据集格式组织,可以参考[PaddleX图像分类任务模块数据标注教程](../../../data_annotations/cv_modules/image_classification.md)。若您希望用私有数据集进行后续的模型评估,请注意人脸特征模块的验证数据集格式与训练数据集的方式有所不同,请参考[4.1.4节 人脸特征模块数据集组织方式](#414-人脸特征模块数据集组织方式)
 
 #### 4.1.1 Demo 数据下载
 您可以参考下面的命令将 Demo 数据集下载到指定文件夹:
@@ -114,13 +114,13 @@ python main.py -c paddlex/configs/face_recognition/MobileFaceNet.yaml \
 <details>
   <summary>👉 <b>格式转换/数据集划分详情(点击展开)</b></summary>
 
-人脸识别模块不支持数据格式转换与数据集划分。
+人脸特征模块不支持数据格式转换与数据集划分。
 
 </details>
 
-#### 4.1.4 人脸识别模块数据集组织方式
+#### 4.1.4 人脸特征模块数据集组织方式
 
-人脸识别模块验证数据集与训练数据集格式不同,若需要在私有数据上训练模型和评估模型精度,请按照如下方式组织自己的数据集:
+人脸特征模块验证数据集与训练数据集格式不同,若需要在私有数据上训练模型和评估模型精度,请按照如下方式组织自己的数据集:
 
 ```bash
 face_rec_dataroot      # 数据集根目录,目录名称可以改变
@@ -208,12 +208,12 @@ python main.py -c paddlex/configs/face_recognition/MobileFaceNet.yaml \
 在完成模型的训练和评估后,即可使用训练好的模型权重进行推理预测。在PaddleX中实现模型推理预测可以通过两种方式:命令行和wheel 包。
 
 #### 4.4.1 模型推理
-* 通过命令行的方式进行推理预测,只需如下一条命令,运行以下代码前,请您下载[示例图片](https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/face_classification_001.jpg)到本地。
+* 通过命令行的方式进行推理预测,只需如下一条命令,运行以下代码前,请您下载[示例图片](https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/face_recognition_001.jpg)到本地。
 ```bash
 python main.py -c paddlex/configs/face_recognition/MobileFaceNet.yaml \
     -o Global.mode=predict \
     -o Predict.model_dir="./output/best_model/inference" \
-    -o Predict.input="face_classification_001.jpg"
+    -o Predict.input="face_recognition_001.jpg"
 ```
 与模型训练和评估类似,需要如下几步:
 
@@ -228,8 +228,8 @@ python main.py -c paddlex/configs/face_recognition/MobileFaceNet.yaml \
 
 1.**产线集成**
 
-人脸识别模块可以集成的PaddleX产线有[**人脸识别**](../../../pipeline_usage/tutorials/cv_pipelines/face_recognition.md),只需要替换模型路径即可完成相关产线的人脸识别模块的模型更新。在产线集成中,你可以使用高性能部署和服务化部署来部署你得到的模型。
+人脸特征模块可以集成的PaddleX产线有[**人脸识别**](../../../pipeline_usage/tutorials/cv_pipelines/face_recognition.md),只需要替换模型路径即可完成相关产线的人脸特征模块的模型更新。在产线集成中,你可以使用高性能部署和服务化部署来部署你得到的模型。
 
 2.**模块集成**
 
-您产出的权重可以直接集成到人脸识别模块中,可以参考[快速集成](#三快速集成)的 Python 示例代码,只需要将模型替换为你训练的到的模型路径即可。
+您产出的权重可以直接集成到人脸特征模块中,可以参考[快速集成](#三快速集成)的 Python 示例代码,只需要将模型替换为你训练的到的模型路径即可。

+ 16 - 16
docs/module_usage/tutorials/cv_modules/face_recognition_en.md → docs/module_usage/tutorials/cv_modules/face_feature_en.md

@@ -1,9 +1,9 @@
-English | [简体中文](face_recognition.md)
+English | [简体中文](face_feature.md)
 
-# Face Recognition Module Usage Tutorial
+# Face Feature Module Usage Tutorial
 
 ## I. Overview
-Face recognition models typically take standardized face images processed through detection, extraction, and keypoint correction as input. These models extract highly discriminative facial features from these images for subsequent modules, such as face matching and verification tasks.
+Face feature models typically take standardized face images processed through detection, extraction, and keypoint correction as input. These models extract highly discriminative facial features from these images for subsequent modules, such as face matching and verification tasks.
 
 ## II. Supported Model List
 
@@ -12,8 +12,8 @@ Face recognition models typically take standardized face images processed throug
 
 | Model           | Output Feature Dimension | Acc (%)<br>AgeDB-30/CFP-FP/LFW | GPU Inference Time (ms) | CPU Inference Time | Model Size (M) | Description                                  |
 |---------------|--------|-------------------------------|--------------|---------|------------|-------------------------------------|
-| MobileFaceNet | 128    | 96.28/96.71/99.58             |              |         | 4.1        | Face recognition model trained on MobileFaceNet with MS1Mv3 dataset |
-| ResNet50_face    | 512    | 98.12/98.56/99.77             |              |         | 87.2       | Face recognition model trained on ResNet50 with MS1Mv3 dataset      |
+| MobileFaceNet | 128    | 96.28/96.71/99.58             |              |         | 4.1        | Face feature model trained on MobileFaceNet with MS1Mv3 dataset |
+| ResNet50_face    | 512    | 98.12/98.56/99.77             |              |         | 87.2       | Face feature model trained on ResNet50 with MS1Mv3 dataset      |
 
 Note: The above accuracy metrics are Accuracy scores measured on the AgeDB-30, CFP-FP, and LFW datasets, respectively. All model GPU inference times are based on an NVIDIA Tesla T4 machine with FP32 precision. CPU inference speeds are based on an Intel(R) Xeon(R) Gold 5117 CPU @ 2.00GHz with 8 threads and FP32 precision.
 </details>
@@ -21,7 +21,7 @@ Note: The above accuracy metrics are Accuracy scores measured on the AgeDB-30, C
 ## III. Quick Integration
 > ❗ Before quick integration, please install the PaddleX wheel package. For details, refer to the [PaddleX Local Installation Tutorial](../../../installation/installation_en.md)
 
-After installing the whl package, a few lines of code can complete the inference of the face recognition module. You can switch models under this module freely, and you can also integrate the model inference of the face recognition module into your project. Before running the following code, please download the [example image](https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/face_classification_001.jpg) to your local machine.
+After installing the whl package, a few lines of code can complete the inference of the face feature module. You can switch models under this module freely, and you can also integrate the model inference of the face feature module into your project. Before running the following code, please download the [example image](https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/face_recognition_001.jpg) to your local machine.
 
 ```python
 from paddlex import create_model
@@ -29,7 +29,7 @@ from paddlex import create_model
 model_name = "MobileFaceNet"
 
 model = create_model(model_name)
-output = model.predict("face_classification_001.jpg", batch_size=1)
+output = model.predict("face_recognition_001.jpg", batch_size=1)
 
 for res in output:
     res.print(json_format=False)
@@ -39,10 +39,10 @@ for res in output:
 For more information on using the PaddleX single-model inference API, refer to the [PaddleX Single Model Python Script Usage Instructions](../../instructions/model_python_API_en.md).
 
 ## IV. Custom Development
-If you aim for higher accuracy with existing models, you can leverage PaddleX's custom development capabilities to develop better face recognition models. Before developing face recognition models with PaddleX, ensure you have installed the PaddleX PaddleClas plugin. The installation process can be found in the [PaddleX Local Installation Tutorial](../../../installation/installation_en.md)
+If you aim for higher accuracy with existing models, you can leverage PaddleX's custom development capabilities to develop better face feature models. Before developing face feature models with PaddleX, ensure you have installed the PaddleX PaddleClas plugin. The installation process can be found in the [PaddleX Local Installation Tutorial](../../../installation/installation_en.md)
 
 ### 4.1 Data Preparation
-Before model training, you need to prepare the dataset for the corresponding task module. PaddleX provides data validation functionality for each module, and **only data that passes validation can be used for model training**. Additionally, PaddleX provides demo datasets for each module, allowing you to complete subsequent development based on the official demo data. If you wish to use a private dataset for subsequent model training, the training dataset for the face recognition module is organized in a general image classification dataset format. You can refer to the [PaddleX Image Classification Task Module Data Annotation Tutorial](../../../data_annotations/cv_modules/image_classification_en.md). If you wish to use a private dataset for subsequent model evaluation, note that the validation dataset format for the face recognition module differs from the training dataset format. Please refer to [Section 4.1.4 Data Organization Face Recognition Module](#414-Data-Organization-for-Face-Recognition-Module)
+Before model training, you need to prepare the dataset for the corresponding task module. PaddleX provides data validation functionality for each module, and **only data that passes validation can be used for model training**. Additionally, PaddleX provides demo datasets for each module, allowing you to complete subsequent development based on the official demo data. If you wish to use a private dataset for subsequent model training, the training dataset for the face feature module is organized in a general image classification dataset format. You can refer to the [PaddleX Image Classification Task Module Data Annotation Tutorial](../../../data_annotations/cv_modules/image_classification_en.md). If you wish to use a private dataset for subsequent model evaluation, note that the validation dataset format for the face feature module differs from the training dataset format. Please refer to [Section 4.1.4 Data Organization Face Feature Module](#414-Data-Organization-for-Face-Feature-Module)
 
 #### 4.1.1 Demo Data Download
 You can use the following commands to download the demo dataset to a specified folder:
@@ -115,13 +115,13 @@ After completing the data validation, you can convert the dataset format and re-
 <details>
   <summary>👉 <b>Details on Format Conversion / Dataset Splitting (Click to Expand)</b></summary>
 
-The Face Recognition module does not support data format conversion or dataset splitting.
+The face feature module does not support data format conversion or dataset splitting.
 
 </details>
 
-#### 4.1.4 Data Organization for Face Recognition Module
+#### 4.1.4 Data Organization for Face Feature Module
 
-The format of the validation dataset for the Face Recognition module differs from the training dataset. If you need to evaluate model accuracy on private data, please organize your dataset as follows:
+The format of the validation dataset for the face feature module differs from the training dataset. If you need to evaluate model accuracy on private data, please organize your dataset as follows:
 
 ```bash
 face_rec_dataroot      # Root directory of the dataset, the directory name can be changed
@@ -206,12 +206,12 @@ After completing the model evaluation, an `evaluate_result.json` file will be pr
 After completing model training and evaluation, you can use the trained model weights for inference predictions. In PaddleX, model inference predictions can be implemented through two methods: command line and wheel package.
 
 #### 4.4.1 Model Inference
-* To perform inference predictions through the command line, you only need the following command. Before running the following code, please download the [example image](https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/face_classification_001.jpg) to your local machine.
+* To perform inference predictions through the command line, you only need the following command. Before running the following code, please download the [example image](https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/face_recognition_001.jpg) to your local machine.
 ```bash
 python main.py -c paddlex/configs/face_recognition/MobileFaceNet.yaml \
     -o Global.mode=predict \
     -o Predict.model_dir="./output/best_model/inference" \
-    -o Predict.input="face_classification_001.jpg"
+    -o Predict.input="face_recognition_001.jpg"
 ```
 Similar to model training and evaluation, the following steps are required:
 
@@ -226,8 +226,8 @@ The model can be directly integrated into the PaddleX pipeline or into your own
 
 1. **Pipeline Integration**
 
-The face recognition module can be integrated into the PaddleX pipeline for [**Face Recognition**](../../../pipeline_usage/tutorials/face_recognition_pipelines/face_recognition_en.md). You only need to replace the model path to update the face recognition module of the relevant pipeline. In pipeline integration, you can use high-performance deployment and service-oriented deployment to deploy the model you obtained.
+The face feature module can be integrated into the PaddleX pipeline for [**Face Recognition**](../../../pipeline_usage/tutorials/face_recognition_pipelines/face_recognition_en.md). You only need to replace the model path to update the face feature module of the relevant pipeline. In pipeline integration, you can use high-performance deployment and service-oriented deployment to deploy the model you obtained.
 
 2. **Module Integration**
 
-The weights you produced can be directly integrated into the face recognition module. You can refer to the Python example code in [Quick Integration](#III.-Quick-Integration) and only need to replace the model with the path to the model you trained.
+The weights you produced can be directly integrated into the face feature module. You can refer to the Python example code in [Quick Integration](#III.-Quick-Integration) and only need to replace the model with the path to the model you trained.

+ 9 - 10
docs/pipeline_usage/tutorials/cv_pipelines/face_recognition.md

@@ -9,7 +9,7 @@
 
 ![](https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/refs/heads/main/images/pipelines/face_recognition/01.jpg)
 
-**人脸识别产线中包含了人脸检测模块和人脸识别模块**,每个模块中包含了若干模型,具体使用哪些模型,您可以根据下边的 benchmark 数据来选择。**如您更考虑模型精度,请选择精度较高的模型,如您更考虑模型推理速度,请选择推理速度较快的模型,如您更考虑模型存储大小,请选择存储大小较小的模型**。
+**人脸识别产线中包含了人脸检测模块和人脸特征模块**,每个模块中包含了若干模型,具体使用哪些模型,您可以根据下边的 benchmark 数据来选择。**如您更考虑模型精度,请选择精度较高的模型,如您更考虑模型推理速度,请选择推理速度较快的模型,如您更考虑模型存储大小,请选择存储大小较小的模型**。
 
 <details>
    <summary> 👉模型列表详情</summary>
@@ -26,12 +26,12 @@
 注:以上精度指标是在WIDER-FACE验证集上,以640
 *640作为输入尺寸评估得到的。所有模型 GPU 推理耗时基于 NVIDIA Tesla T4 机器,精度类型为 FP32, CPU 推理速度基于 Intel(R) Xeon(R) Gold 5117 CPU @ 2.00GHz,线程数为8,精度类型为 FP32。
 
-**人脸识别模块:**
+**人脸特征模块:**
 
 | 模型            | 输出特征维度 | Acc (%)<br>AgeDB-30/CFP-FP/LFW | GPU推理耗时 (ms) | CPU推理耗时 | 模型存储大小 (M) | 介绍                                  |
 |---------------|--------|-------------------------------|--------------|---------|------------|-------------------------------------|
-| MobileFaceNet | 128    | 96.28/96.71/99.58             |              |         | 4.1        | 基于MobileFaceNet在MS1Mv3数据集上训练的人脸识别模型 |
-| ResNet50_face  | 512    | 98.12/98.56/99.77             |              |         | 87.2       | 基于ResNet50在MS1Mv3数据集上训练的人脸识别模型      |
+| MobileFaceNet | 128    | 96.28/96.71/99.58             |              |         | 4.1        | 基于MobileFaceNet在MS1Mv3数据集上训练的人脸特征提取模型 |
+| ResNet50_face  | 512    | 98.12/98.56/99.77             |              |         | 87.2       | 基于ResNet50在MS1Mv3数据集上训练的人脸特征提取模型      |
 
 注:以上精度指标是分别在 AgeDB-30、CFP-FP 和 LFW 数据集上测得的 Accuracy。所有模型 GPU 推理耗时基于 NVIDIA Tesla T4 机器,精度类型为 FP32, CPU 推理速度基于 Intel(R) Xeon(R) Gold 5117 CPU @ 2.00GHz,线程数为8,精度类型为 FP32。
 
@@ -713,9 +713,9 @@ print_r($result["texts"]);
 如果 人脸识别 产线提供的默认模型权重在您的场景中,精度或速度不满意,您可以尝试利用**您自己拥有的特定领域或应用场景的数据**对现有模型进行进一步的**微调**,以提升通用该产线的在您的场景中的识别效果。
 
 ### 4.1 模型微调
-由于人脸识别产线包含两个模块(人脸检测和人脸识别),模型产线的效果不及预期可能来自于其中任何一个模块。
+由于人脸识别产线包含两个模块(人脸检测和人脸特征),模型产线的效果不及预期可能来自于其中任何一个模块。
 
-您可以对识别效果差的图片进行分析,如果在分析过程中发现有较多的人脸未被检测出来,那么可能是人脸检测模型存在不足,您需要参考[人脸检测模块开发教程](../../../module_usage/tutorials/cv_modules/face_detection.md)中的[二次开发](../../../module_usage/tutorials/cv_modules/face_detection.md#四二次开发)章节,使用您的私有数据集对人脸检测模型进行微调;如果在已检测到的人脸出现匹配错误,这表明人脸识别模型需要进一步改进,您需要参考[人脸识别模块开发教程](../../../module_usage/tutorials/cv_modules/face_recognition.md)中的[二次开发](../../../module_usage/tutorials/cv_modules/face_recognition.md#四二次开发)章节,对人脸识别模型进行微调。
+您可以对识别效果差的图片进行分析,如果在分析过程中发现有较多的人脸未被检测出来,那么可能是人脸检测模型存在不足,您需要参考[人脸检测模块开发教程](../../../module_usage/tutorials/cv_modules/face_detection.md)中的[二次开发](../../../module_usage/tutorials/cv_modules/face_detection.md#四二次开发)章节,使用您的私有数据集对人脸检测模型进行微调;如果在已检测到的人脸出现匹配错误,这表明人脸特征模块需要进一步改进,您需要参考[人脸特征模块开发教程](../../../module_usage/tutorials/cv_modules/face_feature.md)中的[二次开发](../../../module_usage/tutorials/cv_modules/face_feature.md#四二次开发)章节,对人脸特征模块进行微调。
 
 ### 4.2 模型应用
 当您使用私有数据集完成微调训练后,可获得本地模型权重文件。
@@ -728,23 +728,22 @@ print_r($result["texts"]);
 Pipeline:
   device: "gpu:0"
   det_model: "BlazeFace"        #可修改为微调后人脸检测模型的本地路径
-  rec_model: "MobileFaceNet"    #可修改为微调后人脸识别模型的本地路径
+  rec_model: "MobileFaceNet"    #可修改为微调后人脸特征模型的本地路径
   det_batch_size: 1
   rec_batch_size: 1
   device: gpu
 ......
 ```
 随后, 参考[2.2 本地体验](#22-本地体验)中的命令行方式或Python脚本方式,加载修改后的产线配置文件即可。
-注:目前暂不支持为人脸检测和人脸识别模型设置单独的batch_size。
+注:目前暂不支持为人脸检测和人脸特征模型设置单独的batch_size。
 
 ##  5. 多硬件支持
 PaddleX 支持英伟达 GPU、昆仑芯 XPU、昇腾 NPU和寒武纪 MLU 等多种主流硬件设备,**仅需修改 `--device`参数**即可完成不同硬件之间的无缝切换。
 
-例如,使用Python运行人脸识别线时,将运行设备从英伟达 GPU 更改为昇腾 NPU,仅需将脚本中的 `device` 修改为 npu 即可:
+例如,使用Python运行人脸识别线时,将运行设备从英伟达 GPU 更改为昇腾 NPU,仅需将脚本中的 `device` 修改为 npu 即可:
 
 ```python
 from paddlex import create_pipeline
-from paddlex import create_pipeline
 
 pipeline = create_pipeline(
     pipeline="face_recognition",

+ 2 - 2
docs/pipeline_usage/tutorials/cv_pipelines/face_recognition_en.md

@@ -9,7 +9,7 @@ The face recognition pipeline is an end-to-end system dedicated to solving face
 
 ![](https://raw.githubusercontent.com/cuicheng01/PaddleX_doc_images/main/images/pipelines/face_recognition/01.png)
 
-**The face recognition pipeline includes a face detection module and a face recognition module**, with several models in each module. Which models to use can be selected based on the benchmark data below. **If you prioritize model accuracy, choose models with higher accuracy; if you prioritize inference speed, choose models with faster inference; if you prioritize model size, choose models with smaller storage requirements**.
+**The face recognition pipeline includes a face detection module and a face feature module**, with several models in each module. Which models to use can be selected based on the benchmark data below. **If you prioritize model accuracy, choose models with higher accuracy; if you prioritize inference speed, choose models with faster inference; if you prioritize model size, choose models with smaller storage requirements**.
 
 <details>
    <summary> 👉Model List Details</summary>
@@ -589,7 +589,7 @@ If the default model weights provided by the Face Recognition Pipeline do not me
 ### 4.1 Model Fine-tuning
 Since the Face Recognition Pipeline consists of two modules (face detection and face recognition), the suboptimal performance of the pipeline may stem from either module.
 
-You can analyze images with poor recognition results. If you find that many faces are not detected during the analysis, it may indicate deficiencies in the face detection model. In this case, you need to refer to the [Custom Development](../../../module_usage/tutorials/cv_modules/face_detection_en.md#IV.-Custom-Development) section in the [Face Detection Module Development Tutorial](../../../module_usage/tutorials/cv_modules/face_detection_en.md) and use your private dataset to fine-tune the face detection model. If matching errors occur in detected faces, it suggests that the face recognition model needs further improvement. You should refer to the [Custom Development](../../../module_usage/tutorials/cv_modules/face_recognition_en.md#IV.-Custom-Development) section in the [Face Recognition Module Development Tutorial](../../../module_usage/tutorials/cv_modules/face_recognition_en.md) to fine-tune the face recognition model.
+You can analyze images with poor recognition results. If you find that many faces are not detected during the analysis, it may indicate deficiencies in the face detection model. In this case, you need to refer to the [Custom Development](../../../module_usage/tutorials/cv_modules/face_detection_en.md#IV.-Custom-Development) section in the [Face Detection Module Development Tutorial](../../../module_usage/tutorials/cv_modules/face_detection_en.md) and use your private dataset to fine-tune the face detection model. If matching errors occur in detected faces, it suggests that the face feature model needs further improvement. You should refer to the [Custom Development](../../../module_usage/tutorials/cv_modules/face_feature_en.md#IV.-Custom-Development) section in the [Face Feature Module Development Tutorial](../../../module_usage/tutorials/cv_modules/face_feature_en.md) to fine-tune the face feature model.
 
 ### 4.2 Model Application
 After completing fine-tuning training with your private dataset, you will obtain local model weight files.

+ 6 - 6
docs/support_list/models_list.md

@@ -132,7 +132,7 @@ PaddleX 内置了多条产线,每条产线都包含了若干模块,每个模
 
 **注:以上精度指标为 PaddleX 内部自建数据集 Top-1 Acc 。**
 
-## [人脸识别模块](../module_usage/tutorials/cv_modules/face_recognition.md)
+## [人脸特征模块](../module_usage/tutorials/cv_modules/face_feature.md)
 | 模型名称        | 输出特征维度 | Acc (%)<br>AgeDB-30/CFP-FP/LFW | GPU推理耗时 (ms) | CPU推理耗时 | 模型存储大小 (M) | yaml 文件            |
 |---------------|--------|-------------------------------|--------------|---------|------------|-------------------------------------|
 | MobileFaceNet | 128    | 96.28/96.71/99.58             |              |         | 4.1        | [MobileFaceNet.yaml](../../paddlex/configs/face_recognition/MobileFaceNet.yaml) |
@@ -216,12 +216,12 @@ PaddleX 内置了多条产线,每条产线都包含了若干模块,每个模
 **注:以上精度指标为 **[PPVehicle](https://github.com/PaddlePaddle/PaddleDetection/tree/develop/configs/ppvehicle)** 验证集 mAP(0.5:0.95)。**
 
 ## [人脸检测模块](../module_usage/tutorials/cv_modules/face_detection.md)
-|模型名称|AP(%<br>Easy/Medium/Hard|GPU推理耗时(ms)|CPU推理耗时(ms)|模型存储大小|yaml 文件|
+|模型名称|AP (%)<br>Easy/Medium/Hard|GPU推理耗时(ms)|CPU推理耗时(ms)|模型存储大小|yaml 文件|
 |-|:-:|-|-|-|-|
-| BlazeFace                | 77.7/73.4/49.5  |              |         | 0.447      | [BlazeFace.yaml](../../paddlex/configs/face_detection/BlazeFace.yaml)|
-| BlazeFace-FPN-SSH        | 83.2/80.5/60.5  |              |         | 0.606      | [BlazeFace-FPN-SSH.yaml](../../paddlex/configs/face_detection/BlazeFace-FPN-SSH.yaml) |
-| PicoDet_LCNet_x2_5_face	 | 93.7/90.7/68.1  |              |         | 28.9       | [PicoDet_LCNet_x2_5_face.yaml](../../paddlex/configs/face_detection/PicoDet_LCNet_x2_5_face.yaml) |
-| PP-YOLOE_plus-S_face     | 93.9/91.8/79.8  |              |         | 26.5       |[PP-YOLOE_plus-S_face](../../paddlex/configs/face_detection/PP-YOLOE_plus-S_face.yaml) |
+| BlazeFace                | 77.7/73.4/49.5  |              |         | 0.447 M     | [BlazeFace.yaml](../../paddlex/configs/face_detection/BlazeFace.yaml)|
+| BlazeFace-FPN-SSH        | 83.2/80.5/60.5  |              |         | 0.606 M     | [BlazeFace-FPN-SSH.yaml](../../paddlex/configs/face_detection/BlazeFace-FPN-SSH.yaml) |
+| PicoDet_LCNet_x2_5_face	 | 93.7/90.7/68.1  |              |         | 28.9 M      | [PicoDet_LCNet_x2_5_face.yaml](../../paddlex/configs/face_detection/PicoDet_LCNet_x2_5_face.yaml) |
+| PP-YOLOE_plus-S_face     | 93.9/91.8/79.8  |              |         | 26.5 M      |[PP-YOLOE_plus-S_face](../../paddlex/configs/face_detection/PP-YOLOE_plus-S_face.yaml) |
 
 **注:以上精度指标是在WIDER-FACE验证集上,以640
 \*640作为输入尺寸评估得到的。**

+ 1 - 1
docs/support_list/models_list_en.md

@@ -133,7 +133,7 @@ PaddleX incorporates multiple pipelines, each containing several modules, and ea
 
 **Note: The above accuracy metrics are Top-1 Acc on PaddleX's internal self-built dataset.**
 
-## [Face Recognition Module](../module_usage/tutorials/cv_modules/face_recognition_en.md)
+## [Face Feature Module](../module_usage/tutorials/cv_modules/face_feature_en.md)
 | Model Name        |Output Feature Dimension| Acc (%)<br>AgeDB-30/CFP-FP/LFW | GPU Inference Time (ms) | CPU Inference Time (ms) | Model Size (M) | YAML File   |
 |---------------|--------|-------------------------------|--------------|---------|------------|-------------------------------------|
 | MobileFaceNet | 128    | 96.28/96.71/99.58             |              |         | 4.1        | [MobileFaceNet.yaml](../../paddlex/configs/face_recognition/MobileFaceNet.yaml) |

+ 1 - 1
paddlex/configs/face_recognition/MobileFaceNet.yaml

@@ -36,6 +36,6 @@ Export:
 Predict:
   batch_size: 1
   model_dir: "output/best_model/inference"
-  input: "https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/face_classification_001.jpg"
+  input: "https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/face_recognition_001.jpg"
   kernel_option:
     run_mode: paddle

+ 1 - 1
paddlex/configs/face_recognition/ResNet50_face.yaml

@@ -36,6 +36,6 @@ Export:
 Predict:
   batch_size: 1
   model_dir: "output/best_model/inference"
-  input: "https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/face_classification_001.jpg"
+  input: "https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/face_recognition_001.jpg"
   kernel_option:
     run_mode: paddle

+ 1 - 1
paddlex/inference/results/__init__.py

@@ -28,4 +28,4 @@ from .warp import DocTrResult
 from .chat_ocr import *
 from .shitu import ShiTuResult
 from .face_rec import FaceRecResult
-from .attribute_rec import AttributeRecResult
+from .attribute_rec import AttributeRecResult

+ 3 - 0
paddlex/repo_apis/PaddleClas_api/configs/MobileFaceNet.yaml

@@ -21,8 +21,11 @@ Global:
   save_inference_dir: ./inference
 
 AMP:
+  use_amp: True
+  use_fp16_test: False
   scale_loss: 27648
   use_dynamic_loss_scaling: True
+  use_promote: False
   # O1: mixed fp16
   level: O1
 

+ 4 - 1
paddlex/repo_apis/PaddleClas_api/configs/ResNet50_face.yaml

@@ -21,8 +21,11 @@ Global:
   save_inference_dir: ./inference
 
 AMP:
-  scale_loss: 27648.0
+  use_amp: True
+  use_fp16_test: False
+  scale_loss: 27648
   use_dynamic_loss_scaling: True
+  use_promote: False
   # O1: mixed fp16
   level: O1