Sierkinhane / CRNN_Chinese_Characters_Rec

(CRNN) Chinese Characters Recognition.
1.82k stars 538 forks source link

When doing the training on japanese+english dataset I get the following results #81

Closed mariembenslama closed 5 years ago

mariembenslama commented 5 years ago

Start val U => U , gt: MNOPQRSTUV

And all test accuracies are 0.

Sierkinhane commented 5 years ago

Can you share your train loss.

mariembenslama commented 5 years ago

Sans titre1 The 1st global lose was 13.214795, then each time it takes only one example like shown in the screenshot, one pred character and tells that the gt is totally different and show a 0.000 accuracy.

The CTC I'm using is from this link: https://github.com/SeanNaren/warp-ctc.git

mariembenslama commented 5 years ago

The loss even reachs these values but still prints the wrong prediction. Sans titre1

Sierkinhane commented 5 years ago

Networks overfit your training data. You should get more data.

mariembenslama commented 5 years ago

I used the data generator and I have 1000 for training and 400 for test (for starter), do you think it's not enough? How much should I add?

mariembenslama commented 5 years ago

Alright I added about 10000 samples for training and 5000 for test and here are the results (same results) Sans titre1

I'm just wondering why is it reading only one character in the pred text

Sierkinhane commented 5 years ago

I firstly trained on 3.6m synthetic chinese character data, and then just used synthetic data generated by data_generator for finetune. Therefore, I can't assure that simple data generated by data_generator has robust ability to train a new model. Maybe you should get another data within complexity and diversity.

mariembenslama commented 5 years ago

Thanks and sorry for the trouble, however, I wrote a small program that reads from the lmdb file in order to see how the images and texts (matches) are being written inside the database and I got the following results:

b\image000001, 0 b\image000002, 0 ........ The image is well stored but the text matching is having 0 as value. I guess that it reads emtpy values which explains the results I got before

Start val U => U , gt: MNOPQRSTUV 0 100 .....

Do you think that would be the problem? I guess that the data_generator you wrote is really good and it's a shame to throw it away.

mariembenslama commented 5 years ago

When I read and print from the lmdb file (dataset.py) I get the following results: --> it prints english but not the japanese/chinese text Sans titre1 I guess the whole problem is because of the lmdb file.

c-cn commented 5 years ago

Start val U => U , gt: MNOPQRSTUV

And all test accuracies are 0.

Hi, I got the same result, Have you solved it?

mariembenslama commented 5 years ago

Hello, yes: Check Holmeyoung Crnn pytorch project, he solved it there :)

c-cn commented 5 years ago

Hello, yes: Check Holmeyoung Crnn pytorch project, he solved it there :)

Thank you for your answer, and it works.