Faster R-CNN源码网址:https://github.com/dBeker/Faster-RCNN-TensorFlow-Python3.5点击打开链接
环境:python3.6 tensorflow-gpu1.13.0 无奈自己电脑跑不动,走的学校工作站3*12G1080Ti
从学习到实验复现花了小一周时间,记录一下一些报错和自己的调试过程
1.Restoring from checkpoint failed. This is most likely due to a mismatch between the current graph and the graph from the checkpoint. Please ensure that you have not altered the graph expected based on the checkpoint. Original error: Assign requires shapes of both tensors to match. lhs shape= [xx,xx] rhs shape= [xx,xx]
训练前需要删除data/cache文件,同时将训练好的新的模型复制到output文件。
2.AttributeError: ‘NoneType‘ object has no attribute ‘astype‘
数据集是否含有中文字符,demo.py中的CLASSES以及im_name是否修改
同时,im_name对应的文件夹data/demo的图片是否替换
3.超显存报错。
这个需要更好的服务器支持或者降低batch_size试试了,不过这个参数最好不要调整太多,对训练的结果会造成影响。
4.ImportError: No module named 'lib.utils.cython_bbox'
安装包里有两个setup.py文件,两个都安装一下就可以解决这个问题(1.pythonAPI2.lib/utils文件中有一个)
5.运行train.py时出现“Unsuccessful TensorSliceReader constructor: Failed to find any matching files for ..../data/imagenet_weights/vgg16.ckp
有个下载链接,下载地址:http://download.tensorflow.org/models/vgg_16_2016_08_28.tar.gz
将这个文件重命名为vgg16.ckpt,新建文件夹imagenet_weights,把vgg16.ckpt放到imagenet_weights下,再将imagenet_weights文件夹拷贝到data文件夹下。一定记得改名!!!
还有些记不起来啦,主要是遇到了这些问题,应该是比较普遍哒,希望能够帮助到大家!!!
最后附上我跟的教程,成功运行!!
(16条消息) Windows 下 TensorFlow 和 Faster rcnn 详细安装步骤(二)_辣鸡博主已停更的博客-优快云博客
Windows +TensorFlow+Faster Rcnn 详细安装步骤(一)_辣鸡博主已停更的博客-优快云博客_windows-faster r-cnn数据库安装