FOTS_TF icon indicating copy to clipboard operation
FOTS_TF copied to clipboard

Very random results??

Open QuickLearner171998 opened this issue 5 years ago • 17 comments

I tested the model as it is and got very poor results. Any idea why?? 05_02_2019_16_09_0030 05_02_2019_16_09_0040 05_02_2019_16_09_0100

QuickLearner171998 avatar Jul 11 '19 07:07 QuickLearner171998

Because I used the ICDAR15 vocab to correct it. You can add --use_vocab=False to disable it. Anyway this model is not very good, I'm training a new one now.

Pay20Y avatar Jul 11 '19 08:07 Pay20Y

hi,can you tell me the version of tensorflow?I have encounted some problems when run the eval.

learn01one avatar Jul 11 '19 08:07 learn01one

1.12.0

| | 乔峙 | | 邮箱:[email protected] |

签名由 网易邮箱大师 定制

On 07/11/2019 16:19, learn01one wrote:

hi,can you tell me the version of tensorflow?I have encounted some problems when run the eval.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

Pay20Y avatar Jul 11 '19 08:07 Pay20Y

Because I used the ICDAR15 vocab to correct it. You can add --use_vocab=False to disable it. Anyway this model is not very good, I'm training a new one now.

--use_vocab=Fasle did not help. The results are again random. When can we expect a better model??

QuickLearner171998 avatar Jul 11 '19 08:07 QuickLearner171998

Sorry, since I’m still doing experiments, I’m not sure when I can get a better model.

| | 乔峙 | | 邮箱:[email protected] |

签名由 网易邮箱大师 定制

On 07/11/2019 16:25, Pramay wrote:

Because I used the ICDAR15 vocab to correct it. You can add --use_vocab=False to disable it. Anyway this model is not very good, I'm training a new one now.

--use_vocab=Fasle did not help. The results are again random. When can we expect a better model??

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

Pay20Y avatar Jul 11 '19 08:07 Pay20Y

hi,Pay20Y,can you give me some guide for this: TypeError:input 'strides' of 'stridedslice' op has type int32 does not match int64 of argument 'begin'

when i run train.i have try every solutions.thanks

learn01one avatar Jul 11 '19 08:07 learn01one

hi,Pay20Y,can you give me some guide for this: TypeError:input 'strides' of 'stridedslice' op has type int32 does not match int64 of argument 'begin'

when i run train.i have try every solutions.thanks

Maybe you should check the version of tensorflow, you can try a new version.

Pay20Y avatar Jul 11 '19 12:07 Pay20Y

hi,Pay20Y,can you give me some guide for this: TypeError:input 'strides' of 'stridedslice' op has type int32 does not match int64 of argument 'begin' when i run train.i have try every solutions.thanks

Maybe you should check the version of tensorflow, you can try a new version.

hi,Pay20Y,are you sure for python2+tensorflow 1.12.0 still some problems

learn01one avatar Jul 12 '19 13:07 learn01one

hi,Pay20Y,can you give me some guide for this: TypeError:input 'strides' of 'stridedslice' op has type int32 does not match int64 of argument 'begin' when i run train.i have try every solutions.thanks

Maybe you should check the version of tensorflow, you can try a new version. hi,Pay20Y,Thank you for your previous reply,I almost run the demo smoothly,just met the cv error can you give the version of opencv,thanks.

learn01one avatar Jul 15 '19 11:07 learn01one

Sorry, since I’m still doing experiments, I’m not sure when I can get a better model. | | 乔峙 | | 邮箱:[email protected] | 签名由 网易邮箱大师 定制 On 07/11/2019 16:25, Pramay wrote: Because I used the ICDAR15 vocab to correct it. You can add --use_vocab=False to disable it. Anyway this model is not very good, I'm training a new one now. --use_vocab=Fasle did not help. The results are again random. When can we expect a better model?? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

hi,Pay20Y,Thank you for your previous reply,I almost run the demo smoothly,just met the cv error can you give the version of opencv,thanks.

learn01one avatar Jul 15 '19 11:07 learn01one

Sorry, since I’m still doing experiments, I’m not sure when I can get a better model. | | 乔峙 | | 邮箱:[email protected] | 签名由 网易邮箱大师 定制 On 07/11/2019 16:25, Pramay wrote: Because I used the ICDAR15 vocab to correct it. You can add --use_vocab=False to disable it. Anyway this model is not very good, I'm training a new one now. --use_vocab=Fasle did not help. The results are again random. When can we expect a better model?? — You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

