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/other_devices_support/multi_devices_use_guide.en.md
+36-1Lines changed: 36 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -166,4 +166,39 @@ All packages are installed.
166
166
167
167
## 2. Usage
168
168
169
-
The usage of PaddleX model pipeline development tool on hardware platforms such as Ascend NPU, Cambricon MLU, Kunlun XPU, Hygon DCU and Enflame GCU is identical to that on GPU. You only need to modify the device configuration parameters according to your hardware platform. For detailed usage tutorials, please refer to [PaddleX Pipeline Development Tool Local Usage Guide](../pipeline_usage/pipeline_develop_guide.en.md).
169
+
The usage of PaddleX model pipeline development tool on hardware platforms such as Ascend NPU, Cambricon MLU, Kunlun XPU, Hygon DCU and Enflame GCU is identical to that on GPU. You only need to modify the device configuration parameters according to your hardware platform.
170
+
Taking the general OCR pipeline as an example to introduce the pipeline development tools.The General OCR Pipeline is designed to solve text recognition tasks, extracting text information from images and outputting it in text form. PP-OCRv4 is an end-to-end OCR system that achieves millisecond-level text content prediction on CPUs, reaching state-of-the-art (SOTA) performance in open-source projects for general scenarios.You can directly use the pre-trained models provided by OCR pipeline for inference.
171
+
* Command line
172
+
173
+
```bash
174
+
paddlex --pipeline OCR --input general_ocr_002.png --device npu:0 # change the device name to npu, mlu, xpu, dcu or gcu
175
+
```
176
+
* Python Script
177
+
178
+
```python
179
+
from paddlex import create_pipeline
180
+
181
+
pipeline = create_pipeline(pipeline="OCR", device="npu:0") # change the device name to npu, mlu, xpu, dcu or gcu
182
+
183
+
output = pipeline.predict("general_ocr_002.png")
184
+
for res in output:
185
+
res.print()
186
+
res.save_to_img("./output/")
187
+
```
188
+
If you are not satisfied with the performance of the pre-trained model, you can fine-tune it. For example, let's discuss single model development using the PP-OCRv4 mobile text detection model (PP-OCRv4_mobile_det).
-o Global.device=npu # change the device name to npu, mlu, xpu, dcu or gcu
203
+
```
204
+
For more detailed usage tutorials, please refer to [PaddleX Pipeline Development Tool Local Usage Guide](../pipeline_usage/pipeline_develop_guide.en.md).
0 commit comments