Hello,
I wrote a custom dataset to upload images and it works correctly when I use PIL module. How can i use cv2 instead?
If I just try to read the image with
img = cv2.imread(file_path)

it throws the error
img should be PIL Image. Got <class 'numpy.ndarray'>
produced by the transform function (the PyTorch transformation from torchvision.transforms to be clear).
Any idea on how to solve?