linux下 pyskl环境PoseConv3D的配置--从零开始的保姆级教程
linux下 pyskl环境的配置–从配置anaconda开始的保姆级教程
使用清华镜像装个anaconda,xxx是版本
wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/xxx
我这里选用https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2022.05-Linux-x86_64.sh
下载好后安装anaconda:
bash Anaconda3-2022.05-Linux-x86_64.sh
装好后把anaconda加入环境变量后激活bashrc文件
source ~/.bashrc
之后添加镜像(可加可不加)
conda create --name pyskl python=3.8
conda activate pyskl
参考官方的installation,要先安装个pytorch并且version smaller than 1.11.0 and larger (or equal) than 1.5.0
我这里服务器的版本是cuda11.1,去pytorch官网找旧版本
最后使用1.9.1版本的torch
pip install torch==1.9.1 cu111 torchvision==0.10.1 cu111 torchaudio==0.9.1 -f https://download.pytorch.org/whl/torch_stable.html
把项目克隆到本地
git clone https://github.com/kennymckormick/pyskl.git
cd pyskl
直接装太慢了,加个镜像,如下:
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install -e . -i https://pypi.tuna.tsinghua.edu.cn/simple
另外,如果安装poseval失败,参考以上博文使用其他方法安装后还要把requirements.txt里的poseval这一项删除,重新运行一次
pip install -r requirements.txt
至此,环境配置完成。
按照官方提示运行demo
# Before running the demo, make sure you have installed mmcv-full, mmpose and mmdet. You should first install mmcv-full, and then install mmpose, mmdet.
# You should run the following scripts under the directory `$PYSKL`
# Running the demo with PoseC3D trained on NTURGB D 120 (Joint Modality), which is the default option. The input file is demo/ntu_sample.avi, the output file is demo/demo.mp4
python demo/demo_skeleton.py demo/ntu_sample.avi demo/demo.mp4
# Running the demo with STGCN trained on NTURGB D 120 (Joint Modality). The input file is demo/ntu_sample.avi, the output file is demo/demo.mp4
python demo/demo_skeleton.py demo/ntu_sample.avi demo/demo.mp4 --config configs/stgcn /stgcn _ntu120_xsub_hrnet/j.py --checkpoint http://download.openmmlab.com/mmaction/pyskl/ckpt/stgcnpp/stgcnpp_ntu120_xsub_hrnet/j.pth
跑到一半报错,发现作者把一个函数删了,问题不大。
接下来开始Training & Testing
参考官方的命令:
# Training
bash tools/dist_train.sh {config_name} {num_gpus} {other_options}
# Testing
bash tools/dist_test.sh {config_name} {checkpoint} {num_gpus} --out {output_file} --eval top_k_accuracy mean_class_accuracy
我这里选用最PoseConv3D以及数据集light_gym,打开pyskl/configs/posec3d/c3d_light_gym/joint.py
修改
ann_file = 'data/gym/gym_hrnet.pkl'
这一行改成自己按照官方提示下载的gym_hrnet.pkl文件的路径
运行:
bash tools/dist_train.sh configs/posec3d/c3d_light_gym/joint.py 2
可以看到运行成功
最后结果:
这篇好文章是转载于:学新通技术网
- 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
- 本站站名: 学新通技术网
- 本文地址: /boutique/detail/tanhiahaii
系列文章
更多
同类精品
更多
-
photoshop保存的图片太大微信发不了怎么办
PHP中文网 06-15 -
word里面弄一个表格后上面的标题会跑到下面怎么办
PHP中文网 06-20 -
photoshop扩展功能面板显示灰色怎么办
PHP中文网 06-14 -
《学习通》视频自动暂停处理方法
HelloWorld317 07-05 -
Android 11 保存文件到外部存储,并分享文件
Luke 10-12 -
TikTok加速器哪个好免费的TK加速器推荐
TK小达人 10-01 -
微信公众号没有声音提示怎么办
PHP中文网 03-31 -
excel下划线不显示怎么办
PHP中文网 06-23 -
excel打印预览压线压字怎么办
PHP中文网 06-22 -
微信运动停用后别人还能看到步数吗
PHP中文网 07-22