低分辨率图像上的Openpose?

2024-05-16 14:05:31 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试获取低分辨率图像上的人体姿势信息。特别是我尝试了Keras OpenPose的michalfaber实现,但是该模型在低分辨率图像上的表现似乎不好,而在高分辨率图像上的表现却相当好。我也在GitHub repo上以issue的形式发布了一个问题,但我认为我会在这里尝试,因为我并不打算实现人体姿势检测

我的图像宽度和高度大约为50-100像素。 这是图像的一个示例。我想知道是否有人知道一种修改程序、网络的方法,或者知道一种在这种低分辨率图像上表现良好的人体姿势网络

enter image description here


Tags: 模型图像网络github信息repoissue人体
1条回答
网友
1楼 · 发布于 2024-05-16 14:05:31

如果您正在寻找不同的人体姿势估计网络,我强烈推荐MxNet GluonCV框架(https://gluon-cv.mxnet.io/model_zoo/pose.html)。它使用非常简单,还包含许多不同的姿势估计网络,您可以尝试比较精度和速度之间的权衡。例如,要使用它,您可以执行以下操作(摘自教程页面):

from matplotlib import pyplot as plt
from gluoncv import model_zoo, data, utils
from gluoncv.data.transforms.pose import detector_to_alpha_pose, heatmap_to_coord_alpha_pose

detector = model_zoo.get_model('yolo3_mobilenet1.0_coco', pretrained=True)
pose_net = model_zoo.get_model('alpha_pose_resnet101_v1b_coco', pretrained=True)

# Note that we can reset the classes of the detector to only include
# human, so that the NMS process is faster.

detector.reset_class(["person"], reuse_weights=['person'])

im_fname = utils.download('https://github.com/dmlc/web-data/blob/master/' +
                          'gluoncv/pose/soccer.png?raw=true',
                          path='soccer.png')
x, img = data.transforms.presets.yolo.load_test(im_fname, short=512)
print('Shape of pre-processed image:', x.shape)

class_IDs, scores, bounding_boxs = detector(x)

pose_input, upscale_bbox = detector_to_alpha_pose(img, class_IDs, scores, bounding_boxs)

predicted_heatmap = pose_net(pose_input)
pred_coords, confidence = heatmap_to_coord_alpha_pose(predicted_heatmap, upscale_bbox)

例如,为了进行精度比较,他们的AlphaPose与Resnet 101网络的精度明显高于OpenPose(您可以从上面的链接中找到更高的精度基准)。然而,需要注意的是,要理解这些网络类型之间的差异,例如实现自下而上和自上而下的方法,因为这会影响不同场景下的推理速度

例如,自顶向下方法的运行时间与检测到的人数成正比,如果图像中有一群人,则可能会很耗时

相关问题 更多 >