因为image对应一个mask,keypoint的mask和paf的mask都用的mask。
for idx in range(keypoint_mask.shape[0]):
keypoint_mask[idx] = mask
sample['keypoint_mask'] = keypoint_mask
paf_maps = self._generate_paf_maps(sample)
sample['paf_maps'] = paf_maps
paf_mask = np.zeros(shape=paf_maps.shape, dtype=np.float32)
for idx in range(paf_mask.shape[0]):
paf_mask[idx] = mask
他的loss是输出减去标签的图然后乘mask,所以交换joint不用对mask进行任何处理。
标签:idx,joint,交换,mask,maps,shape,keypoint,paf From: https://www.cnblogs.com/hahaah/p/17093014.html