---
title: UVDoc_safetensors
canonical_url: "https://www.modelscope.cn/models/PaddlePaddle/UVDoc_safetensors"
md_url: "https://www.modelscope.cn/models/PaddlePaddle/UVDoc_safetensors.md"
repository: PaddlePaddle/UVDoc_safetensors
last_updated: 2026-04-15
license: apache-2.0
model_type:
  - uvdoc
parameters: 7.9M
tensor_type:
  - F32
  - I64
library_name:
  - transformer
  - safetensors
language:
  - en
  - zh
downloads: 1391
stars: 0
tags:
  - OCR
  - PaddlePaddle
  - PaddleOCR
  - doc_img_unwarping
---

# UVDoc_safetensors

> UVDoc_safetensors - PaddlePaddle 在 ModelScope 开源的模型。The main purpose of text image correction is to carry out geometric transformation on the image to correct the document distortion, inclination, perspective deformation and other problems in the image, so…

PaddlePaddle/UVDoc_safetensors 是 ModelScope 魔搭社区上的 7.9M 参数机器学习模型，采用 apache-2.0 许可。

- **Repository**: PaddlePaddle/UVDoc_safetensors
- **License**: apache-2.0
- **Parameters**: 7.9M
- **Tags**: OCR, PaddlePaddle, PaddleOCR, doc_img_unwarping
- **Downloads**: 1391
- **Stars**: 0
- **Last updated**: 2026-04-15

Source: https://www.modelscope.cn/models/PaddlePaddle/UVDoc_safetensors

---

# UVDoc

## Introduction

The main purpose of text image correction is to carry out geometric transformation on the image to correct the document distortion, inclination, perspective deformation and other problems in the image, so that the subsequent text recognition can be more accurate.

| Model| CER | 
|  --- | --- | 
|UVDoc |  0.179 | 

**Note**: Test data set: docunet benchmark data set.

## Model Usage

```python
import requests
from PIL import Image
from transformers import AutoImageProcessor, AutoModel

model_path = "PaddlePaddle/UVDoc_safetensors"
model = AutoModel.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/doc_test.jpg", stream=True).raw)

inputs = image_processor(images=image, return_tensors="pt").to(model.device)
outputs = model(**inputs)

result = image_processor.post_process_document_rectification(outputs.last_hidden_state, inputs["original_images"])
print(result)
```
