我实际上正在使用miniconda和tensorflow并试图训练用于对象检测的模型,并且在运行generate_ tfrecord.py将csv转换为tfrecord时遇到一个问题,错误是:
"generate_tfrecord.py", line 90, in <module>
tf.app.run()
我使用了此链接 https://github.com/datitran/raccoon_dataset/blob/master/generate_tfrecord.py
(tensorflow) C:\Users\OctaNet\Miniconda3\envs\tensorflow\models\research\object_detection>python generate_tfrecord.py --csv_input=images/train.csv --output_path=data/train.record --image_dir=images/train/
Iterating train
Traceback (most recent call last):
File "generate_tfrecord.py", line 90, in <module>
tf.app.run()
File "C:\Users\OctaNet\Miniconda3\envs\tensorflow\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run
_sys.exit(main(argv))
File "generate_tfrecord.py", line 80, in main
tf_example = create_tf_example(group, path)
File "generate_tfrecord.py", line 67, in create_tf_example
'image/object/class/label': dataset_util.int64_list_feature(classes),
File "C:\Users\OctaNet\Miniconda3\envs\tensorflow\lib\site-packages\object_detection-0.1-py3.6.egg\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