Skip to content

Commit b7d2c0d

Browse files
authored
[Doc] Add English version of serving/ and java/andriod/. (#963)
* 第一次提交 * 补充一处漏翻译 * 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
1 parent 1e36856 commit b7d2c0d

18 files changed

+1615
-367
lines changed

docs/README.md

-1
This file was deleted.

docs/README.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
[简体中文](README_CN.md)| English
2+
3+
# Tutorials
4+
5+
## Install
6+
7+
- [Install FastDeploy Prebuilt Libraries](en/build_and_install/download_prebuilt_libraries.md)
8+
- [Build and Install FastDeploy Library on GPU Platform](en/build_and_install/gpu.md)
9+
- [Build and Install FastDeploy Library on CPU Platform](en/build_and_install/cpu.md)
10+
- [Build and Install FastDeploy Library on IPU Platform](en/build_and_install/ipu.md)
11+
- [Build and Install FastDeploy Library on KunlunXin XPU Platform](en/build_and_install/xpu.md)
12+
- [Build and Install on RV1126 Platform](en/build_and_install/rv1126.md)
13+
- [Build and Install on RK3588 Platform](en/build_and_install/rknpu2.md)
14+
- [Build and Install on A311D Platform](en/build_and_install/a311d.md)
15+
- [Build and Install FastDeploy Library on Nvidia Jetson Platform](en/build_and_install/jetson.md)
16+
- [Build and Install FastDeploy Library on Android Platform](en/build_and_install/android.md)
17+
- [Build and Install FastDeploy Serving Deployment Image](../serving/docs/EN/compile-en.md)
18+
19+
## A Quick Start - Demos
20+
21+
- [Python Deployment Demo](en/quick_start/models/python.md)
22+
- [C++ Deployment Demo](en/quick_start/models/cpp.md)
23+
- [A Quick Start on Runtime Python](en/quick_start/runtime/python.md)
24+
- [A Quick Start on Runtime C++](en/quick_start/runtime/cpp.md)
25+
26+
## API
27+
28+
- [Python API](https://baidu-paddle.github.io/fastdeploy-api/python/html/)
29+
- [C++ API](https://baidu-paddle.github.io/fastdeploy-api/cpp/html/)
30+
- [Android Java API](../java/android)
31+
32+
## Performance Optimization
33+
34+
- [Quantization Acceleration](en/quantize.md)
35+
36+
## Frequent Q&As
37+
38+
- [1. How to Change Inference Backends](en/faq/how_to_change_backend.md)
39+
- [2. How to Use FastDeploy C++ SDK on Windows Platform](en/faq/use_sdk_on_windows.md)
40+
- [3. How to Use FastDeploy C++ SDK on Android Platform](en/faq/use_cpp_sdk_on_android.md)
41+
- [4. Tricks of TensorRT](en/faq/tensorrt_tricks.md)
42+
- [5. How to Develop a New Model](en/faq/develop_a_new_model.md)
43+
44+
## More FastDeploy Deployment Module
45+
46+
- [Deployment AI Model as a Service](../serving)
47+
- [Benchmark Testing](../benchmark)

docs/README_CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[English](README_EN.md) | 简体中文
1+
[English](README.md) | 简体中文
22

33
# 使用文档
44

docs/README_EN.md

-47
This file was deleted.
File renamed without changes.

docs/api/vision_results/README_CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[English](README_EN.md)| 简体中文
1+
[English](README.md)| 简体中文
22
# 视觉模型预测结果说明
33

44
FastDeploy根据视觉模型的任务类型,定义了不同的结构体(`fastdeploy/vision/common/result.h`)来表达模型预测结果,具体如下表所示

docs/api/vision_results/matting_result_EN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
English | [中文](matting_result.md)
22

3-
# MattingResult keying results
3+
# Matting Result
44

55
The MattingResult code is defined in `fastdeploy/vision/common/result.h`, and is used to indicate the predicted value of alpha transparency predicted and the predicted foreground, etc.
66

docs/en/faq/develop_a_new_model.md

+16-15
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@ English | [中文](../../cn/faq/develop_a_new_model.md)
55

66
| Step | Description | Create or modify the files |
77
|:-----------:|:--------------------------------------------------------------------------------:|:-----------------------------------------:|
8-
| [1](#step2) | Add a model implementation to the corresponding task module in FastDeploy/vision | resnet.hresnet.ccvision.h |
9-
| [2](#step4) | Python interface binding via pybind | resnet_pybind.ccclassification_pybind.cc |
10-
| [3](#step5) | Use Python to call Interface | resnet.py\_\_init\_\_.py |
8+
| [1](#step2) | Add a model implementation to the corresponding task module in FastDeploy/vision | resnet.h, resnet.cc, vision.h |
9+
| [2](#step4) | Python interface binding via pybind | resnet_pybind.cc, classification_pybind.cc |
10+
| [3](#step5) | Use Python to call Interface | resnet.py, \_\_init\_\_.py |
1111

1212
After completing the above 3 steps, an external model is integrated.
1313

1414
If you want to contribute your code to FastDeploy, it is very kind of you to add test code, instructions (Readme), and code annotations for the added model in the [test](#test).
1515

16-
## Model Integration
16+
## Model Integration <span id="modelsupport"></span>
17+
18+
### Prepare the models <span id="step1"></span>
1719

18-
### Prepare the models
1920

2021
Before integrating external models, it is important to convert the trained models (.pt, .pdparams, etc.) to the model formats (.onnx, .pdmodel) that FastDeploy supports for deployment. Most open source repositories provide model conversion scripts for developers. As torchvision does not provide conversion scripts, developers can write conversion scripts manually. In this demo, we convert `torchvison.models.resnet50` to `resnet50.onnx` with the following code for your reference.
2122

@@ -40,7 +41,7 @@ torch.onnx.export(model,
4041

4142
Running the above script will generate a`resnet50.onnx` file.
4243

43-
### C++
44+
### C++ <span id="step2"></span>
4445

4546
* Create`resnet.h` file
4647
* Create a path
@@ -64,7 +65,7 @@ class FASTDEPLOY_DECL ResNet : public FastDeployModel {
6465
* Create a path
6566
* FastDeploy/fastdeploy/vision/classification/contrib/resnet.cc (FastDeploy/C++ code/vision/task name/external model name/model name.cc)
6667
* Create content
67-
* Implement the specific logic of the functions declared in `resnet.h` to `resnet.cc`, where `PreProcess` and `PostProcess` need to refer to the official source library for pre- and post-processing logic reproduction. The specific logic of each ResNet function is as follows. For more detailed code, please refer to [resnet.cc](https:// github.com/PaddlePaddle/FastDeploy/pull/347/files#diff-d229d702de28345253a53f2a5839fd2c638f3d32fffa6a7d04d23db9da13a871).
68+
* Implement the specific logic of the functions declared in `resnet.h` to `resnet.cc`, where `PreProcess` and `PostProcess` need to refer to the official source library for pre- and post-processing logic reproduction. The specific logic of each ResNet function is as follows. For more detailed code, please refer to [resnet.cc](https://github.com/PaddlePaddle/FastDeploy/pull/347/files#diff-d229d702de28345253a53f2a5839fd2c638f3d32fffa6a7d04d23db9da13a871).
6869
6970
```C++
7071
ResNet::ResNet(...) {
@@ -93,7 +94,7 @@ bool ResNet::Predict(cv::Mat* im, ClassifyResult* result, int topk) {
9394
return true;
9495
}
9596
```
96-
97+
<span id="step3"></span>
9798
* Add new model file to`vision.h`
9899
* modify location
99100
* FastDeploy/fastdeploy/vision.h
@@ -105,7 +106,7 @@ bool ResNet::Predict(cv::Mat* im, ClassifyResult* result, int topk) {
105106
#endif
106107
```
107108

108-
### Pybind
109+
### Pybind <span id="step4"></span>
109110

110111
* Create Pybind file
111112

@@ -146,7 +147,7 @@ bool ResNet::Predict(cv::Mat* im, ClassifyResult* result, int topk) {
146147
}
147148
```
148149

149-
### Python
150+
### Python <span id="step5"></span>
150151

151152
* Create`resnet.py`file
152153
* Create path
@@ -167,7 +168,7 @@ class ResNet(FastDeployModel):
167168
def size(self, wh):
168169
...
169170
```
170-
171+
<span id="step6"></span>
171172
* Import ResNet classes
172173
* modify path
173174
* FastDeploy/python/fastdeploy/vision/classification/\_\_init\_\_.py (FastDeploy/Python code/fastdeploy/vision model/task name/\_\_init\_\_.py)
@@ -177,7 +178,7 @@ class ResNet(FastDeployModel):
177178
from .contrib.resnet import ResNet
178179
```
179180

180-
## Test
181+
## Test <span id="test"></span>
181182

182183
### Compile
183184

@@ -229,7 +230,7 @@ pip install fastdeploy_gpu_python-Version number-cpxx-cpxxm-system architecture.
229230
```
230231

231232
* C++
232-
* Write CmakeLists、C++ code and README.md . Please refer to[cpp/](https://github.com/PaddlePaddle/FastDeploy/pull/347/files#diff-afcbe607b796509581f89e38b84190717f1eeda2df0419a2ac9034197ead5f96)
233+
* Write CmakeLists、C++ code and README.md . Please refer to [cpp/](https://github.com/PaddlePaddle/FastDeploy/pull/347/files#diff-afcbe607b796509581f89e38b84190717f1eeda2df0419a2ac9034197ead5f96)
233234
* Compile infer.cc
234235
* Path:FastDeploy/examples/vision/classification/resnet/cpp/
235236

@@ -240,7 +241,7 @@ make
240241
```
241242

242243
* Python
243-
* Please refer to[python/](https://github.com/PaddlePaddle/FastDeploy/pull/347/files#diff-5a0d6be8c603a8b81454ac14c17fb93555288d9adf92bbe40454449309700135) for Python code and Readme.md
244+
* Please refer to [python/](https://github.com/PaddlePaddle/FastDeploy/pull/347/files#diff-5a0d6be8c603a8b81454ac14c17fb93555288d9adf92bbe40454449309700135) for Python code and Readme.md
244245

245246
### Annotate the Code
246247

@@ -249,7 +250,7 @@ make
249250
To make the code clear for understanding, developers can annotate the newly-added code.
250251

251252
- C++ code
252-
Developers need to add annotations for functions and variables in the resnet.h file, there are three annotating methods as follows, please refer to [resnet.h](https://github.com/PaddlePaddle/FastDeploy/pull/347/files#diff- 69128489e918f305c208476ba793d8167e77de2aa7cadf5dcbac30da448bd28e) for more details.
253+
Developers need to add annotations for functions and variables in the resnet.h file, there are three annotating methods as follows, please refer to [resnet.h](https://github.com/PaddlePaddle/FastDeploy/pull/347/files#diff-69128489e918f305c208476ba793d8167e77de2aa7cadf5dcbac30da448bd28e) for more details.
253254

254255
```C++
255256
/** \brief Predict for the input "im", the result will be saved in "result".

docs/en/faq/use_sdk_on_windows.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ In particular, for the configuration method of the dependency library required b
9292

9393
### 3.2 SDK usage method 2: Visual Studio 2019 creates sln project using C++ SDK
9494

95-
This section is for non-CMake users and describes how to create a sln project in Visual Studio 2019 to use FastDeploy C++ SDK. CMake users please read the next section directly. In addition, this section is a special thanks to "Awake to the Southern Sky" for his tutorial on FastDeploy: [How to deploy PaddleDetection target detection model on Windows using FastDeploy C++].(https://www.bilibili.com/read/cv18807232)
95+
This section is for non-CMake users and describes how to create a sln project in Visual Studio 2019 to use FastDeploy C++ SDK. CMake users please read the next section directly. In addition, this section is a special thanks to "Awake to the Southern Sky" for his tutorial on FastDeploy: [How to deploy PaddleDetection target detection model on Windows using FastDeploy C++](https://www.bilibili.com/read/cv18807232).
9696

9797
<div id="VisualStudio2019Sln"></div>
9898

@@ -192,7 +192,7 @@ Compile successfully, you can see the exe saved in:
192192
D:\qiuyanjun\fastdeploy_test\infer_ppyoloe\x64\Release\infer_ppyoloe.exe
193193
```
194194

195-
(2)Execute the executable file and get the inference result. First you need to copy all the dlls to the directory where the exe is located. At the same time, you also need to download and extract the pyoloe model files and test images, and then copy them to the directory where the exe is located. Special note, the exe needs to run when the dependency library configuration method, please refer to the section: [various methods to configure the exe to run the required dependency library](#CommandLineDeps)
195+
(2)Execute the executable file and get the inference result. First you need to copy all the dlls to the directory where the exe is located. At the same time, you also need to download and extract the pyoloe model files and test images, and then copy them to the directory where the exe is located. Special note, the exe needs to run when the dependency library configuration method, please refer to the section: [various methods to configure the exe to run the required dependency library](#CommandLineDeps).
196196

197197
![image](https://user-images.githubusercontent.com/31974251/192829545-3ea36bfc-9a54-492b-984b-2d5d39094d47.png)
198198

@@ -331,7 +331,7 @@ Open the saved image to view the visualization results at:
331331
<img src="https://user-images.githubusercontent.com/19339784/184326520-7075e907-10ed-4fad-93f8-52d0e35d4964.jpg", width=480px, height=320px />
332332
</div>
333333

334-
Special note, the exe needs to run when the dependency library configuration method, please refer to the section: [a variety of methods to configure the exe to run the required dependency library](#CommandLineDeps)
334+
Special note, the exe needs to run when the dependency library configuration method, please refer to the section: [a variety of methods to configure the exe to run the required dependency library](#CommandLineDeps).
335335

336336
## 4. Multiple methods to Configure the Required Dependencies for the Exe Runtime
337337
<div id="CommandLineDeps"></div>

0 commit comments

Comments
 (0)