def METHOD_NAME(self, img, landmark=None, **kwargs):
    M = None
    h, w, c = img.shape
    src = np.array([
        [38.2946, 51.6963],
        [73.5318, 51.5014],
        [56.0252, 71.7366],
        [41.5493, 92.3655],
        [70.7299, 92.2041]], dtype=np.float32)
    src = src * 290 / 112
    src[:, 0] += 50
    src[:, 1] += 60
    src = src / 400 * self.opt.crop_size
    dst = landmark
    # dst = landmark.astype(np.float32)
    tform = trans.SimilarityTransform()
    tform.estimate(dst, src)
    M = tform.params[0:2, :]
    warped = cv2.warpAffine(img, M, (self.opt.crop_size, self.opt.crop_size), borderValue=0.0)
    return warped, M