首页 > 解决方案 > Openpose 在低分辨率图像上?

问题描述

我正在尝试获取低分辨率图像的人体姿势信息。特别是我尝试了 michalfaber 的Keras OpenPose 实现,但该模型似乎在低分辨率图像上表现不佳,而在高分辨率图像上表现相当好。我也在 GitHub repo 上发布了一个问题作为问题,但我想我会在这里尝试,因为我没有设置人体姿势检测的特定实现。

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

在此处输入图像描述

标签: pythontensorflowkerasopenpose

解决方案


如果您正在寻找不同的人体姿态估计网络,我强烈推荐 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 准确得多(您可以从上面的链接中找到更多准确度基准)。然而,需要注意的是了解这些网络类型之间的差异,例如实施自下而上和自上而下的方法,因为它会影响不同场景下的推理速度。

例如,自上而下方法的运行时间与检测到的人数成正比,如果您的图像中有一大群人,这可能会很耗时。


推荐阅读