code: def __call__(self, data):
      img = data["image"]
      text_polys = data["polys"]
      ignore_tags = data["ignore_tags"]
  
      canvas = np.zeros(img.shape[:2], dtype=np.float32)
      mask = np.zeros(img.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/ppocr/data/imaug/make_border_map.py
imports: from __future__ import absolute_import
  from __future__ import division
  from __future__ import print_function
  from __future__ import unicode_literals
  import numpy
  import cv2
  import pyclipper
  from shapely.geometry import Polygon
  import sys
  import warnings
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