posec3D训练自己的模型

官方例子:

./tools/dist_train.sh configs/recognition/tsn/tsn_r50_1x1x3_100e_kinetics400_rgb.py 8 --resume-from work_dirs/tsn_r50_1x1x3_100e_kinetics400_rgb/latest.pth

我们这里修改为load-from
Difference between resume-from and load-from: resume-from loads both the model weights and optimizer status, and the epoch is also inherited from the specified checkpoint. It is usually used for resuming the training process that is interrupted accidentally. load-from only loads the model weights and the training epoch starts from 0. It is usually used for finetuning.
下载训练数据集
https://github.com/open-mmlab/mmaction2/tree/master/tools/data/skeleton
放在data/posec3d下面

./tools/dist_train.sh configs/skeleton/posec3d/slowonly_r50_u48_240e_ntu120_xsub_keypoint.py 1 --resume-from work_dirs/slowonly_r50_u48_240e_ntu120_xsub_keypoint-6736b03f.pth

python tools/train.py configs/skeleton/posec3d/slowonly_r50_u48_240e_ntu120_xsub_keypoint.py     --work-dir work_dirs/slowonly_r50_u48_240e_xsub_keypoint     --validate --seed 0 --deterministic
``

这里训练就跑通了,注意提示我们要修改一下参数
train.py171行添加

cfg.gpu_ids = [0]

mmaction/apis/train.py 91行

# num_gpus=len(cfg.gpu_ids),
        num_gpus=1,

当然如果我们要修改数据集,参考如何生成pkl文件

微调模型参考链接这里介绍如何将NTU RGB+D原始数据转化为MMAction2格式。首先,需要从https://github.com/shahroudy/NTURGB-D下载原始NTU-RGBD 60和NTU-RGBD 120数据调色的原型馃。

https://github.com/open-mmlab/mmaction2/blob/master/docs/en/tutorials/2_finetune.md

微调模型我们要修改head

  • 0
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值