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
[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
Copy file name to clipboardexpand all lines: docs/api/vision_results/matting_result_EN.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
English | [中文](matting_result.md)
2
2
3
-
# MattingResult keying results
3
+
# Matting Result
4
4
5
5
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.
|[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 |
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 |
11
11
12
12
After completing the above 3 steps, an external model is integrated.
13
13
14
14
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).
15
15
16
-
## Model Integration
16
+
## Model Integration <spanid="modelsupport"></span>
17
+
18
+
### Prepare the models <spanid="step1"></span>
17
19
18
-
### Prepare the models
19
20
20
21
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.
21
22
@@ -40,7 +41,7 @@ torch.onnx.export(model,
40
41
41
42
Running the above script will generate a`resnet50.onnx` file.
42
43
43
-
### C++
44
+
### C++ <spanid="step2"></span>
44
45
45
46
* Create`resnet.h` file
46
47
* Create a path
@@ -64,7 +65,7 @@ class FASTDEPLOY_DECL ResNet : public FastDeployModel {
64
65
* Create a path
65
66
* FastDeploy/fastdeploy/vision/classification/contrib/resnet.cc (FastDeploy/C++ code/vision/task name/external model name/model name.cc)
66
67
* 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).
* 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
244
245
245
246
### Annotate the Code
246
247
@@ -249,7 +250,7 @@ make
249
250
To make the code clear for understanding, developers can annotate the newly-added code.
250
251
251
252
- 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.
253
254
254
255
```C++
255
256
/** \brief Predict for the input "im", the result will be saved in "result".
Copy file name to clipboardexpand all lines: docs/en/faq/use_sdk_on_windows.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -92,7 +92,7 @@ In particular, for the configuration method of the dependency library required b
92
92
93
93
### 3.2 SDK usage method 2: Visual Studio 2019 creates sln project using C++ SDK
94
94
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).
96
96
97
97
<divid="VisualStudio2019Sln"></div>
98
98
@@ -192,7 +192,7 @@ Compile successfully, you can see the exe saved in:
(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).
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).
335
335
336
336
## 4. Multiple methods to Configure the Required Dependencies for the Exe Runtime
0 commit comments