put exif transpose back in preloading to fix bug
This commit is contained in:
parent
a5b22d85bd
commit
3697b16344
|
@ -237,6 +237,7 @@ class ImageTrainItem:
|
||||||
self.target_wh = None
|
self.target_wh = None
|
||||||
try:
|
try:
|
||||||
with PIL.Image.open(self.pathname) as image:
|
with PIL.Image.open(self.pathname) as image:
|
||||||
|
image = ImageOps.exif_transpose(image)
|
||||||
width, height = image.size
|
width, height = image.size
|
||||||
image_aspect = width / height
|
image_aspect = width / height
|
||||||
target_wh = min(self.aspects, key=lambda aspects:abs(aspects[0]/aspects[1] - image_aspect))
|
target_wh = min(self.aspects, key=lambda aspects:abs(aspects[0]/aspects[1] - image_aspect))
|
||||||
|
|
Loading…
Reference in New Issue