CenterNet仓库链接:
https://github.com/xingyizhou/CenterNet
记录一下跟着INSTALL.md走的过程遇到的一些问题
问题1:更改cudnn
这一步倒是没报错,记录一下这个命令的意思。
把对应py文件的1254行中的torch.backends.cudnn.enabled替换成False
执行完以后可以去py文件里检查一下,或者自己手动替换
# PYTORCH=/path/to/pytorch # usually ~/anaconda3/envs/CenterNet/lib/python3.6/site-packages/
# for pytorch v0.4.0
sed -i "1194s/torch\.backends\.cudnn\.enabled/False/g" ${PYTORCH}/torch/nn/functional.py
# for pytorch v0.4.1
sed -i "1254s/torch\.backends\.cudnn\.enabled/False/g" ${PYTORCH}/torch/nn/functional.py
问题2:make coco报错
gcc: error: pycocotools/_mask.c: No such file or directory
error: command 'gcc' failed with exit status 1
Makefile:3: recipe for target 'all' failed
make: *** [all] Error 1
原因是新环境没有安装cython, -->pip install cython即可

这篇博客记录了在安装CenterNet时遇到的问题及解决方法。问题包括:1) 修改cudnn设置以避免错误;2) 缺少cython导致`make coco`失败,通过`pip install cython`解决;3) 编译可形变卷积模块时找不到nvcc命令,需将nvcc添加到环境变量,并确保与pytorch版本匹配。解决这些问题后,成功安装并运行了预训练模型。
最低0.47元/天 解锁文章
532

被折叠的 条评论
为什么被折叠?



