Object Detection
PaddleOCR
Safetensors
English
Chinese
multilingual
pp_doclayout_v2
PaddlePaddle
ocr
layout
layout_detection
Instructions to use PaddlePaddle/PP-DocLayoutV2_safetensors with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PaddleOCR
How to use PaddlePaddle/PP-DocLayoutV2_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-DocLayoutV2_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
Upload folder using huggingface_hub
Browse files- config.json +2 -4
- model.safetensors +2 -2
config.json
CHANGED
|
@@ -101,7 +101,7 @@
|
|
| 101 |
"torch_dtype": "float32",
|
| 102 |
"use_pretrained_backbone": false,
|
| 103 |
"use_timm_backbone": false,
|
| 104 |
-
"
|
| 105 |
"hidden_size": 512,
|
| 106 |
"num_attention_heads": 8,
|
| 107 |
"attention_probs_dropout_prob": 0.1,
|
|
@@ -116,7 +116,6 @@
|
|
| 116 |
"max_rel_pos": 128,
|
| 117 |
"rel_2d_pos_bins": 64,
|
| 118 |
"max_rel_2d_pos": 256,
|
| 119 |
-
"num_labels": 510,
|
| 120 |
"max_position_embeddings": 514,
|
| 121 |
"max_2d_position_embeddings": 1024,
|
| 122 |
"type_vocab_size": 1,
|
|
@@ -131,8 +130,7 @@
|
|
| 131 |
"rel_bias_embed_dim": 16,
|
| 132 |
"rel_bias_temperature": 10000,
|
| 133 |
"rel_bias_scale": 100,
|
| 134 |
-
"
|
| 135 |
-
"relative_head_size": 64,
|
| 136 |
"tril_mask": true
|
| 137 |
},
|
| 138 |
"threshold_mapping": {
|
|
|
|
| 101 |
"torch_dtype": "float32",
|
| 102 |
"use_pretrained_backbone": false,
|
| 103 |
"use_timm_backbone": false,
|
| 104 |
+
"reading_order_config": {
|
| 105 |
"hidden_size": 512,
|
| 106 |
"num_attention_heads": 8,
|
| 107 |
"attention_probs_dropout_prob": 0.1,
|
|
|
|
| 116 |
"max_rel_pos": 128,
|
| 117 |
"rel_2d_pos_bins": 64,
|
| 118 |
"max_rel_2d_pos": 256,
|
|
|
|
| 119 |
"max_position_embeddings": 514,
|
| 120 |
"max_2d_position_embeddings": 1024,
|
| 121 |
"type_vocab_size": 1,
|
|
|
|
| 130 |
"rel_bias_embed_dim": 16,
|
| 131 |
"rel_bias_temperature": 10000,
|
| 132 |
"rel_bias_scale": 100,
|
| 133 |
+
"global_pointer_head_size": 64,
|
|
|
|
| 134 |
"tril_mask": true
|
| 135 |
},
|
| 136 |
"threshold_mapping": {
|
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e60f3725aeedc88fd319416ef166bda79171a41516a301c27cab9132dc2739d2
|
| 3 |
+
size 214798436
|