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 text center region mask.
  
  Args:
      img_size (tuple): The image size of (height, width).
      text_polys (list[list[ndarray]]): The list of text polygons.
  
  Returns:
      center_region_mask (ndarray): The text center region mask.
docstr_tok: ["Generate","text","center","region","mask",".","Args",":","img_size","(","tuple",")",":","The","image","size","of","(","height",",","width",")",".","text_polys","(","list","[","list","[","ndarray","]","]",")",":","The","list","of","text","polygons",".","Returns",":","center_region_mask","(","ndarray",")",":","The","text","center","region","mask","."]
code: def generate_center_region_mask(self, img_size, text_polys):
      """Generate text center region mask.
  
      Args:
          img_size (tuple): The image size of (height, width).
          text_polys (list[list[ndarray]]): The list of text polygons.
  
      Returns:
          center_region_mask (ndarray): The text center region mask.
      """
  
      assert isinstance(img_size, tuple)
      # assert check_argument.is_2dlist(text_polys)
  
      h, w = img_size
  
      center_region_mask = np.zeros((h, w), np.uint8)
  
      center_region_boxes = []
      for poly in text_polys:
          # assert len(poly) == 1
          polygon_points = poly.reshape(-1, 2)
          _, _, top_line, bot_line = self.reorder_poly_edge(
              polygon_points
          )
          (
              resampled_top_line,
              resampled_bot_line,
          ) = self.resample_sidelines(
              top_line, bot_line, self.resample_step
          )
          resampled_bot_line = resampled_bot_line[::-1]
          if len(resampled_top_line) != len(resampled_bot_line):
              continue
          center_line = (resampled_top_line + resampled_bot_line) / 2
  
          line_head_shrink_len = (
              norm(resampled_top_line[0] - resampled_bot_line[0]) / 4.0
          )
          line_tail_shrink_len = (
              norm(resampled_top_line[-1] - resampled_bot_line[-1])
              / 4.0
          )
          head_shrink_num = int(
              line_head_shrink_len // self.resample_step
          )
          tail_shrink_num = int(
              line_tail_shrink_len // self.resample_step
          )
          if len(center_line) > head_shrink_num + tail_shrink_num + 2:
              center_line = center_line[
                  head_shrink_num : len(center_line) - tail_shrink_num
              ]
              resampled_top_line = resampled_top_line[
                  head_shrink_num : len(resampled_top_line)
                  - tail_shrink_num
              ]
              resampled_bot_line = resampled_bot_line[
                  head_shrink_num : len(resampled_bot_line)
                  - tail_shrink_num
              ]
  
          for i in range(0, len(center_line) - 1):
              tl = (
                  center_line[i]
                  + (resampled_top_line[i] - center_line[i])
                  * self.center_region_shrink_ratio
              )
              tr = (
                  center_line[i + 1]
                  + (resampled_top_line[i + 1] - center_line[i + 1])
                  * self.center_region_shrink_ratio
              )
              br = (
                  center_line[i + 1]
                  + (resampled_bot_line[i + 1] - center_line[i + 1])
                  * self.center_region_shrink_ratio
              )
              bl = (
                  center_line[i]
                  + (resampled_bot_line[i] - center_line[i])
                  * self.center_region_shrink_ratio
              )
              current_center_box = np.vstack([tl, tr, br, bl]).astype(
                  np.int32
              )
              center_region_boxes.append(current_center_box)
  
      cv2.fillPoly(center_region_mask, center_region_boxes, 1)
      return center_region_mask
  
imports: import cv2
  import numpy
  from numpy.fft import fft
  from numpy.linalg import norm
  import sys
label_desc: Use image node_id 7 for calling the FCENetTargets obj's underlying member method code with example usage: obj.generate_center_region_mask(img_size, text_polys) and returns: center_region_mask