docstr: 对图片和文本框进行缩放
  :param data: {'img':,'text_polys':,'texts':,'ignore_tags':}
  :return:
docstr_tok: ["\u5bf9\u56fe\u7247\u548c\u6587\u672c\u6846\u8fdb\u884c\u7f29\u653e",":","param","data",":","{","'img","'",":",",'text_polys","'",":",",'texts","'",":",",'ignore_tags","'",":","}",":","return",":"]
code: def __call__(self, data: dict) -> dict:
      """
      对图片和文本框进行缩放
      :param data: {'img':,'text_polys':,'texts':,'ignore_tags':}
      :return:
      """
      im = data["img"]
      text_polys = data["text_polys"]
  
      h, w, _ = im.shape
      short_edge = min(h, w)
      if short_edge < self.short_size:
          # 保证短边 >= short_size
          scale = self.short_size / short_edge
          im = cv2.resize(im, dsize=None, fx=scale, fy=scale)
          scale = (scale, scale)
          # im, scale = resize_image(im, self.short_size)
          if self.resize_text_polys:
              # text_polys *= scale
              text_polys[:, 0] *= scale[0]
              text_polys[:, 1] *= scale[1]
  
      data["img"] = im
      data["text_polys"] = text_polys
      return data
  
imports: import math
  import numbers
  import random
  import cv2
  import numpy
  from skimage.util import random_noise
label_desc: Use image node_id 2 for calling the ResizeShortSize obj's underlying member method code with example usage: obj.__call__(data) and returns: data