@staticmethod<EOL><INDENT>def get_params(img, output_size):<DEDENT>
w, h, *_ = img.shape<EOL>th, tw = output_size<EOL>if w == tw and h == th:<EOL><INDENT>return <NUM_LIT:0>, <NUM_LIT:0>, h, w<EOL><DEDENT>i = random.randint(<NUM_LIT:0>, h - th)<EOL>j = random.randint(<NUM_LIT:0>, w - tw)<EOL>return i, j, th, tw<EOL>
Get parameters for ``crop`` for a random crop.

        Args:
            img (PIL Image): Image to be cropped.
            output_size (tuple): Expected output size of the crop.

        Returns:
            tuple: params (i, j, h, w) to be passed to ``crop`` for random crop.