docstr: 从scales中随机选择一个尺度，对图片和文本框进行缩放
  :param data: {'img':,'text_polys':,'texts':,'ignore_tags':}
  :return:
docstr_tok: ["\u4ecescales\u4e2d\u968f\u673a\u9009\u62e9\u4e00\u4e2a\u5c3a\u5ea6\uff0c\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:
      """
      从scales中随机选择一个尺度，对图片和文本框进行缩放
      :param data: {'img':,'text_polys':,'texts':,'ignore_tags':}
      :return:
      """
      im = data["img"]
      text_polys = data["text_polys"]
      ignore_tags = data["ignore_tags"]
  
      canvas = np.zeros(im.shape[:2], dtype=np.float32)
      mask = np.zeros(im.shape[:2], dtype=np.float32)
  
      for i in range(len(text_polys)):
          if ignore_tags[i]:
              continue
          self.draw_border_map(text_polys[i], canvas, mask=mask)
      canvas = (
          canvas * (self.thresh_max - self.thresh_min) + self.thresh_min
      )
  
      data["threshold_map"] = canvas
      data["threshold_mask"] = mask
      return data
  
file_path: PaddleOCR/benchmark/PaddleOCR_DBNet/data_loader/modules/make_border_map.py
imports: import cv2
  import numpy
  import pyclipper
  from shapely.geometry import Polygon
label_desc: Use image node_id 2 for calling the MakeBorderMap obj's underlying member method code with example usage: obj.__call__(data) and returns: data