安装mmcv-full
昨天在跑程序时,只安装了mmcv,而没有安装mmcv-full,那就直接pip instal mmcv-full,结果各种错误。我网上找了好多方法,下面这个成功了:
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu101/torch1.5.0/index.html
安装时需要改cuda和torch的版本, cu101/torch1.5.0, 最好是把torch版本改为*.*.0,我试图安装1.10.1,不成功,果断改成1.10.0。
查看自己的cuda和torch的版本:
import torch
print(torch.__version__)
安装mmdet
先把路径才到你想要放mmdet的地方,可以放到虚拟环境下的site-package中。
git clone https://github.com/open-mmlab/mmdetection.git
cd mmdetection
pip install -r requirements/build.txt
python setup.py develop
安装mmaction
git clone https://github.com/open-mmlab/mmaction2.git
cd mmdetection
pip install -r requirements/build.txt
python setup.py develop