There is a doubt about RandomCrop

class RandomCrop(object):
    """Crop randomly the image in a sample.

    Args:
        output_size (tuple or int): Desired output size. If int, square crop
            is made.
    """

    def __init__(self, output_size):
        assert isinstance(output_size, (int, tuple))
        if isinstance(output_size, int):
            self.output_size = (output_size, output_size)
        else:
            assert len(output_size) == 2
            self.output_size = output_size

    def __call__(self, sample):
        image, landmarks = sample['image'], sample['landmarks']

        h, w = image.shape[:2]
        new_h, new_w = self.output_size

        top = np.random.randint(0, h - new_h)
        left = np.random.randint(0, w - new_w)

        image = image[top: top + new_h,
                      left: left + new_w]
        landmarks = landmarks - [left, top]
        return {'image': image, 'landmarks': landmarks}

I really don’t know what “landmarks = landmarks - [left, top]” means?

This line of code shifts the facial keypoint landmarks by the amount of the random crop.
top and left are the new origin of the image, thus if you crop the image you need to shift the landmarks as well.
Imagine the original image dimensions are width=100, height=100 pixels and the landmarks are in the interval [0, 99].
Now if you crop the image with top=10, left=10 and new_h=50, new_w=50, the pixels from [10 : 60] will be used for width and height. To re-align the facial landmarks you need to subtract the top and left values from the coordinates.

Okay,I have figured it out. Thank you!