HRNet / DEKR

This is an official implementation of our CVPR 2021 paper "Bottom-Up Human Pose Estimation Via Disentangled Keypoint Regression" (https://arxiv.org/abs/2104.02300)
MIT License
437 stars 75 forks source link

Why can reading obj ['segmentation '] generate rle and rles? Rles is iterative, and rle is not iterative. #52

Open liudadan opened 1 year ago

liudadan commented 1 year ago

Why can reading obj ['segmentation '] generate rle and rles? Rles is iterative, and rle is not iterative. def get_mask(self, anno, img_info): m = np.zeros((img_info['height'], img_info['width']))

    for obj in anno:
        if obj['iscrowd']:
            rle = pycocotools.mask.frPyObjects(
                obj['segmentation'], img_info['height'], img_info['width'])
            m += pycocotools.mask.decode(rle)
        elif obj['num_keypoints'] == 0:
            rles = pycocotools.mask.frPyObjects(
                obj['segmentation'], img_info['height'], img_info['width'])
            for rle in rles:
                m += pycocotools.mask.decode(rle)

    return m < 0.5