Daniil-Osokin/gccpm-look-into-person-cvpr19.pytorch

Why duplicate body masking in data augument.

edvardHua opened this issue · 1 comments

line 27~37 inside lip.py

        if random.random() > 0.5:
            center_x = random.randint(w//3, w-1-w//3)
            center_y = random.randint(h//3, h-1-h//3)
            percentage = 0.3
            kpt = [
                [center_x - random.randint(1, int(w*percentage)), center_y - random.randint(1, int(h*percentage))],
                [center_x + random.randint(1, int(w*percentage)), center_y - random.randint(1, int(h*percentage))],
                [center_x + random.randint(1, int(w*percentage)), center_y + random.randint(1, int(h*percentage))],
                [center_x - random.randint(1, int(w*percentage)), center_y + random.randint(1, int(h*percentage))]
                ]
            cv2.fillConvexPoly(image, np.array(kpt, dtype=np.int32), (128, 128, 128))

and train.py apply SinglePersonBodyMasking in transforms again.

Thanks, it left after code refactoring. Cleaned in #6.