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
|
||||
try:
|
||||
with PIL.Image.open(self.pathname) as image:
|
||||
image = ImageOps.exif_transpose(image)
|
||||
width, height = image.size
|
||||
image_aspect = width / height
|
||||
target_wh = min(self.aspects, key=lambda aspects:abs(aspects[0]/aspects[1] - image_aspect))
|
||||
|
|
Loading…
Reference in New Issue