mmaction2在anaconda上搭建以及学习建议

1 创建虚拟环境

1.1进入base虚拟环境

方法1
base
方法2(~代表当前目录下,所以如果不行你就先到达包含anaconda3的目录下)
source ~/anaconda3/bin/activate

​

1.2创建mmaction2虚拟环境

conda create -n mmaction python=3.7 -y
conda activate mmaction

1.3 根据 [官方文档](https://pytorch.org/) 进行 PyTorch 和 torchvision 的安装,

如cuda11.1, torch1.9.0:

pip install torch==1.9.0+cu111 torchvision==0.10.0+cu111 torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html

1.4安装MMCV

(1)进入下面的网站(github进入较慢,多试几次一定行),找到如下图所示的位置,根据cuda 和torch的版本选择合适的MMCV链接。

https://github.com/open-mmlab/mmcv#installation

 (2)选择合适的MMCV版本并且安装,我这里选择的是1.3.9(如果报错版本不正确,则先卸载之前的mmcv,然后根据错误提示版本,再安装一下)

pip install mmcv-full==1.3.9 -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.9.0/index.html

下载mmaction2

2.1 下载mmaction2(如果你已经下载好了就,cd 到mmaction就可以了)

git clone https://github.com/open-mmlab/mmaction2.git
cd mmaction2

2.2安装依赖包和 mmaction2(方法1)。

pip install -r requirements/build.txt
pip install -v -e

2.2安装依赖包和 mmaction2(方法2)。

pip install -r requirements/build.txt
python setup.py develop

3学习建议

        如果你是刚开始学习行为识别的同学,首先我建议你一定要有耐心。然后我建议你从一篇经典的论文开始(推荐TSN),认真读懂论文,复现其中的代码和结果。不需要着急的去看很多很多的论文,其实很多时候做某个领域的方法都是很相似的,且着急读的太多容易忽视细节。

猜你喜欢

转载自blog.csdn.net/qq_42845932/article/details/124178536