hourglass_tiny.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:hourglasstensorlfow 作者: wbenbihi 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号