安装mmaction2记录

win11
cuda 11.7
python 3.8
1.创建新环境

conda create -n  mmaction python=3.8

2.激活环境

conda activate mmaction

3.安装pytorch

pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117

4.下载github上的代码
https://github.com/open-mmlab/mmaction2

5.安装mmcv-full

pip install mmcv==2.0.0rc4 -f https://download.openmmlab.com/mmcv/dist/cu117/torch2.0.0/index.html

安装依赖包和mmaction2

pip install -U openmim
mim install mmcv
mim install mmengine
mim install mmdet
mim install mmpose
git clone https://github.com/open-mmlab/mmaction2.git
cd mmaction2
pip install -r requirements.txt
pip install -v -e .
pip install mmaction2

验证安装
为了验证 MMAction2 是否安装正确,我们提供了一些示例代码来运行推理演示。

第一步:下载配置文件和权重文件

mim download mmaction2 --config tsn_imagenet-pretrained-r50_8xb32-1x1x8-100e_kinetics400-rgb --dest .

第二步。 验证推理演示。

如果是从源代码安装的 mmaction2,运行以下命令:

python demo/demo.py tsn_imagenet-pretrained-r50_8xb32-1x1x8-100e_kinetics400-rgb.py tsn_imagenet-pretrained-r50_8xb32-1x1x8-100e_kinetics400-rgb_20220906-2692d16c.pth demo/demo.mp4 tools/data/kinetics/label_map_k400.txt

A将在终端看到前5个标签及其对应的分数。
在这里插入图片描述

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值