You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pipeline_usage/tutorials/cv_pipelines/pedestrian_attribute_recognition.en.md
+20-28Lines changed: 20 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -76,7 +76,7 @@ The pre-trained model pipelines provided by PaddleX can quickly demonstrate thei
76
76
Not supported yet.
77
77
78
78
### 2.2 Local Experience
79
-
Before using the pedestrian attribute recognition pipeline locally, ensure you have completed the installation of the PaddleX wheel package following the [PaddleX Local Installation Tutorial](../../../installation/installation.md).
79
+
Before using the pedestrian attribute recognition pipeline locally, ensure you have completed the installation of the PaddleX wheel package following the [PaddleX Local Installation Tutorial](../../../installation/installation.en.md).
80
80
81
81
#### 2.2.1 Command Line Experience
82
82
You can quickly experience the pedestrian attribute recognition pipeline with a single command. Use the [test file](https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/pedestrian_attribute_002.jpg) and replace `--input` with the local path for prediction.
You can choose an appropriate method to deploy your model pipeline based on your needs, and proceed with subsequent AI application integration.
440
440
441
441
442
-
## 4. Custom Development
443
-
If the default model weights provided by the Face Recognition Pipeline do not meet your expectations in terms of accuracy or speed for your specific scenario, you can try to further <b>fine-tune</b> the existing models using <b>your own domain-specific or application-specific data</b> to enhance the recognition performance of the pipeline in your scenario.
444
-
445
442
### 4.1 Model Fine-tuning
446
-
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.
447
-
448
-
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.
443
+
Since the pedestrian attribute recognition pipeline includes both a pedestrian attribute recognition module and a pedestrian detection module, the unexpected performance of the pipeline may stem from either module.
444
+
You can analyze images with poor recognition results. If during the analysis, you find that many main targets are not detected, it may indicate deficiencies in the pedestrian detection model. In this case, you need to refer to the [Secondary Development](../../../module_usage/tutorials/cv_modules/human_detection.en.md#secondary-development) section in the [Human Detection Module Development Tutorial](../../../module_usage/tutorials/cv_modules/human_detection.en.md) and use your private dataset to fine-tune the pedestrian detection model. If the detected main attributes are incorrectly recognized, you need to refer to the [Secondary Development](../../../module_usage/tutorials/cv_modules/pedestrian_attribute_recognition.en.md#secondary-development) section in the [Pedestrian Attribute Recognition Module Development Tutorial](../../../module_usage/tutorials/cv_modules/pedestrian_attribute_recognition.en.md) and use your private dataset to fine-tune the pedestrian attribute recognition model.
449
445
450
446
### 4.2 Model Application
451
-
After completing fine-tuning training with your private dataset, you will obtain local model weight files.
452
-
453
-
To use the fine-tuned model weights, you only need to modify the pipeline configuration file by replacing the local paths of the fine-tuned model weights with the corresponding paths in the pipeline configuration file:
447
+
After fine-tuning training with your private dataset, you will obtain local model weight files.
454
448
455
-
```bash
449
+
If you need to use the fine-tuned model weights, you only need to modify the pipeline configuration file by replacing the local path of the fine-tuned model weights to the corresponding location in the pipeline configuration file:
456
450
451
+
```
457
452
......
458
453
Pipeline:
459
-
device: "gpu:0"
460
-
det_model: "BlazeFace"# Can be modified to the local path of the fine-tuned face detection model
461
-
rec_model: "MobileFaceNet"# Can be modified to the local path of the fine-tuned face recognition model
462
-
det_batch_size: 1
463
-
rec_batch_size: 1
464
-
device: gpu
454
+
det_model: PP-YOLOE-L_human
455
+
cls_model: PP-LCNet_x1_0_pedestrian_attribute # Can be modified to the local path of the fine-tuned model
456
+
device: "gpu"
457
+
batch_size: 1
465
458
......
466
459
```
467
-
Subsequently, refer to the command-line method or Python script method in [2.2 Local Experience](#22-Local-Experience) to load the modified pipeline configuration file.
468
-
Note: Currently, setting separate `batch_size` for face detection and face recognition models is not supported.
460
+
Subsequently, refer to the command-line method or Python script method in the local experience, and load the modified pipeline configuration file.
469
461
470
462
## 5. Multi-hardware Support
471
-
PaddleX supports various mainstream hardware devices such as NVIDIA GPUs, Kunlun XPU, Ascend NPU, and Cambricon MLU. <b>Simply modifying the `--device` parameter</b> allows seamless switching between different hardware.
463
+
PaddleX supports multiple mainstream hardware devices such as NVIDIA GPUs, Kunlun XPU, Ascend NPU, and Cambricon MLU. <b>Simply modifying the `--device` parameter</b> allows seamless switching between different hardware.
472
464
473
-
For example, when running the face recognition pipeline using Python and changing the running device from an NVIDIA GPU to an Ascend NPU, you only need to modify the `device` in the script to `npu`:
465
+
For example, if you use an NVIDIA GPU for inference in the pedestrian attribute recognition pipeline, the command used is:
If you want to use the face recognition pipeline on more types of hardware, please refer to the [PaddleX Multi-device Usage Guide](../../../other_devices_support/multi_devices_use_guide.en.md).
475
+
If you want to use the pedestrian attribute recognition pipeline on more types of hardware, please refer to the [PaddleX Multi-device Usage Guide](../../../other_devices_support/multi_devices_use_guide.en.md).
0 commit comments