From 238cc51049ed56f4c2cab0de6872b2e9eab9d472 Mon Sep 17 00:00:00 2001 From: satori Date: Mon, 22 Jan 2024 12:29:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20main.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 main.py diff --git a/main.py b/main.py new file mode 100644 index 0000000..acf4256 --- /dev/null +++ b/main.py @@ -0,0 +1,15 @@ +import io +from PIL import Image, ImageFile +from paddleocr import PaddleOCR + + +# 加载模型 (en ch japan korean ru) +print(f'开始加载模型...') +CH = PaddleOCR(use_angle_cls=True, lang="ch") + +print(f'开始加载图像...') +image = Image.open() + +print(f'开始提取文字...') +ch = CH.ocr(image, cls=True)[0] +print(ch)