def _accur(self, pred, gtMap, num_image):
""" Given a Prediction batch (pred) and a Ground Truth batch (gtMaps),
returns one minus the mean distance.
Args:
pred : Prediction Batch (shape = num_image x 64 x 64)
gtMaps : Ground Truth Batch (shape = num_image x 64 x 64)
num_image : (int) Number of images in batch
Returns:
(float)
"""
err = tf.to_float(0)
for i in range(num_image):
err = tf.add(err, self._compute_err(pred[i], gtMap[i]))
return tf.subtract(tf.to_float(1), err/num_image)
# MULTI CONTEXT ATTENTION MECHANISM
# WORK IN PROGRESS DO NOT USE THESE METHODS
# BASED ON:
# Multi-Context Attention for Human Pose Estimation
# Authors: Xiao Chu, Wei Yang, Wanli Ouyang, Cheng Ma, Alan L. Yuille, Xiaogang Wang
# Paper: https://arxiv.org/abs/1702.07432
# GitHub Torch7 Code: https://github.com/bearpaw/pose-attention
评论列表
文章目录