FCHD在window10(pytorch1.0,cuda9.0,cudnn7.1,python3.6)上测试

本文档详细记录了在Windows10环境下,使用PyTorch 1.0、CUDA 9.0和CUDNN 7.1以及Python 3.6配置FCHD模型的过程。内容包括环境安装、模型下载、错误排查及代码修正。在遇到如bbox定位问题和类型错误等挑战后,作者决定转向Ubuntu进行后续测试。

1.安装相关环境

pytorch安装
https://blog.youkuaiyun.com/loco1223/article/details/91354337

其他小环境

pip install ipdb
pip install opencv-python
pip install scipy
pip install scikit-image
pip install matplotlib
pip install cupy-cuda80//我的cuda版本是8.0

以及torchnet
https://blog.youkuaiyun.com/weixin_43264516/article/details/83187775
下载torchnet:
https://github.com/pytorch/tnt
用Anaconda Prompt激活环境后cd到所在文件目录下
安装torchnet:

python setup.py build
python setup.py install

2.初步检测

在github上下载相关模型
在这里插入图片描述
在这里插入图片描述
两个都是需要的,VGG模型应该是用于前部分衔接。

将两个模型直接放置于解压后的工程下

修改部分代码
在这里插入图片描述
src目录下的config.py文件内caffe_pretrain_path路径
一开始这些路径都是为ubuntu设计的。

在终端输入代码

python head_detection_demo.py --img_path 1.png --model_path head_detector_final

在这里插入图片描述
会报错,但会有结果,暂时不知道怎么修改。在这里插入图片描述

3.改正框位置不正确

参考
https://blog.youkuaiyun.com/missyougoon/article/details/90408970

4.some

1、a bytes-like object is required,not ‘str’:
https://blog.youkuaiyun.com/csu_vc/article/details/78372932/

2、安装SQLite3:
https://blog.youkuaiyun.com/say_hi_andhelloworld/article/details/86062102

3、TypeError: le() received an invalid combination of arguments - got (numpy.ndarray), but expected one of:

4、 the python code for non_maximum_suppression is about 2x slow
It is strongly recommended to build cython code:
cd model/utils/nms/; python3 build.py build_ext --inplacecd model/utils/nms/; python3 build.py build_ext --inplace’’’)
https://github.com/aditya-vora/FCHD-Fully-Convolutional-Head-Detector/issues/27

5、pytorch报错Implicit dimension choice for softmax has been deprecated. Change the call to include dim=X
https://blog.youkuaiyun.com/legalhighhigh/article/details/82819747

注:

目前基本放弃在win10上测试了,需要的python2.7环境等无法win10上很好的创建,比如CUDA9.0 没有支持python2.7的版本,以及遇到的无法联网记录等问题,决定接下来在ubuntu上进行测试,注定是个很漫长的过程。
待续吧。。。

评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值