环境说明:win10、cuda10.2
创建环境
conda create -n mmpose python=3.7
进入环境
activate mmpose
安装pytorch
conda install pytorch==1.8.1 torchvision==0.9.1 torchaudio==0.8.1 cudatoolkit=10.2 -c pytorch
安装mmcv-full
pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu102/torch1.8.1/index.html
安装mmcv-full时,一定要和cuda、torch版本对应上
安装其它工具包
pip install mmdet seaborn tqdm imageio-ffmpeg -i https://pypi.tuna.tsinghua.edu.cn/simple
下载mmpose
git clone https://github.com/open-mmlab/mmpose.git
安装环境依赖
pip install -r requirements.txt
pip3 install -e .
检查是否安装成功
python
# 检查 Pytorch
import torch, torchvision
print('Pytorch 版本', torch.__version__)
print('torchvision版本', torchvision.__version__)
print('CUDA 是否可用',torch.cuda.is_available())
# 检查 mmcv
from mmcv.ops import get_compiling_cuda_version, get_compiler_version
print('CUDA版本', get_compiling_cuda_version())
print('编译器版本', get_compiler_version())
# 检查 mmpose
import mmpose
print('mmpose版本', mmpose.__version__)
若检查全部通过,则安装成功!