Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very random results?? #21

Open
QuickLearner171998 opened this issue Jul 11, 2019 · 17 comments
Open

Very random results?? #21

QuickLearner171998 opened this issue Jul 11, 2019 · 17 comments

Comments

@QuickLearner171998
Copy link

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

@Pay20Y
Copy link
Owner

Pay20Y commented Jul 11, 2019

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.

@learn01one
Copy link

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

@Pay20Y
Copy link
Owner

Pay20Y commented Jul 11, 2019 via email

@QuickLearner171998
Copy link
Author

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??

@Pay20Y
Copy link
Owner

Pay20Y commented Jul 11, 2019 via email

@learn01one
Copy link

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

@Pay20Y
Copy link
Owner

Pay20Y commented Jul 11, 2019

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.

@learn01one
Copy link

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
Copy link

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
Copy link

Sorry, since I’m still doing experiments, I’m not sure when I can get a better model. | | 乔峙 | | 邮箱:qiaozhi_jlu@163.com | 签名由 网易邮箱大师 定制 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.

@Pay20Y
Copy link
Owner

Pay20Y commented Jul 15, 2019

Sorry, since I’m still doing experiments, I’m not sure when I can get a better model. | | 乔峙 | | 邮箱:qiaozhi_jlu@163.com | 签名由 网易邮箱大师 定制 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

@raidastauras
Copy link

raidastauras commented Jul 25, 2019

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..?

@Pay20Y
Copy link
Owner

Pay20Y commented Jul 25, 2019

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.

@raidastauras
Copy link

raidastauras commented Jul 25, 2019

@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})

@Pay20Y
Copy link
Owner

Pay20Y commented Jul 25, 2019

@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?

@raidastauras
Copy link

@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

@Pay20Y
Copy link
Owner

Pay20Y commented Jul 27, 2019

@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 Pay20Y closed this as completed Jul 27, 2019
@Pay20Y Pay20Y reopened this Jul 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants