predictClass.py 文件源码

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

项目:hourglasstensorlfow 作者: wbenbihi 项目源码 文件源码
def plt_skeleton(self, img, tocopy = True, debug = False, sess = None):
        """ Given an Image, returns Image with plotted limbs (TF VERSION)
        Args:
            img     : Source Image shape = (256,256,3)
            tocopy  : (bool) False to write on source image / True to return a new array
            debug   : (bool) for testing puposes
            sess    : KEEP NONE
        """
        joints = self.joints_pred(np.expand_dims(img, axis = 0), coord = 'img', debug = False, sess = sess)
        if tocopy:
            img = np.copy(img)
        for i in range(len(self.links)):
            position = self.givePixel(self.links[i]['link'],joints)
            cv2.line(img, tuple(position[0])[::-1], tuple(position[1])[::-1], self.links[i]['color'][::-1], thickness = 2)
        if tocopy:
            return img
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号