def __call__()

in src/pixparse/data/transforms.py [0:0]


    def __call__(self, img):
        is_tensor = isinstance(img, torch.Tensor)
        img_height, img_width = img.shape[-2:] if is_tensor else (img.height, img.width)
        if (
            (self.input_size[0] > self.input_size[1] and img_width > img_height) or
            (self.input_size[0] < self.input_size[1] and img_width < img_height)
        ):
            img = F.rotate(img, angle=-90, expand=True, interpolation=self.interpolation)
        return img