I've imported images from my computer to my Cloud AutoML dataset in the form of zip file and I've noticed that the orientation of my images were altered. The orientation of my photos is important as I am doing a model to recognize hand gesture and orientation is an important feature. Is there anyway I could fix it? Screenshot
Why is Cloud AutoML Vision rotating my image?
548 views Asked by junsiong2008 At
3
There are 3 answers
0
On
after preparing the dataset, I would advise you to run the sample code over all your images(it will remove the exif data from the images, and they will be oriented in the right way)
image = Image.open(f"{source_dir}/{f}")
data = list(image.getdata())
image2 = Image.new(image.mode, image.size)
image2.putdata(data)
image2.save(f"{destination_dit}/{f}")
once the code above is run, upload the images from your destination directory, and you will see AutoML images and your destination directory images are in the same orientation
Orientation correction is applied automatically as part of the image import process so this is an expected response.
A feature request has already been filed for this.
https://issuetracker.google.com/151399086