Instructions to use PaddlePaddle/PP-DocBlockLayout_safetensors with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PaddleOCR
How to use PaddlePaddle/PP-DocBlockLayout_safetensors with PaddleOCR:
# 1. See https://www.paddlepaddle.org.cn/en/install to install paddlepaddle # 2. pip install paddleocr from paddleocr import LayoutDetection model = LayoutDetection(model_name="PP-DocBlockLayout_safetensors") output = model.predict(input="path/to/image.png", batch_size=1) for res in output: res.print() res.save_to_img(save_path="./output/") res.save_to_json(save_path="./output/res.json") - Notebooks
- Google Colab
- Kaggle
Fix resample to BICUBIC (3) to match PaddleX preprocessing
Browse files- preprocessor_config.json +1 -1
preprocessor_config.json
CHANGED
|
@@ -28,7 +28,7 @@
|
|
| 28 |
1
|
| 29 |
],
|
| 30 |
"rescale_factor": 0.00392156862745098,
|
| 31 |
-
"resample":
|
| 32 |
"size": {
|
| 33 |
"height": 640,
|
| 34 |
"width": 640
|
|
|
|
| 28 |
1
|
| 29 |
],
|
| 30 |
"rescale_factor": 0.00392156862745098,
|
| 31 |
+
"resample": 3,
|
| 32 |
"size": {
|
| 33 |
"height": 640,
|
| 34 |
"width": 640
|