Transform turns images 90 degrees?

Hi guys, this is my first post on the forums. I’m trying to create a classifier that can distinguish my cat from others. I uploaded a bunch of photos from my phone for my cat (so the size of each photo is pretty large) and downloaded cats from the web for the other cats. As you can tell from the photo below, my cat is the “extra_cat”. When it shrinks and transforms the photo, it flips it 90 degrees. I would really appreciate it if someone could help me find out why or find a way to make it normal. The code should be shown in the photo.

Also, this is the first time I’ve been active on any forums. I’ve used Reddit for years and have never written anything. I want to be active in forums like this, so I’d appreciate some tips for properly contributing to forums and how to properly use them. Thanks

1 Like

This seems to be happening with only your images from that you are getting from the iphone? If so i would first open the images before passing it in fro training. Just to check if the images that you are bringing in are oriented correctly. :slight_smile: (not sure what else, sorry. )

Some of the photos of my cat are in landscape mode and in others, it’s in portrait mode. After looking at more of the images, it seems that it just changes all of the images into landscape mode, so it turns the ones that are in portrait 90 degrees. Is there a way I can preprocess the images and square crop it all?