raccoon_dataset icon indicating copy to clipboard operation
raccoon_dataset copied to clipboard

error in generate tfrecord

Open xxbb1234021 opened this issue 6 years ago • 8 comments

hi all , when I run generate_tfrecord. I met the problem below:

Traceback (most recent call last): File "D:/workspaces/python/chartbot/generate_tfrecord.py", line 99, in tf.app.run() File "C:\Users\kevin\Anaconda3\lib\site-packages\tensorflow\python\platform\app.py", line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "D:/workspaces/python/chartbot/generate_tfrecord.py", line 90, in main tf_example = create_tf_example(group, path) File "D:/workspaces/python/chartbot/generate_tfrecord.py", line 79, in create_tf_example 'image/object/class/label': dataset_util.int64_list_feature(classes) File "D:\workspaces\models\research\object_detection\utils\dataset_util.py", line 26, in int64_list_feature return tf.train.Feature(int64_list=tf.train.Int64List(value=value)) TypeError: None has type NoneType, but expected one of: int, long

how can i fix it?

xxbb1234021 avatar Apr 16 '18 08:04 xxbb1234021

I am facing the same error, how did you get it fixed?

kevintomsgithub avatar Apr 22 '18 20:04 kevintomsgithub

Thanks,i fix it

xxbb1234021 avatar Apr 23 '18 08:04 xxbb1234021

and how did you do that?

Thommy257 avatar Apr 26 '18 17:04 Thommy257

This means that there is one class that is not captured. Maybe you have a spelling error in one of your class or there is really some classes that you haven't put in the function yet. Try to check this again.

ali0517 avatar May 01 '18 09:05 ali0517

how did you do that? @xxbb1234021

zq1314 avatar Jun 20 '18 05:06 zq1314

@zq1314 Please refer to this link below. https://github.com/datitran/raccoon_dataset/issues/2

xxbb1234021 avatar Jun 20 '18 06:06 xxbb1234021

desk 54 help please how to sort this problem

unaisshazan avatar May 30 '19 02:05 unaisshazan

This means that there is one class that is not captured. Maybe you have a spelling error in one of your class or there is really some classes that you haven't put in the function yet. Try to check this again.

This was really the case with me. Just check your generateTFRecord.py file. In my case there were 9 labels mentioned with different names, But I was trying to use this file for 2 labels only. Changed the label numbers and their classes. then worked fine.

Shiva0072 avatar Feb 05 '21 19:02 Shiva0072