论文实践学习 - Multi-Context Attention for Human Pose Estimation

这篇博客介绍了如何基于Docker-Torch环境,运用Multi-Context Attention进行人体姿态估计。通过运行demo.lua和show.py,展示了图片人体姿态估计及结果可视化。尽管受限于显存,未能在所有尺度上进行搜索,但文中提供了预训练模型的使用和实验结果,包括理想的和不理想的姿态估计展示。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

类似于 论文实践学习 - Stacked Hourglass Networks for Human Pose Estimation ,基于Docker-Torch,估计人体关节点.

这里只简单进行测试估计结果,由于显存有限,未能加入所有的 scale_search.

这里写图片描述

1. 图片人体姿态估计 - demo.lua

# 输入参数由两个, 第二个参数默认为 'mean'
th demo.lua imglist.txt 'max' 
# or
th demo.lua imglist.txt 
require 'paths'
paths.dofile('util.lua')
paths.dofile('img.lua')

--------------------------------------------------------------------------------
-- Initialization
--------------------------------------------------------------------------------
a =  loadImageNames(arg[1]) -- 批量读取文件名列表

m = torch.load( '../checkpoints/mpii/crf_parts/model.t7')   -- Load pre-trained model
m:cuda()
m:evaluate()

-- Parameters
local isflip = true
local minusmean = tru
local scale_search = {
  
  1.0, 1.1} -- 根据显存情况来选择
-- local scale_search = {0.7,0.8,0.9,1.0,1.1,1.2} -- used in paper with NVIDIA Titan X (12 GB memory).


-- Displays a convenient progress bar
idxs = torch.range(1, a.nsamples)
nsamples = idxs:nElement() 

xlua.progress(0,nsamples)
preds = torch.Tensor(nsamples,16,3)
imgs = torch.Tensor(nsamples,3,256,256)
local imgpath = '../data/image/'
--------------------------------------------------------------------------------
-- Main loop
--------------------------------------------------------------------------------
for idx = 1,nsamples 
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值