Table of contents
Project directory structure
Link: https://pan.baidu.com/s/1wbZvvonRBL3xy7xO3w57eA
Extraction code: 8888
Open source project link: https://github.com/PaddlePaddle/PaddleOCR/blob/release/2.3/doc/doc_en/recognition_en.md
Dataset preparation
label
路径 识别的内容
img
Of course, the name of your picture should correspond to the content in your label one by one.
parameter modification
The location of the configuration file:
train
If there is no problem with the previous content,
enter in the terminal
python tools/train.py -c configs/rec/rec_icdar15_train.yml
Text recognition is very fast using GPU!
predict
python tools/infer_rec.py -c configs/rec/rec_icdar15_train.yml -o Global.checkpoints=./output/rec_CRNN/best_accuracy Global.infer_img=/home/song/wk_test/home/aistudio/PaddleOCR/iimg/213_3.jpg
checkpoints
The parameters here are the three configuration weight models you loaded. There are three files after paddle training. The best model is loaded here (paddle will automatically load the corresponding model according to the file name you set)
infer_img
The parameter here is the picture you want to predict
Hope this article is useful to you!
Thank you for your likes and comments!