Faster R-CNN代码实战(python)日志 (过程中遇到的错误总结 疑惑解答 各种知识点记录)

目录2018.3.19(二) 开始报错:'NoneType' AttributeError: 'NoneType' object has no attribute 'shape'pass和continue的区别:continue表示跳过后面的程序,重新循环,而pass表示站位,后面的代码(else之前)还是会执行报错:ValueError: Shape must be ...
摘要由CSDN通过智能技术生成

目录

 

 

2018.3.19(二) 开始

报错:'NoneType' AttributeError: 'NoneType' object has no attribute 'shape'

pass和continue的区别:continue表示跳过后面的程序,重新循环,而pass表示站位,后面的代码(else之前)还是会执行

报错:ValueError: Shape must be rank 1 but is rank 0 for 'bn_conv1/Reshape_4' (op: 'Reshape') with input shapes: [1,1,1,64], [].

报错:TypeError: softmax() got an unexpected keyword argument 'axis'

用conda install keras==2.1不行,

报错:PackagesNotFoundError: The following packages are not available from current channels:

报错:Could not load pretrained model weights. Weights can be found in the keras application folder        https://github.com/fchollet/keras/tree/master/keras/applications

报错:Exception: could not broadcast input array from shape (38, 67, 18) into shape (1, 38, 67)

篮框类和背景类数量,训练集和验证集数量

python numpy数组中冒号的使用

报错:Exception: 'a' cannot be empty unless no samples are taken

报错:SSH连接错误:packet_write_wait: Connection to 10.212.48.236 port 22: Broken pipe

报错:Linux服务器:cp: omitting directory

ubuntu用命令行从官网下载python3: 

报错:Broken pipe  packet_write_wait: Connection to 10.212.48.236 port 22: Broken pipe 训练时服务器中断


 

2018.3.19(二) 开始

 

参考网址,阿里云云栖社区翻译,faster-rcnn实现:

https://y..aliyun.com/articles/679245?utm_content=g_1000031076#

 

原文:

https://www.analyticsvidhya.com/blog/2018/11/implementation-faster-r-cnn-python-object-detection/#comment-157499

 

把xml转换成csv,在转换成txt,克隆github上的仓库,把自己的训练图像和测试图片放进去,运行。

 

报错:'NoneType' AttributeError: 'NoneType' object has no attribute 'shape'

解决:

 

 

根本就没有图像000006.png

 

在simple_parser.py上加一个判断

 

pass和continue的区别:continue表示跳过后面的程序,重新循环,而pass表示站位,后面的代码(else之前)还是会执行

 

报错:ValueError: Shape must be rank 1 but is rank 0 for 'bn_conv1/Reshape_4' (op: 'Reshape') with input shapes: [1,1,1,64], [].

解决:把版本降到2.2.0就好了,本来是2.2.4,

 

 

报错:TypeError: softmax() got an unexpected keyword argument 'axis'

解决:降低keras版本

 

用conda install keras==2.1不行,

  • 2
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 9
    评论
【资源说明】 1、该资源包括项目的全部源码,下载可以直接使用! 2、本项目适合作为计算机、数学、电子信息等专业的课程设计、期末大作业和毕设项目,作为参考资料学习借鉴。 3、本资源作为“参考资料”如果需要实现其他功能,需要能看懂代码,并且热爱钻研,自行调试。 基于Faster RCNN的人脸检测识别系统python源码+项目说明+wider_face数据集.zip ### 三,使用说明 1. 锚框的大小为[128、256、512],比率为[1:1、1:2、2:1]。 2. tensorflow的版本是'1.9.0',keras的版本是'2.1.5',除了使用tensorflow2.0之后版本,其他版本都可以尝试。不支持python2.x。 3. 使用的是tensorflow backend,theano可以自行修改。 4. wider face的Label文件格式与VOC2012的label不同,而我使用的Faster RCNN需要VOC2012的格式,所以需要将label文件转换一下格式。具体可以查看 [https://blog.csdn.net/qq_37431083/article/details/102742322](https://blog.csdn.net/qq_37431083/article/details/102742322) 5. 在训练过程可能会出现`"ValueError: 'a' cannot be empty unless no samples are taken"`这个错误,原因是neg_samples(负样本)的值是一个空值,一般在一轮训练可能会有负样本为空的情况,这里直接用异常处理跳过了,如果有更好的办法欢迎指正。 [https://blog.csdn.net/qq_37431083/article/details/102628580](https://blog.csdn.net/qq_37431083/article/details/102628580) 6. 这里只使用了wider face数据集的训练集部分,将训练集分割成训练集,验证集,测试集,但主要使用的是训练集。 ### 四,预测结果 由于显卡性能有限,这里只训练了30轮左右的预测结果,挑出了比较好的一张。 [https://github.com/jiaka/faster_rcnn_keras_wider_face/blob/master/results_imgs/10.png](https://github.com/jiaka/faster_rcnn_keras_wider_face/blob/master/results_imgs/10.png)

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 9
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值