code: def exif_size(img):
      """
      获取图像的原始img size
      通过exif的orientation信息判断图像是否有旋转，如果有旋转则返回旋转前的size
      :param img: PIL图片
      :return: 原始图像的size
      """
      # Returns exif-corrected PIL size
      s = img.size  # (width, height)
      try:
          rotation = dict(img._getexif().items())[orientation]
          if rotation == 6:  # rotation 270  顺时针翻转90度
              s = (s[1], s[0])
          elif rotation == 8:  # ratation 90  逆时针翻转90度
              s = (s[1], s[0])
      except:
          # 如果图像的exif信息中没有旋转信息，则跳过
          pass
  
      return s
  
imports: import math
  import os
  import random
  import shutil
  from pathlib import Path
  import cv2
  import numpy
  import torch
  from PIL import Image, ExifTags
  from torch.utils.data import Dataset
  from tqdm import tqdm
  from build_utils.utils import xyxy2xywh, xywh2xyxy
label_desc: Use image node_id 1 for calling a global function with example usage: exif_size(img) and returns: s