class_docstr: Generate the ground truth targets of FCENet: Fourier Contour Embedding
  for Arbitrary-Shaped Text Detection.
  
  [https://arxiv.org/abs/2104.10442]
  
  Args:
      fourier_degree (int): The maximum Fourier transform degree k.
      resample_step (float): The step size for resampling the text center
          line (TCL). It's better not to exceed half of the minimum width.
      center_region_shrink_ratio (float): The shrink ratio of text center
          region.
      level_size_divisors (tuple(int)): The downsample ratio on each level.
      level_proportion_range (tuple(tuple(int))): The range of text sizes
          assigned to each level.
docstr: Generate Fourier coefficient maps.
  
  Args:
      img_size (tuple): The image size of (height, width).
      text_polys (list[list[ndarray]]): The list of text polygons.
  
  Returns:
      fourier_real_map (ndarray): The Fourier coefficient real part maps.
      fourier_image_map (ndarray): The Fourier coefficient image part
          maps.
docstr_tok: ["Generate","Fourier","coefficient","maps",".","Args",":","img_size","(","tuple",")",":","The","image","size","of","(","height",",","width",")",".","text_polys","(","list","[","list","[","ndarray","]","]",")",":","The","list","of","text","polygons",".","Returns",":","fourier_real_map","(","ndarray",")",":","The","Fourier","coefficient","real","part","maps",".","fourier_image_map","(","ndarray",")",":","The","Fourier","coefficient","image","part","maps","."]
code: def generate_fourier_maps(self, img_size, text_polys):
      """Generate Fourier coefficient maps.
  
      Args:
          img_size (tuple): The image size of (height, width).
          text_polys (list[list[ndarray]]): The list of text polygons.
  
      Returns:
          fourier_real_map (ndarray): The Fourier coefficient real part maps.
          fourier_image_map (ndarray): The Fourier coefficient image part
              maps.
      """
  
      assert isinstance(img_size, tuple)
  
      h, w = img_size
      k = self.fourier_degree
      real_map = np.zeros((k * 2 + 1, h, w), dtype=np.float32)
      imag_map = np.zeros((k * 2 + 1, h, w), dtype=np.float32)
  
      for poly in text_polys:
          mask = np.zeros((h, w), dtype=np.uint8)
          polygon = np.array(poly).reshape((1, -1, 2))
          cv2.fillPoly(mask, polygon.astype(np.int32), 1)
          fourier_coeff = self.cal_fourier_signature(polygon[0], k)
          for i in range(-k, k + 1):
              if i != 0:
                  real_map[i + k, :, :] = (
                      mask * fourier_coeff[i + k, 0]
                      + (1 - mask) * real_map[i + k, :, :]
                  )
                  imag_map[i + k, :, :] = (
                      mask * fourier_coeff[i + k, 1]
                      + (1 - mask) * imag_map[i + k, :, :]
                  )
              else:
                  yx = np.argwhere(mask > 0.5)
                  k_ind = np.ones((len(yx)), dtype=np.int64) * k
                  y, x = yx[:, 0], yx[:, 1]
                  real_map[k_ind, y, x] = fourier_coeff[k, 0] - x
                  imag_map[k_ind, y, x] = fourier_coeff[k, 1] - y
  
      return real_map, imag_map
  
imports: import cv2
  import numpy
  from numpy.fft import fft
  from numpy.linalg import norm
  import sys
label_desc: Use image node_id 13 for calling the FCENetTargets obj's underlying member method code with example usage: obj.generate_fourier_maps(img_size, text_polys) and returns: real_map,  imag_map