MaybeShewill-CV / CRNN_Tensorflow

Convolutional Recurrent Neural Networks(CRNN) for Scene Text Recognition
MIT License
1.03k stars 388 forks source link

train_loss and train accuracy is very good,but val_loss is hign #388

Closed wzqy56789 closed 4 years ago

wzqy56789 commented 4 years ago

I create 384 train samples and 96 val sapmles and every sample have 10 chinenese characters。Total chinenese characters is 50,it is mean C.ARCH.NUM_CLASSES =51. And __C.ARCH.INPUT_SIZE = (220, 32),C.ARCH.SEQ_LENGTH = 55 。

THEN I have trained 1000 EPOCHS,BATCH_SIZE=32. The train_loss is around 0.4 and train accuracy is around 0.99,but val_loss is above 50,val accuracy is aroud 0.02。and test is not good even using train jpg。

My question :What should I do to improve val accuracy and test accuracy ?

MaybeShewill-CV commented 4 years ago

@wzqy56789 check if your test input image use the same preprocess function as training procedure:)

wzqy56789 commented 4 years ago

I found it that accuracy of test with batch_normalization is hign.

MaybeShewill-CV commented 4 years ago

@wzqy56789 during testing process bn params should be frozen. I did not meet such a problem when i train the model:)