matthewearl / deep-anpr

Using neural networks to build an automatic number plate recognition system
MIT License
1.84k stars 698 forks source link

train.py run error ! need help! #74

Open Mr-Yellow opened 6 years ago

Mr-Yellow commented 6 years ago

I run this program on windows using python3.5 .It occur following error ,how can I deal with it?Please! Traceback (most recent call last): File "train.py", line 293, in initial_weights=initial_weights) File "train.py", line 259, in train test_xs, test_ys = unzip(list(read_data("test/*.png"))[:50]) File "train.py", line 70, in read_data yield im, code_to_vec(p, code) File "train.py", line 58, in code_to_vec c = numpy.vstack([char_to_vec(c) for c in code]) File "train.py", line 58, in c = numpy.vstack([char_to_vec(c) for c in code]) File "train.py", line 55, in char_to_vec y[common.CHARS.index(c)] = 1.0 ValueError: substring not found

wenting521 commented 6 years ago

Does your problem have been solved? I also encountered the same problem and asked for answers. Thank you very much!

ZhimingHsu commented 6 years ago

For me, win10 python3.5

In read_data()

code = fname.split("\")[1][9:16] => code = fname.split("\")[1][9:16]

p = fname.split("\")[1][17] == '1' => p = fname.split("\")[1][17] == '1'

harshavkumar commented 4 years ago

Simple change In read_data() to:===>

code = fname.split("\")[1][9:16] p = fname.split("\")[1][17] == '1'