FPN_Tensorflow icon indicating copy to clipboard operation
FPN_Tensorflow copied to clipboard

convert_data_to_tfrecord.py error!

Open lfdeep opened this issue 6 years ago • 5 comments

Hello,i run convert_data_to_tfrecord.py in python 3.6! Traceback (most recent call last): File "convert_data_to_tfrecord.py", line 159, in convert_pascal_to_tfrecord() File "convert_data_to_tfrecord.py", line 140, in convert_pascal_to_tfrecord 'img_name': _bytes_feature(img_name), File "convert_data_to_tfrecord.py", line 28, in _bytes_feature return tf.train.Feature(bytes_list=tf.train.BytesList(value=[value])) TypeError: '11222.jpg' has type str, but expected one of: bytes

lfdeep avatar Jun 09 '18 01:06 lfdeep

'img_name': _bytes_feature(img_name.encode())

yangxue0827 avatar Jun 09 '18 04:06 yangxue0827

Thank you!You are right, I solved problems in your way. And following: 2018-06-09 06:39:43.143172: I tensorflow/core/platform/cpu_feature_guard.cc:140] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA restore model it is running in CPU,how to change to GPU?

lfdeep avatar Jun 09 '18 06:06 lfdeep

@yangxue0827 您好,上面问题已解决。请问一下eval.py代码中怎么给真实标签呢?我现在有训练好的模型了,想直接得到AP和mAP

lfdeep avatar Jun 10 '18 02:06 lfdeep

@lfdeep 你好,不建议用这个代码里的评估函数,有问题。你可以用faster作者写的评估函数,我也会在以后根新评估代码,现在太忙没有时间。

yangxue0827 avatar Jun 10 '18 04:06 yangxue0827

@yangxue0827 谢谢,那test.py和train.py有问题吗?能生成结果的txt吗?

lfdeep avatar Jun 11 '18 00:06 lfdeep