yhq 7ffff511a5 | 1 year ago | |
---|---|---|
.. | ||
detection | 1 year ago | |
direction | 1 year ago | |
recognition | 1 year ago | |
README.md | 1 year ago |
We convert PaddleOCRv3 models to pytorch style, and provide end2end interface to recognize text in images, by simplely load exported models.
We test on icdar2015 dataset.
Algorithm | backbone | configs | precison | recall | Hmean | Download |
---|---|---|---|---|---|---|
DB | MobileNetv3 | det_model_en.py | 0.7803 | 0.7250 | 0.7516 | log-model |
DB | R50 | det_model_en_r50.py | 0.8622 | 0.8218 | 0.8415 | log-model |
We test on on DTRB dataset.
Algorithm | backbone | configs | acc | Download |
---|---|---|---|---|
SVTR | MobileNetv1 | rec_model_en.py | 0.7536 | log-model |
We provide exported models contain weights and process config for easyly predict, which convert from PaddleOCRv3.
language | Download |
---|---|
chinese | chinese_det.pth |
english | english_det.pth |
multilingual | multilingual_det.pth |
language | Download |
---|---|
chinese | chinese_rec.pth |
english | english_rec.pth |
korean | korean_rec.pth |
japan | japan_rec.pth |
chinese_cht | chinese_cht_rec.pth |
Telugu | te_rec.pth |
Canada | ka_rec.pth |
Tamil | ta_rec.pth |
latin | latin_rec.pth |
cyrillic | cyrillic_rec.pth |
devanagari | devanagari_rec.pth |
language | Download |
---|---|
direction.pth |
import cv2
from easycv.predictors.ocr import OCRDetPredictor
predictor = OCRDetPredictor(model_path)
out = predictor([img_path]) # out = predictor([img])
img = cv2.imread(img_path)
out_img = predictor.show_result(out[0], img)
cv2.imwrite(out_img_path,out_img)
import cv2
from easycv.predictors.ocr import OCRRecPredictor
predictor = OCRRecPredictor(model_path)
out = predictor([img_path])
print(out)
import cv2
from easycv.predictors.ocr import OCRPredictor
! wget http://pai-vision-data-hz.oss-cn-zhangjiakou.aliyuncs.com/EasyCV/modelzoo/ocr/simfang.ttf
! wget http://pai-vision-data-hz.oss-cn-zhangjiakou.aliyuncs.com/EasyCV/modelzoo/ocr/ocr_det.jpg
predictor = OCRPredictor(
det_model_path=path_to_detmodel,
rec_model_path=path_to_recmodel,
cls_model_path=path_to_clsmodel,
use_angle_cls=True)
out = predictor(img_path)
img = cv2.imread('ocr_det.jpg')
out_img = predictor.show(
out[0]['boxes'],
out[0]['rec_res'],
img,
font_path='simfang.ttf')
cv2.imwrite('out_img.jpg', out_img)
No Description
Python Markdown other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》