hi,Pay20Y,Thank you for your previous reply,I almost run the demo smoothly,just met the cv error can you give the version of opencv,thanks.

opencv-python==4.1.0.25

Pay20Y avatar Jul 15 '19 11:07 Pay20Y

The reason the results are random is because the dropout is still applied to the recognition part in eval.py.

recognize_part = Recognition_branch.Recognition(is_training=False) should be changed to something like this: recognize_part = Recognition_branch.Recognition(keepProb=1.0, is_training=False)

After disabling the dropout, the recognition part still performs very poorly. Mostly outputs the same result (recognizing letter "E" no matter what):

 array([[40],
       [40],
       [40],
       [40],
       [40],
       [40],
       [40],
       [40],
       [40],
       [40],
       [40],
       [40],
       [40],
       [40],
       [40],
       [40]], dtype=int64)

I guess there's a bug somewhere in the implementation of the recognition branch resulting in poorly trained model..?

RaidasGrisk avatar Jul 25 '19 07:07 RaidasGrisk

The reason the results are random is because the dropout is still applied to the recognition part in eval.py.

recognize_part = Recognition_branch.Recognition(is_training=False) should be changed to something like this: recognize_part = Recognition_branch.Recognition(keepProb=1.0, is_training=False)

After disabling the dropout, the recognition part still performs very poorly. Mostly outputs the same result (recognizing letter "E" no matter what):

 array([[40],
       [40],
       [40],
       [40],
       [40],
       [40],
       [40],
       [40],
       [40],
       [40],
       [40],
       [40],
       [40],
       [40],
       [40],
       [40]], dtype=int64)

I guess there's a bug somewhere in the implementation of the recognition branch resulting in poorly trained model..?

Thanks, I really ignored dropout in LSTM. And the results you list above have processed by functino ground_truth_to_word? Since "E" is No,40 in char_vector declared in config.py.

Pay20Y avatar Jul 25 '19 07:07 Pay20Y

@Pay20Y, no post-processing, the array listed above is raw output from: recog_decode = sess.run(dense_decode, feed_dict={input_images: [im_resized], input_transform_matrix: transform_matrixes, input_box_mask[0]: boxes_masks, input_box_widths: box_widths})

RaidasGrisk avatar Jul 25 '19 09:07 RaidasGrisk

@Pay20Y, no post-processing, the array listed above is raw output from: recog_decode = sess.run(dense_decode, feed_dict={input_images: [im_resized], input_transform_matrix: transform_matrixes, input_box_mask[0]: boxes_masks, input_box_widths: box_widths})

Sorry, I misunderstand what you mean. I have a question about BatchNorm in CRNN. Since the num of RoI is different in every batch. So CRNN is always train with a variable batch size. I wonder it is harm to BatchNorm in CRNN. Do you have any idea?

Pay20Y avatar Jul 25 '19 09:07 Pay20Y

@Pay20Y, no post-processing, the array listed above is raw output from: recog_decode = sess.run(dense_decode, feed_dict={input_images: [im_resized], input_transform_matrix: transform_matrixes, input_box_mask[0]: boxes_masks, input_box_widths: box_widths})

Sorry, I misunderstand what you mean. I have a question about BatchNorm in CRNN. Since the num of RoI is different in every batch. So CRNN is always train with a variable batch size. I wonder it is harm to BatchNorm in CRNN. Do you have any idea?

Yeah, I understand what you mean. This is a good question, but I'm really not sure if it does any harm or not. Maybe it does if the number of RoIs is very small in some batches..?

I guess simply varying the batch size itself is not a problem. Just guessing based on this paper: https://openreview.net/pdf?id=SkytjjU8G

RaidasGrisk avatar Jul 26 '19 15:07 RaidasGrisk

@Pay20Y, no post-processing, the array listed above is raw output from: recog_decode = sess.run(dense_decode, feed_dict={input_images: [im_resized], input_transform_matrix: transform_matrixes, input_box_mask[0]: boxes_masks, input_box_widths: box_widths})

Sorry, I misunderstand what you mean. I have a question about BatchNorm in CRNN. Since the num of RoI is different in every batch. So CRNN is always train with a variable batch size. I wonder it is harm to BatchNorm in CRNN. Do you have any idea?

Yeah, I understand what you mean. This is a good question, but I'm really not sure if it does any harm or not. Maybe it does if the number of RoIs is very small in some batches..?

I guess simply varying the batch size itself is not a problem. Just guessing based on this paper: https://openreview.net/pdf?id=Skyt

Pay20Y avatar Jul 27 '19 02:07 Pay20Y