CTPN_CRNN_ChineseOCR_PyQt5
CTPN_CRNN_ChineseOCR_PyQt5 copied to clipboard
CTPN and CRNN based Chinese OCR, developed with PyQt5
CTPN_CRNN_ChineseOCR_PyQt5
CTPN and CRNN based Chinese OCR, developed with PyQt5
Examples
- Hello guys, hope you are doing fine these days !๐
- In this repositories, i created a PyQt5 Application to do some Chinese OCR job which is based on CTPN and CRNN
- Here is the result, hope you enjoy it
- However, the CRNN model doesn't work well(Terrible at some situation๐ฅ). You will find it out when you try
Requirements
- PyQt5
- torch
- torchvision
How to use it
- I'm sorry guys, i haven't find a way to deploy it, and you have to run it in your compiler ๐โโ๏ธ(VScode, pycharm or...)
Build Environment
cd CTPN_lib/bbox
python setup.py build
- a file named build will be generated, put
bbox.cp37-win_amd64.pydandnms.cp37-win_amd64.pydCTPN_lib/bbox
download pretrained weights
- The weights are larger than the uploading limit(25M below๐ ). Download them using BaiduYun
- Put them in CTPN_weights CTPN weights(ๆๅ็ :r88t)
- Put them in CRNN_weights CRNN weights(ๆๅ็ :tnts)
Choose which model to use
- In
inferrence.py, from line 27 to line 32 argument: crnn_weights: the file location of crnn weigth downloaded in the previous stepargument: ctpn_basemodel:choose a ctpb backbone: vgg16, resnet50, shufflenet_v2_x1_0, mobilenet_v3_large, mobilenet_v3_smallargument: ctpn_weights:corresponding ctpn weights with ctpn_base model downloaded in the previous step
Run main_gui.py
- if you run the .py file succesfully, it should look like this
- Then, you need to push the initialize button to load the model, after that, just wait the
Finishedsign appers in the right. - Finally, load the image with
Load Imagebutton and pressDetect
For more issue, contact me
Email Address[email protected]