A layout block localization model trained on a self-built dataset containing Chinese and English papers, PPT, multi-layout magazines, contracts, books, exams, ancient books and research reports using RT-DETR-L. The layout detection model includes 1 category: Region.
Model
mAP(0.5) (%)
PP-DocBlockLayout
95.9
Note
: the evaluation set of the above precision indicators is the self built version sub area detection data set, including Chinese and English papers, magazines, newspapers, research reports PPT、 1000 document type pictures such as test papers and textbooks.
Model Usage
import requests
from PIL import Image
from transformers import AutoImageProcessor, AutoModelForObjectDetection
model_path = "PaddlePaddle/PP-DocBlockLayout_safetensors"
model = AutoModelForObjectDetection.from_pretrained(model_path)
image_processor = AutoImageProcessor.from_pretrained(model_path)
image = Image.open(requests.get("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/layout.jpg", stream=True).raw)
inputs = image_processor(images=image, return_tensors="pt")
outputs = model(**inputs)
results = image_processor.post_process_object_detection(outputs, target_sizes=[image.size[::-1]])
for result in results:
for score, label_id, box inzip(result["scores"], result["labels"], result["boxes"]):
score, label = score.item(), label_id.item()
box = [round(i, 2) for i in box.tolist()]
print(f"{model.config.id2label[label]}: {score:.2f}{box}")
Runs of PaddlePaddle PP-DocBlockLayout_safetensors on huggingface.co
150
Total runs
0
24-hour runs
0
3-day runs
18
7-day runs
18
30-day runs
More Information About PP-DocBlockLayout_safetensors huggingface.co Model
More PP-DocBlockLayout_safetensors license Visit here:
PP-DocBlockLayout_safetensors huggingface.co is an AI model on huggingface.co that provides PP-DocBlockLayout_safetensors's model effect (), which can be used instantly with this PaddlePaddle PP-DocBlockLayout_safetensors model. huggingface.co supports a free trial of the PP-DocBlockLayout_safetensors model, and also provides paid use of the PP-DocBlockLayout_safetensors. Support call PP-DocBlockLayout_safetensors model through api, including Node.js, Python, http.
PP-DocBlockLayout_safetensors huggingface.co is an online trial and call api platform, which integrates PP-DocBlockLayout_safetensors's modeling effects, including api services, and provides a free online trial of PP-DocBlockLayout_safetensors, you can try PP-DocBlockLayout_safetensors online for free by clicking the link below.
PaddlePaddle PP-DocBlockLayout_safetensors online free url in huggingface.co:
PP-DocBlockLayout_safetensors is an open source model from GitHub that offers a free installation service, and any user can find PP-DocBlockLayout_safetensors on GitHub to install. At the same time, huggingface.co provides the effect of PP-DocBlockLayout_safetensors install, users can directly use PP-DocBlockLayout_safetensors installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
PP-DocBlockLayout_safetensors install url in huggingface.co: