数据集下载链接http://host.robots.ox.ac.uk/pascal/VOC/voc2007/
下载训练集
然后解压
下载代码https://github.com/balancap/SSD-Tensorflow
将这个文件解压
然后修改
修改内容为:
此时运行可能会报错
with tf.python_io.TFRecordWriter(tf_filename) as tfrecord_writer:
NotFoundError
解决方法
先以二进制创建文件
with open(tf_filename,'wb'):
writer = tf.python_io.TFRecordWriter(path=tf_filename)
解决
还有可能这里报错:
image_data = tf.gfile.FastGFile(filename, 'rb').read()
错误为
'utf-8' codec can't decode byte 0xff in position 0: invalid start byte
解决方法改为二进制读取
再运行代码将完整生成Tfrecords文件