crnn icon indicating copy to clipboard operation
crnn copied to clipboard

how prepare my images?

Open letarg0 opened this issue 6 years ago • 5 comments

I have set of images for example https://github.com/aero2a/kape- How creating learning files to solve this captcha?

letarg0 avatar Apr 16 '18 17:04 letarg0

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

Heisenberg0391 avatar Jan 15 '19 04:01 Heisenberg0391

no problem , look this Is possible generate data using this library https://github.com/letarg0/obrazy I can generate data but what format?

letarg0 avatar Jan 24 '19 13:01 letarg0

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

Heisenberg0391 avatar Jan 25 '19 02:01 Heisenberg0391

look this https://github.com/letarg0/obrazy/tree/master/letter_images each directory contains image, name directory is the text.

letarg0 avatar Jan 27 '19 14:01 letarg0

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

Heisenberg0391 avatar Jan 28 '19 02:01 Heisenberg0391