Closed aqsc closed 3 years ago
when generating limb structure, we use mask1 = cross <= 0 # 46 * 46 mask2 = cross >= length2 mask3 = 1 - mask1 | mask2
D2 = np.zeros((self.label_size, self.label_size)) D2 += mask1.astype('float32') ((x - x1) (x - x1) + (y - y1) (y - y1)) D2 += mask2.astype('float32') ((x - x2) (x - x2) + (y - y2) (y - y2)) D2 += mask3.astype('float32') ((x - px) (x - px) + (py - y) * (py - y))
They are just some intermediate variables. You can find details in this link for more mathematical understanding (Chinese version). And I already posted it in thecomment.
when generating limb structure, we use mask1 = cross <= 0 # 46 * 46 mask2 = cross >= length2 mask3 = 1 - mask1 | mask2
D2 = np.zeros((self.label_size, self.label_size)) D2 += mask1.astype('float32') ((x - x1) (x - x1) + (y - y1) (y - y1)) D2 += mask2.astype('float32') ((x - x2) (x - x2) + (y - y2) (y - y2)) D2 += mask3.astype('float32') ((x - px) (x - px) + (py - y) * (py - y))