AlphaPose win10安装运行

我的电脑配置

操作系统:Windows 10
cuda版本:cuda_10.0.130_411.31_win10
cudnn版本:cudnn-10.0-windows10-x64-v7.6.5.32
python版本:python3.7.7
Git版本:Git for Windows 2.28.0

安装步骤

1 下载项目代码

  1. 在文件夹内右键,选择git bash here
  2. 输入以下代码,安装PyTorch版本项目
git clone -b pytorch https://github.com/MVIG-SJTU/AlphaPose.git

在这里插入图片描述

2 安装依赖包

pip install -r requirements.txt

3 安装pytorch

pytorch安装需要到pytorch官网选择对应的配置和版本
在这里插入图片描述
将最下方的命令在Git中运行,并等待安装

pip install torch==1.6.0+cu101 torchvision==0.7.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html

4 下载模型

下载 duc_se.pth (2018/08/30) (Google Drive | Baidu pan),并放入AlphaPose/models/sppe文件夹中;
下载yolov3-spp.weights(Google Drive | Baidu pan),并放入AlphaPose/models/yolo 文件夹中;

5 运行

5.1 Git中运行

以'demo.py'为例
使用'demo.py''video_demo.py' 时需要开启 --sp 参数,–indir为输入图片的文件路径,–outdir为结果输出路径。

python demo.py --indir examples/demo --outdir examples/res --sp

回车运行,识别的结果以json的形式保存在“examples/res”下
在这里插入图片描述

5.2 pycharm中运行

在pycharm中运行首先要在该项目文件下配置编译器,同时将下载好依赖包和模型,步骤同上2 安装依赖包3 安装pytorch4 下载模型
以'demo.py'为例

  1. 修改'opt.py' 文件中的输入图片的路径,默认为空,我们将它设置为examples/demo/;输入文件路径默认为“examples/res/”。
    在这里插入图片描述
parser.add_argument('--indir', dest='inputpath',help='image-directory', default="examples/demo/")
  1. 运行'demo.py' 需要开启 --sp 参数,因此要在'demo.py' 文件中使用args.sp,不然运行会报错。
args.sp = True

在这里插入图片描述

  1. run demo,识别的结果以json的形式保存在“examples/res”下
    在这里插入图片描述
评论 14
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Rena要努力

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值