Open letarg0 opened 6 years ago
To train a network with ctc, you need 4 items: (1)training sample which is the input image (2)labels which is the ground truth label sequence (3)label sequence length which is the length of ground truth label sequence (4)input_length which is the width of feature map of the final layer in cnn part
no problem , look this Is possible generate data using this library https://github.com/letarg0/obrazy I can generate data but what format?
for tf backend they are all ndarray. you can generate your own data as long as you have: (1)text images (2)ground truth sequence, then you need to calculate (3)the length of ground truth sequence and (4)the sequence length (namely the length of rnn input sequence). whats more, you may want to ensure (4) >= (3) to satisfy the function mapping of ctc for your data library, i recommend you to combine single characters to form text sequences, you may want to check this out https://github.com/Heisenberg0391/TextImageGenerator
look this https://github.com/letarg0/obrazy/tree/master/letter_images each directory contains image, name directory is the text.
if you want to build a captcha dataset, you have to render a multi-character text image, not a single char image. If you really want to use single char images, you need to (1) load multiple single char images and their class labels according to your target captcha (2) render those characters in a single image (3) build new labels for that image
I have set of images for example https://github.com/aero2a/kape- How creating learning files to solve this captcha?