nicknochnack / TFODCourse

957 stars 924 forks source link

keyerror : 'licence' in step 3 creating tf records #85

Open Abhishekpotpally opened 2 years ago

Abhishekpotpally commented 2 years ago

I am getting this issue will creating tf records

Traceback (most recent call last): File "D:\ANPR\Tensorflow\scripts\generate_tfrecord.py", line 168, in tf.app.run() File "D:\ANPR\anprsys\lib\site-packages\tensorflow\python\platform\app.py", line 36, in run _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef) File "D:\ANPR\anprsys\lib\site-packages\absl\app.py", line 312, in run _run_main(main, args) File "D:\ANPR\anprsys\lib\site-packages\absl\app.py", line 258, in _run_main sys.exit(main(argv)) File "D:\ANPR\Tensorflow\scripts\generate_tfrecord.py", line 158, in main tf_example = create_tf_example(group, path) File "D:\ANPR\Tensorflow\scripts\generate_tfrecord.py", line 132, in create_tf_example classes.append(class_text_to_int(row['class'])) File "D:\ANPR\Tensorflow\scripts\generate_tfrecord.py", line 101, in class_text_to_int return label_map_dict[row_label] KeyError: 'licence' Traceback (most recent call last): File "D:\ANPR\Tensorflow\scripts\generate_tfrecord.py", line 168, in tf.app.run() File "D:\ANPR\anprsys\lib\site-packages\tensorflow\python\platform\app.py", line 36, in run _run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef) File "D:\ANPR\anprsys\lib\site-packages\absl\app.py", line 312, in run _run_main(main, args) File "D:\ANPR\anprsys\lib\site-packages\absl\app.py", line 258, in _run_main sys.exit(main(argv)) File "D:\ANPR\Tensorflow\scripts\generate_tfrecord.py", line 158, in main tf_example = create_tf_example(group, path) File "D:\ANPR\Tensorflow\scripts\generate_tfrecord.py", line 132, in create_tf_example classes.append(class_text_to_int(row['class'])) File "D:\ANPR\Tensorflow\scripts\generate_tfrecord.py", line 101, in class_text_to_int return label_map_dict[row_label] KeyError: 'licence'

snakebit18 commented 2 years ago

same problem have you found the solution

aksripu commented 1 year ago

i am also having same problem please help

davemaster commented 1 year ago

See the video again, in the tfrecord part....

aksripu commented 1 year ago

i tried but still i did not get it

davemaster commented 1 year ago

I remember, the tfrecord is included in the git file. You have to EDIT that tfrecord.py file to fit the licence unique class