Closed qnkhuat closed 6 years ago
Hi,
the format of the groundtruth adheres nearly always to the following structure:
csv
file using tabs as separator (so actually a tsv
file)3 4
<path to image> 7 5 10 10 2 10 10 10 10 10 10 10
7 5 10 10
this label contains the number as such (75) and also two blank labels telling the network to predict the no character class after the 75. The same is true for the second line. The third line is completely empty. So the network will learn to predict no character for this line.The method/version you should choose depends on the way your images look like. Are the text lines already cropped from an image? (you should use text recognition) Is it an unprocessed input image with some text lines? You should have a look at FSNS/SVHN and try to work with that code, adepting it to your usecase. Each method actually uses the same network architecture in the background. The main differences are the Sizes of the filters and the preprocessing that needs to be done.
To be sure: my data is cropped images. and it usually has 17 chars. ex 1 image has a text : vn324kl21lsfda so my gt file is. 3 17
You are nearly right. For the text recognition model it needs to look like this:
1 17
/home/name/pictures/image_1.jpg vn324kl21lsfda
The code loading the image will prepare the labels for you in this case.
thank u so much. I will try and let u know the result.
Hi. sorry for bother u again. this is my gt file 1 17 /home/dev02/see/datasets/vin/images/background1.png 3j21323123jfdsf
this is my command
python train_text_recognition.py /home/dev2/see/datasets/vin/path.json /home/dev2/see/datasets/vin/log --char-map ../datasets/fsns/fsns_char_map.json -r ../datasets/model/model_190000.npz --blank-label 0 -b 1
and I've got this error
I've checked and I think that my gt file is wrong.
Yes you are right! I'm sorry, it should be 17 1
in the first line instead of 1 17
, because you are actually predicting 17 text regions with one character each.
But this should not completely fix your problem. The code is complaining, that the input shape is not okay (which so far makes sense), but the second number of 1 != 15
should not be 15 but 17 in your case. I'm not sure why this happens, but it might be that the labels are not correctly padded after loading? Maybe you need to investigate this, too.
First of all .Thank u for sharing the project.
I want to train model with my own images and wonder what is the format of ground truth
BTW, My text is like "vn324kl21lsfda" which version u suggest me to use? fsns ,svhn or text recognition?