CoolFace
Modelpublic

PaddlePaddle/PP-OCRv5_server_det_safetensors

sourceHugging Faceapache-2.0updated 6mo agoView on Hugging Face
4likes569downloads
Model Card

PP-OCRv5serverdet

Introduction

PP-OCRv5serverdet is one of the PP-OCRv5_det series, the latest generation of text detection models developed by the PaddleOCR team. Designed for high-performance applications, it supports the detection of text in diverse scenarios—including handwriting, vertical, rotated, and curved text—across multiple languages such as Simplified Chinese, Traditional Chinese, English, and Japanese. Key features include robust handling of complex layouts, varying text sizes, and challenging backgrounds, making it suitable for practical applications like document analysis, license plate recognition, and scene text detection. The key accuracy metrics are as follow:

Handwritten ChineseHandwritten EnglishPrinted ChinesePrinted EnglishTraditional ChineseAncient TextJapaneseGeneral ScenarioPinyinRotationDistortionArtistic TextAverage
0.8030.8410.9450.9170.8150.6760.7720.7970.6710.80.8760.6730.827

Model Usage

python
import requests
from PIL import Image
from transformers import AutoImageProcessor, AutoModelForObjectDetection

model_path = "PaddlePaddle/PP-OCRV5_server_det_safetensors"
model = AutoModelForObjectDetection.from_pretrained(
    model_path,
    device_map="auto"
)
image_processor = AutoImageProcessor.from_pretrained(model_path)

image = Image.open(requests.get("https://paddle-model-ecology.bj.bcebos.com/paddlex/imgs/demo_image/general_ocr_001.png", stream=True).raw).convert("RGB")
inputs = image_processor(images=image, return_tensors="pt").to(model.device)
outputs = model(**inputs)

results = image_processor.post_process_object_detection(outputs, target_sizes=inputs["target_sizes"])

for result in results:
    print(result)