合并
This commit is contained in:
parent
238cc51049
commit
ee0fb52fb3
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
venv
|
11
main.py
11
main.py
@ -1,15 +1,14 @@
|
|||||||
import io
|
from PIL import Image
|
||||||
from PIL import Image, ImageFile
|
|
||||||
from paddleocr import PaddleOCR
|
from paddleocr import PaddleOCR
|
||||||
|
|
||||||
|
|
||||||
# 加载模型 (en ch japan korean ru)
|
# 加载模型 (en ch japan korean ru)
|
||||||
print(f'开始加载模型...')
|
print(f'开始加载模型...')
|
||||||
CH = PaddleOCR(use_angle_cls=True, lang="ch")
|
CH = PaddleOCR(use_angle_cls=True, lang="ch")
|
||||||
|
|
||||||
|
# 加载图像
|
||||||
print(f'开始加载图像...')
|
print(f'开始加载图像...')
|
||||||
image = Image.open()
|
image = Image.open('./test.jpg')
|
||||||
|
|
||||||
print(f'开始提取文字...')
|
print(f'开始提取文字...')
|
||||||
ch = CH.ocr(image, cls=True)[0]
|
data = CH.ocr(image, cls=True)[0]
|
||||||
print(ch)
|
print(data)
|
||||||
|
7
main.sh
Executable file
7
main.sh
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
python3 -m venv venv
|
||||||
|
source venv/bin/activate
|
||||||
|
|
||||||
|
pip install --upgrade pip
|
||||||
|
pip install -r requirements.txt
|
||||||
|
|
||||||
|
python3 main.py
|
@ -1,5 +1,3 @@
|
|||||||
whell==0.42.0
|
|
||||||
numpy==1.26.2
|
|
||||||
Pillow==10.1.0
|
|
||||||
paddleocr==2.7.0.3
|
paddleocr==2.7.0.3
|
||||||
paddleocr.egg==info
|
paddlepaddle==2.6.0
|
||||||
|
Pillow==10.1.0
|
Loading…
Reference in New Issue
Block a user