PaddleOCR text recognition tutorial (training your own data set) (1)

Project directory structure

insert image description here
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

        路径         识别的内容

insert image description here

img

insert image description here
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:
insert image description here
insert image description here

Please add a picture description

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!
insert image description here

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

Please add a picture description

checkpointsThe 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_imgThe parameter here is the picture you want to predict

Hope this article is useful to you!
Thank you for your likes and comments!

Guess you like

Origin blog.csdn.net/qq_44936246/article/details/121379009