diff --git a/ppdet/engine/trainer.py b/ppdet/engine/trainer.py index 068e837bd01f5c8c49d31b92c033ea0c67cc1e1d..2d0348a8fee669f72f598dfa231958729e20a13c 100644 --- a/ppdet/engine/trainer.py +++ b/ppdet/engine/trainer.py @@ -22,7 +22,7 @@ import copy import time import numpy as np -from PIL import Image +from PIL import Image, ImageOps import paddle import paddle.distributed as dist @@ -527,6 +527,7 @@ class Trainer(object): for i, im_id in enumerate(outs['im_id']): image_path = imid2path[int(im_id)] image = Image.open(image_path).convert('RGB') + image = ImageOps.exif_transpose(image) self.status['original_image'] = np.array(image.copy()) end = start + bbox_num[i]