code: def load_image(self, index):
      # loads 1 image from dataset, returns img, original hw, resized hw
      img = self.imgs[index]
      if img is None:  # not cached
          path = self.img_files[index]
          img = cv2.imread(path)  # BGR
          assert img is not None, "Image Not Found " + path
          h0, w0 = img.shape[:2]  # orig hw
          # img_size 设置的是预处理后输出的图片尺寸
          r = self.img_size / max(h0, w0)  # resize image to img_size
          if r != 1:  # if sizes are not equal
              interp = (
                  cv2.INTER_AREA
                  if r < 1 and not self.augment
                  else cv2.INTER_LINEAR
              )
              img = cv2.resize(
                  img, (int(w0 * r), int(h0 * r)), interpolation=interp
              )
          return (
              img,
              (h0, w0),
              img.shape[:2],
          )  # img, hw_original, hw_resized
      else:
          return (
              self.imgs[index],
              self.img_hw0[index],
              self.img_hw[index],
          )
  
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 2 for calling a global function with example usage: load_image(index) and returns: img,  h0,  w0,  img, self,  self,  self