Skip to content
Snippets Groups Projects

WIP: [Transform class] add ResizeCrop for drhagis

Closed Driss KHALIL requested to merge DrhagisUpdates into master
7 unresolved threads
@@ -18,7 +18,7 @@ import PIL.Image
import torchvision.transforms
import torchvision.transforms.functional
from PIL import ImageOps
from utils import expand2square
from .utils import expand2square
class TupleMixin:
@@ -276,15 +276,20 @@ class ColorJitter(torchvision.transforms.ColorJitter):
class ResizeCrop:
"""
Crop all the images by removing the black pixels in the width and height that doesn't touch t eye fundus.
Parameters
-------------
*args: 3 sized array
* args[0] : Contains the image
* args[1] : Contains the label
* args[2] : Contains the mask
"""
def __call__(self, *args):
img = args[0]
label = args[1]
mask = args[2]
Loading