Skip to content

Commit 2e8632c

Browse files
charl-uleiqing1
andauthored
[Doc]Update README_EN.md (PaddlePaddle#1173)
* 第一次提交 * 补充一处漏翻译 * deleted: docs/en/quantize.md * Update one translation * Update en version * Update one translation in code * Standardize one writing * Standardize one writing * Update some en version * Fix a grammer problem * Update en version for api/vision result * Merge branch 'develop' of https://github.com/charl-u/FastDeploy into develop * Checkout the link in README in vision_results/ to the en documents * Modify a title * Add link to serving/docs/ * Finish translation of demo.md * Update english version of serving/docs/ * Update title of readme * Update some links * Modify a title * Update some links * Update en version of java android README * Modify some titles * Modify some titles * Modify some titles * modify article to document * update some english version of documents in examples * Add english version of documents in examples/visions * Sync to current branch * Add english version of documents in examples * Add english version of documents in examples * Add english version of documents in examples * Update some documents in examples * Update some documents in examples * Update some documents in examples * Update some documents in examples * Update some documents in examples * Update some documents in examples * Update some documents in examples * Update some documents in examples * Update some documents in examples * update README * update Readme.md * update Readme.md * update Readme_en.md * update Readme_en.md * Update README_EN.md * Update README_CN.md * Update README_EN.md * Delete README_new.md * Update README_EN.md * Update README.md * Update rknpu2.md * Update README.md * Update README.md * Create README_CN.md * Update README.md * Update README_CN.md * Update README.md * Update README_EN.md --------- Co-authored-by: leiqing <[email protected]>
1 parent c6cbe9e commit 2e8632c

File tree

11 files changed

+94
-71
lines changed

11 files changed

+94
-71
lines changed

README_EN.md

100755100644
+4-3
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@ Including [image classification](examples/vision/classification), [object detect
5353

5454
## 🌠 Recent updates
5555
- ✨✨✨ In **2023.01.17** we released [**YOLOv8**](./examples/vision/detection/paddledetection/) for deployment on FastDeploy series hardware, which includes [**Paddle YOLOv8**](https://github.com/PaddlePaddle/PaddleYOLO/tree/release/2.5/configs/yolov8) and [**ultralytics YOLOv8**](https://github.com/ultralytics/ultralytics)
56-
- Deployable hardware for [**Paddle YOLOv8**](https://github.com/PaddlePaddle/PaddleYOLO/tree/release/2.5/configs/yolov8)[**Intel CPU**](./examples/vision/detection/paddledetection/python/infer_yolov8.py), [**NVIDIA GPU**](./examples/vision/detection/paddledetection/python/infer_yolov8.py), [**Jetson**](./examples/vision/detection/paddledetection/python/infer_yolov8.py), [**Phytium**](./examples/vision/detection/paddledetection/python/infer_yolov8.py), [**Kunlunxin**](./examples/vision/detection/paddledetection/python/infer_yolov8.py), [**HUAWEI Ascend**](./examples/vision/detection/paddledetection/python/infer_yolov8.py), [**ARM CPU**](./examples/vision/detection/paddledetection/cpp/infer_yolov8.cc),[**RK3588**](./examples/vision/detection/paddledetection/rknpu2) and [**Sophgo TPU**](./examples/vision/detection/paddledetection/sophgo),including **Python** deployments and **C++** deployments.
57-
- Deployable hardware for [**ultralytics YOLOv8**](https://github.com/ultralytics/ultralytics): [**Intel CPU**](./examples/vision/detection/yolov8), [**NVIDIA GPU**](./examples/vision/detection/yolov8), [**Jetson**](./examples/vision/detection/yolov8), both **Python** deployments and **C++** deployments are included
58-
- FastDeploy one-line model API switch, which can achieve **YOLOv8**, **PP-YOLOE+**, **YOLOv5** and other model performance comparison
56+
57+
- You can deploy [**Paddle YOLOv8**](https://github.com/PaddlePaddle/PaddleYOLO/tree/release/2.5/configs/yolov8) on [**Intel CPU**](./examples/vision/detection/paddledetection/python/infer_yolov8.py), [**NVIDIA GPU**](./examples/vision/detection/paddledetection/python/infer_yolov8.py), [**Jetson**](./examples/vision/detection/paddledetection/python/infer_yolov8.py), [**Phytium**](./examples/vision/detection/paddledetection/python/infer_yolov8.py), [**Kunlunxin**](./examples/vision/detection/paddledetection/python/infer_yolov8.py), [**HUAWEI Ascend**](./examples/vision/detection/paddledetection/python/infer_yolov8.py) ,[**ARM CPU**](./examples/vision/detection/paddledetection/cpp/infer_yolov8.cc) [**RK3588**](./examples/vision/detection/paddledetection/rknpu2) and [**Sophgo TPU**](./examples/vision/detection/paddledetection/sophgo). Both **Python** deployments and **C++** deployments are included.
58+
- You can deploy [**ultralytics YOLOv8**](https://github.com/ultralytics/ultralytics) on [**Intel CPU**](./examples/vision/detection/yolov8), [**NVIDIA GPU**](./examples/vision/detection/yolov8), [**Jetson**](./examples/vision/detection/yolov8). Both **Python** deployments and **C++** deployments are included
59+
- Fastdeploy supports quick deployment of multiple models, including **YOLOv8**, **PP-YOLOE+**, **YOLOv5** and other models
5960

6061
- **✨👥✨ Community**
6162

docs/en/build_and_install/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ English | [中文](../../cn/build_and_install/README.md)
1717
- [Build and Install on A311D Platform](a311d.md)
1818
- [Build and Install on KunlunXin XPU Platform](kunlunxin.md)
1919
- [Build and Install on Huawei Ascend Platform](huawei_ascend.md)
20-
20+
- [Build and Install on SOPHGO Platform](sophgo.md.md)
2121

2222
## Build options
2323

docs/en/faq/rknpu2/rknpu2.md

+19-58
Original file line numberDiff line numberDiff line change
@@ -14,61 +14,22 @@ The following tests are at end-to-end speed, and the test environment is as foll
1414
* with single-core NPU
1515

1616

17-
| Mission Scenario | Model | Model Version(tested version) | ARM CPU/RKNN speed(ms) |
18-
|------------------|-------------------|-------------------------------|--------------------|
19-
| Detection | Picodet | Picodet-s | 162/112 |
20-
| Detection | RKYOLOV5 | YOLOV5-S-Relu(int8) | -/57 |
21-
| Detection | RKYOLOX | - | -/- |
22-
| Detection | RKYOLOV7 | - | -/- |
23-
| Segmentation | Unet | Unet-cityscapes | -/- |
24-
| Segmentation | PP-HumanSegV2Lite | portrait | 133/43 |
25-
| Segmentation | PP-HumanSegV2Lite | human | 133/43 |
26-
| Face Detection | SCRFD | SCRFD-2.5G-kps-640 | 108/42 |
27-
28-
29-
## How to use RKNPU2 Backend to Infer Models
30-
31-
We provide an example on Scrfd model here to show how to use RKNPU2 Backend for model inference. The modifications mentioned in the annotations below are in comparison to the ONNX CPU.
32-
33-
```c++
34-
int infer_scrfd_npu() {
35-
char model_path[] = "./model/scrfd_2.5g_bnkps_shape640x640.rknn";
36-
char image_file[] = "./image/test_lite_face_detector_3.jpg";
37-
auto option = fastdeploy::RuntimeOption();
38-
// Modification1: option.UseRKNPU2 function should be called
39-
option.UseRKNPU2();
40-
41-
// Modification2: The parameter 'fastdeploy::ModelFormat::RKNN' should be transferred when loading the model
42-
auto *model = new fastdeploy::vision::facedet::SCRFD(model_path,"",option,fastdeploy::ModelFormat::RKNN);
43-
if (!model->Initialized()) {
44-
std::cerr << "Failed to initialize." << std::endl;
45-
return 0;
46-
}
47-
48-
// Modification3(optional): RKNPU2 supports to normalize using NPU and the input format is nhwc format.
49-
// The action of DisableNormalizeAndPermute will block the nor action and hwc to chw converting action during preprocessing.
50-
// If you use an already supported model list, please call its method before Predict.
51-
model->DisableNormalizeAndPermute();
52-
auto im = cv::imread(image_file);
53-
auto im_bak = im.clone();
54-
fastdeploy::vision::FaceDetectionResult res;
55-
clock_t start = clock();
56-
if (!model->Predict(&im, &res, 0.8, 0.8)) {
57-
std::cerr << "Failed to predict." << std::endl;
58-
return 0;
59-
}
60-
clock_t end = clock();
61-
double dur = (double) (end - start);
62-
printf("infer_scrfd_npu use time:%f\n", (dur / CLOCKS_PER_SEC));
63-
auto vis_im = fastdeploy::vision::Visualize::VisFaceDetection(im_bak, res);
64-
cv::imwrite("scrfd_rknn_vis_result.jpg", vis_im);
65-
std::cout << "Visualized result saved in ./scrfd_rknn_vis_result.jpg" << std::endl;
66-
return 0;
67-
}
68-
```
69-
70-
71-
## Other related Documents
72-
- [How to Build RKNPU2 Deployment Environment](../../build_and_install/rknpu2.md)
73-
- [RKNN-Toolkit2 Installation Document](./install_rknn_toolkit2.md)
74-
- [How to convert ONNX to RKNN](./export.md)
17+
| Mission Scenario | Model | Model Version(tested version) | ARM CPU/RKNN speed(ms) |
18+
|----------------------|------------------------------------------------------------------------------------------|--------------------------|--------------------|
19+
| Detection | [Picodet](../../../../examples/vision/detection/paddledetection/rknpu2/README.md) | Picodet-s | 162/112 |
20+
| Detection | [RKYOLOV5](../../../../examples/vision/detection/rkyolo/README.md) | YOLOV5-S-Relu(int8) | -/57 |
21+
| Detection | [RKYOLOX](../../../../examples/vision/detection/rkyolo/README.md) | - | -/- |
22+
| Detection | [RKYOLOV7](../../../../examples/vision/detection/rkyolo/README.md) | - | -/- |
23+
| Segmentation | [Unet](../../../../examples/vision/segmentation/paddleseg/rknpu2/README.md) | Unet-cityscapes | -/- |
24+
| Segmentation | [PP-HumanSegV2Lite](../../../../examples/vision/segmentation/paddleseg/rknpu2/README.md) | portrait(int8) | 133/43 |
25+
| Segmentation | [PP-HumanSegV2Lite](../../../../examples/vision/segmentation/paddleseg/rknpu2/README.md) | human(int8) | 133/43 |
26+
| Face Detection | [SCRFD](../../../../examples/vision/facedet/scrfd/rknpu2/README.md) | SCRFD-2.5G-kps-640(int8) | 108/42 |
27+
| Face FaceRecognition | [InsightFace](../../../../examples/vision/faceid/insightface/rknpu2/README_CN.md) | ms1mv3_arcface_r18(int8) | 81/12 |
28+
| Classification | [ResNet](../../../../examples/vision/classification/paddleclas/rknpu2/README.md) | ResNet50_vd | -/33 |
29+
30+
## Download Pre-trained library
31+
32+
For convenience, here we provide the 1.0.2 version of FastDeploy.
33+
34+
- [FastDeploy RK356X c++ SDK](https://bj.bcebos.com/fastdeploy/release/cpp/fastdeploy-linux-aarch64-rk356X-1.0.2.tgz)
35+
- [FastDeploy RK3588 c++ SDK](https://bj.bcebos.com/fastdeploy/release/cpp/fastdeploy-linux-aarch64-rk3588-1.0.2.tgz)

examples/vision/detection/yolov6/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ English | [简体中文](README_CN.md)
77

88
- (1)The *.onnx provided by [Official Repository](https://github.com/meituan/YOLOv6/releases/tag/0.1.0) can directly conduct deployemnt;
99
- (2)Personal models trained by developers should export the ONNX model. Refer to [Detailed Deployment Documents](#Detailed-Deployment-Documents) to complete the deployment.
10+
<<<<<<< HEAD
11+
12+
13+
=======
14+
>>>>>>> 30def02a8969f52f40b5e3e305271ef8662126f2
1015
1116
## Download Pre-trained ONNX Model
1217

examples/vision/detection/yolov7end2end_trt/README.md

+5
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ The YOLOv7End2EndTRT deployment is based on [YOLOv7](https://github.com/WongKinY
55

66
- (1)*.pt provided by [Official Repository](https://github.com/WongKinYiu/yolov7/releases/tag/v0.1) should [Export the ONNX Model](#Export-the-ONNX-Model) to complete the deployment. The deployment of *.trt and *.pose models is not supported.
77
- (2)The YOLOv7 model trained by personal data should [Export the ONNX Model](#%E5%AF%BC%E5%87%BAONNX%E6%A8%A1%E5%9E%8B). Please refer to [Detailed Deployment Documents](#Detailed-Deployment-Documents) to complete the deployment.
8+
<<<<<<< HEAD
9+
10+
11+
=======
12+
>>>>>>> 30def02a8969f52f40b5e3e305271ef8662126f2
813
914
## Export the ONNX Model
1015

examples/vision/faceid/insightface/cpp/README.md

+1-3
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ VPL model loading and initialization, among which model_file is the exported ONN
101101
#### Predict function
102102

103103
> ```c++
104-
> ArcFace::Predict(cv::Mat* im, FaceRecognitionResult* result)
104+
> ArcFace::Predict(const cv::Mat& im, FaceRecognitionResult* result)
105105
> ```
106106
>
107107
> Model prediction interface. Input images and output detection results.
@@ -121,8 +121,6 @@ Pre-processing and post-processing parameters can be changed by modifying the me
121121
Revise through InsightFaceRecognitionPreprocessor::SetAlpha(std::vector<float>& alpha)
122122
> > * **beta**(vector&lt;float&gt;): Preprocess normalized beta, and calculated as `x'=x*alpha+beta`. beta defaults to [-1.f, -1.f, -1.f].
123123
Revise through InsightFaceRecognitionPreprocessor::SetBeta(std::vector<float>& beta)
124-
> > * **permute**(bool): Whether to convert BGR to RGB in pre-processing. Default true
125-
Revise through InsightFaceRecognitionPreprocessor::SetPermute(bool permute)
126124
127125
#### InsightFaceRecognitionPostprocessor member variables (post-processing parameters)
128126
> > * **l2_normalize**(bool): Whether to perform l2 normalization before outputting the face vector. Default false.

examples/vision/faceid/insightface/python/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ Member variables of AdaFacePreprocessor are as follows
9999
> > * **size**(list[int]): This parameter changes the size of the resize during preprocessing, containing two integer elements for [width, height] with default value [112, 112]
100100
> > * **alpha**(list[float]): Preprocess normalized alpha, and calculated as `x'=x*alpha+beta`. alpha defaults to [1. / 127.5, 1.f / 127.5, 1. / 127.5]
101101
> > * **beta**(list[float]): Preprocess normalized beta, and calculated as `x'=x*alpha+beta`,beta defaults to [-1.f, -1.f, -1.f]
102-
> > * **swap_rb**(bool): Whether to convert BGR to RGB in pre-processing. Default True
103102
104103
#### Member variables of AdaFacePostprocessor
105104
Member variables of AdaFacePostprocessor are as follows

examples/vision/faceid/insightface/rknpu2/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
[English](README.md) | 简体中文
2-
# InsightFace RKNPU准备部署模型
1+
English | [简体中文](README_CN.md)
2+
# InsightFace RKNPU Deployment Example
33

4-
本教程提供InsightFace模型在RKNPU2环境下的部署,模型的详细介绍已经ONNX模型的下载请查看[模型介绍文档](../README.md)
4+
This document provides the deployment of the InsightFace model in the RKNPU2 environment. For details, please refer to [Model Introduction Document].本教程提供InsightFace模型在RKNPU2环境下的部署,模型的详细介绍已经ONNX模型的下载请查看[模型介绍文档](../README.md)
55

66
## 支持模型列表
77
目前FastDeploy支持如下模型的部署
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
[English](README.md) | 简体中文
2+
# InsightFace RKNPU准备部署模型
3+
4+
本教程提供InsightFace模型在RKNPU2环境下的部署,模型的详细介绍已经ONNX模型的下载请查看[模型介绍文档](../README.md)
5+
6+
## 支持模型列表
7+
目前FastDeploy支持如下模型的部署
8+
- ArcFace
9+
- CosFace
10+
- PartialFC
11+
- VPL
12+
13+
## 下载预训练ONNX模型
14+
15+
为了方便开发者的测试,下面提供了InsightFace导出的各系列模型,开发者可直接下载使用。(下表中模型的精度来源于源官方库)其中精度指标来源于InsightFace中对各模型的介绍,详情各参考InsightFace中的说明
16+
17+
| 模型 | 大小 | 精度 (AgeDB_30) |
18+
|:-------------------------------------------------------------------------------------------|:------|:--------------|
19+
| [CosFace-r18](https://bj.bcebos.com/paddlehub/fastdeploy/glint360k_cosface_r18.onnx) | 92MB | 97.7 |
20+
| [CosFace-r34](https://bj.bcebos.com/paddlehub/fastdeploy/glint360k_cosface_r34.onnx) | 131MB | 98.3 |
21+
| [CosFace-r50](https://bj.bcebos.com/paddlehub/fastdeploy/glint360k_cosface_r50.onnx) | 167MB | 98.3 |
22+
| [CosFace-r100](https://bj.bcebos.com/paddlehub/fastdeploy/glint360k_cosface_r100.onnx) | 249MB | 98.4 |
23+
| [ArcFace-r18](https://bj.bcebos.com/paddlehub/fastdeploy/ms1mv3_arcface_r18.onnx) | 92MB | 97.7 |
24+
| [ArcFace-r34](https://bj.bcebos.com/paddlehub/fastdeploy/ms1mv3_arcface_r34.onnx) | 131MB | 98.1 |
25+
| [ArcFace-r50](https://bj.bcebos.com/paddlehub/fastdeploy/ms1mv3_arcface_r50.onnx) | 167MB | - |
26+
| [ArcFace-r100](https://bj.bcebos.com/paddlehub/fastdeploy/ms1mv3_arcface_r100.onnx) | 249MB | 98.4 |
27+
| [ArcFace-r100_lr0.1](https://bj.bcebos.com/paddlehub/fastdeploy/ms1mv3_r100_lr01.onnx) | 249MB | 98.4 |
28+
| [PartialFC-r34](https://bj.bcebos.com/paddlehub/fastdeploy/partial_fc_glint360k_r50.onnx) | 167MB | - |
29+
| [PartialFC-r50](https://bj.bcebos.com/paddlehub/fastdeploy/partial_fc_glint360k_r100.onnx) | 249MB | - |
30+
31+
32+
## 转换为RKNPU模型
33+
34+
```bash
35+
wget https://bj.bcebos.com/paddlehub/fastdeploy/ms1mv3_arcface_r18.onnx
36+
37+
python -m paddle2onnx.optimize --input_model ./ms1mv3_arcface_r18/ms1mv3_arcface_r18.onnx \
38+
--output_model ./ms1mv3_arcface_r18/ms1mv3_arcface_r18.onnx \
39+
--input_shape_dict "{'data':[1,3,112,112]}"
40+
41+
python /Path/To/FastDeploy/tools/rknpu2/export.py \
42+
--config_path tools/rknpu2/config/arcface_unquantized.yaml \
43+
--target_platform rk3588
44+
```
45+
46+
## 详细部署文档
47+
48+
- [Python部署](python)
49+
- [C++部署](cpp)
50+
51+
52+
## 版本说明
53+
54+
- 本版本文档和代码基于[InsightFace CommitID:babb9a5](https://github.com/deepinsight/insightface/commit/babb9a5) 编写

examples/vision/ocr/PP-OCRv3/python/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ wget https://gitee.com/paddlepaddle/PaddleOCR/raw/release/2.6/ppocr/utils/ppocr_
2626
2727
# Download the example code for deployment
2828
git clone https://github.com/PaddlePaddle/FastDeploy.git
29-
cd examples/vison/ocr/PP-OCRv3/python/
29+
cd examples/vision/ocr/PP-OCRv3/python/
3030
3131
# CPU inference
3232
python infer.py --det_model ch_PP-OCRv3_det_infer --cls_model ch_ppocr_mobile_v2.0_cls_infer --rec_model ch_PP-OCRv3_rec_infer --rec_label_file ppocr_keys_v1.txt --image 12.jpg --device cpu

examples/vision/ocr/PP-OCRv3/python/README_CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ wget https://gitee.com/paddlepaddle/PaddleOCR/raw/release/2.6/ppocr/utils/ppocr_
2626
2727
#下载部署示例代码
2828
git clone https://github.com/PaddlePaddle/FastDeploy.git
29-
cd examples/vison/ocr/PP-OCRv3/python/
29+
cd examples/vision/ocr/PP-OCRv3/python/
3030
3131
# CPU推理
3232
python infer.py --det_model ch_PP-OCRv3_det_infer --cls_model ch_ppocr_mobile_v2.0_cls_infer --rec_model ch_PP-OCRv3_rec_infer --rec_label_file ppocr_keys_v1.txt --image 12.jpg --device cpu

0 commit comments

Comments
 (0)