记录下mmaction2安装过程中的问题

1.pip安装失败可以换源,国内用官方文档给的这步安装不上去

建议使用

pip install -i https://pypi.tuna.tsinghua.edu.cn/simple myqr -r requirements/build.txt

2. 亲测mmcv-full换源也装不好,可以到此网站手动选择 https://github.com/open-mmlab/mmcv

例如如下版本

pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu110/torch1.7.0/index.html

最后测试

import torch
from mmaction.apis import init_recognizer, inference_recognizer

config_file = 'configs/recognition/tsn/tsn_r50_video_inference_1x1x3_100e_kinetics400_rgb.py'
device = 'cuda:0' # or 'cpu'
device = torch.device(device)

model = init_recognizer(config_file, device=device)
# inference the demo video
inference_recognizer(model, 'demo/demo.mp4')

结果如下就算安装成功啦

 

你可能感兴趣的:(python,深度学习)