ilovin / lstm_ctc_ocr

Use CTC + tensorflow to OCR
https://ilovin.github.io/2017-04-06/tensorflow-lstm-ctc-ocr/
354 stars 140 forks source link

accuracy = 0.000 after Epoch 10000/10000 #28

Closed AllenDuane closed 6 years ago

AllenDuane commented 6 years ago

I just change the train-set size from 128000 to 12800.

seq 0: origin: [29, 40, 38, 59, 60] decoded:[] seq 1: origin: [57, 35, 15, 25, 3] decoded:[] seq 2: origin: [4, 10, 11, 58, 26] decoded:[] seq 3: origin: [11, 43, 2, 22] decoded:[] seq 4: origin: [43, 51, 15, 17] decoded:[] seq 5: origin: [60, 12, 1, 55] decoded:[] seq 6: origin: [38, 32, 58, 33] decoded:[] seq 7: origin: [14, 17, 23, 55, 38, 58] decoded:[] seq 8: origin: [11, 24, 8, 8, 22] decoded:[] seq 9: origin: [43, 41, 28, 28, 43] decoded:[] 10/22 11:56:11 Epoch 10000/10000, accuracy = 0.000,avg_train_cost = 22.022, lastbatch_err = 1.000, time = 22.802,lr=0.00000000

Where is the problem..

the standard version with: tensorflow 1.0.1 python 2.7.6

ilovin commented 6 years ago

how could you say "just"? Please read "readme" one more time.

AllenDuane commented 6 years ago

@ilovin so sorry about it....I`ll try again...

AllenDuane commented 6 years ago

@ilovin I adjust the train set back to 128000,but after 15/10000 epoch ,the decode array is empty all the time..

10/26 10:53:53 Epoch 17/10000, accuracy = 0.000,avg_train_cost = 21.953, lastbatch_err = 1.000, time = 56.703,lr=0.00003434 ('batch', 599, ': time', 0.1033940315246582) ('batch', 699, ': time', 0.10930395126342773) ('batch', 799, ': time', 0.11467504501342773) ('batch', 899, ': time', 0.10535502433776855) ('batch', 999, ': time', 0.10447001457214355) seq 0: origin: [21, 38, 27, 23] decoded:[] seq 1: origin: [18, 50, 17, 8, 10, 26] decoded:[] seq 2: origin: [37, 33, 49, 43, 13, 25] decoded:[] seq 3: origin: [25, 54, 40, 37, 32, 12] decoded:[] seq 4: origin: [22, 44, 7, 31] decoded:[] seq 5: origin: [58, 50, 38, 25, 23, 25] decoded:[] seq 6: origin: [59, 62, 9, 3, 29] decoded:[] seq 7: origin: [21, 10, 45, 8] decoded:[] seq 8: origin: [13, 52, 19, 5, 1, 12] decoded:[] seq 9: origin: [14, 35, 11, 46, 9, 57] decoded:[] 10/26 10:54:50 Epoch 17/10000, accuracy = 0.000,avg_train_cost = 21.978, lastbatch_err = 1.000, time = 113.420,lr=0.00003090

ilovin commented 6 years ago

In the master branch, I did not use CNN to extract feature, maybe it will make it harder to converge. However, some people also run the code, and it did converge. https://github.com/ilovin/lstm_ctc_ocr/issues/22

ilovin commented 6 years ago

feel free to re-open