mirror of
https://github.com/RapidAI/RapidOCR.git
synced 2026-11-11 13:30:51 +08:00
* chore: add v5 det model path * chore: update files * chore: update files * chore: update files * chore: update files * chore: update files * chore: update files * chore: update files * chore: update files * chore: update files * chore: update files * chore: update files * chore: update files
19 lines
492 B
Python
19 lines
492 B
Python
# -*- encoding: utf-8 -*-
|
|
# @Author: SWHL
|
|
# @Contact: liekkaskono@163.com
|
|
from rapidocr import EngineType, ModelType, OCRVersion, RapidOCR
|
|
|
|
engine = RapidOCR(
|
|
params={
|
|
"Rec.ocr_version": OCRVersion.PPOCRV5,
|
|
"Rec.engine_type": EngineType.PADDLE,
|
|
"Rec.model_type": ModelType.MOBILE,
|
|
}
|
|
)
|
|
|
|
img_url = "https://img1.baidu.com/it/u=3619974146,1266987475&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=516"
|
|
result = engine(img_url)
|
|
print(result)
|
|
|
|
result.vis("vis_result.jpg")
|