I’m trying to train a segmentation UNet with fastai. I’ve found some weird behaviour I can’t explain. Some of my images will be flipped when opened with open_image. I’ll add some examples below.
For this picture both fastai and opencv read the image correctly.
Ok, I’ve found the problem. Turns out that some of the images I used were taken with a phone in landscape. The phone then adds metadata to say that the image has to be flipped. Some libraries read this metadata and some don’t. So all I had to do was remove all the metadata from the images before adding them in the training folder.