code: def __call__(self, data):
      im = data["image"]
      text_polys = data["polys"]
      text_tags = data["ignore_tags"]
      if im is None:
          return None
      if text_polys.shape[0] == 0:
          return None
  
      # add rotate cases
      if np.random.rand() < 0.5:
          im, text_polys = self.rotate_im_poly(im, text_polys)
      h, w, _ = im.shape
      text_polys, text_tags = self.check_and_validate_polys(
          text_polys, text_tags, h, w
      )
      if text_polys.shape[0] == 0:
          return None
  
      # random scale this image
      rd_scale = np.random.choice(self.random_scale)
      im = cv2.resize(im, dsize=None, fx=rd_scale, fy=rd_scale)
      text_polys *= rd_scale
      if np.random.rand() < self.background_ratio:
          outs = self.crop_background_infor(im, text_polys, text_tags)
      else:
          outs = self.crop_foreground_infor(im, text_polys, text_tags)
  
      if outs is None:
          return None
      im, score_map, geo_map, training_mask = outs
      score_map = score_map[np.newaxis, ::4, ::4].astype(np.float32)
      geo_map = np.swapaxes(geo_map, 1, 2)
      geo_map = np.swapaxes(geo_map, 1, 0)
      geo_map = geo_map[:, ::4, ::4].astype(np.float32)
      training_mask = training_mask[np.newaxis, ::4, ::4]
      training_mask = training_mask.astype(np.float32)
  
      data["image"] = im[0]
      data["score_map"] = score_map
      data["geo_map"] = geo_map
      data["training_mask"] = training_mask
      return data
  
file_path: PaddleOCR/ppocr/data/imaug/east_process.py
imports: import math
  import cv2
  import numpy
  import json
  import sys
  import os
label_desc: Use image node_id 12 for calling the EASTProcessTrain obj's underlying member method code with example usage: obj.__call__(data) and returns: data, None, None, None, None