CRAFT: text detection + TPS-ResNet-BiLSTM-Attn: text recognition
This repo combines two methods which are most popular and having best performace to meet my demand in Scene-OCR. I have modified two forked repos and rewrite a Flask service for local users to use detection, recognition and OCR conveniently.
- Install all dependency. If there are still some missing packages, you can check original forked repos.
pip install -r requirements.txt
- It is better to run app under GPU.
CUDA_VISIBLE_DEVICES=0 python app.py
- Try it by yourself. You can send
POST
requests tohttp://localhost:8301/ocr
with your image absolute path. See more details intest_app.py
.
This part is forked by clovaai/CRAFT-pyotrch.
Loaded model is models/craft_mlt_25k.pth
. You can download it from here.
This part is forked by clovaai/deep-text-recognition-benchmark
Loaded model is models/TPS-ResNet-BiLSTM-Attn.pth
. You can download it from here
The link for both models are supported by original repos. If there are any issues, you could post issues in there.