docstr: Generate effective mask by setting the ineffective regions to 0 and
  effective regions to 1.
  
  Args:
      mask_size (tuple): The mask size.
      polygons_ignore (list[[ndarray]]: The list of ignored text
          polygons.
  
  Returns:
      mask (ndarray): The effective mask of (height, width).
docstr_tok: ["Generate","effective","mask","by","setting","the","ineffective","regions","to","0","and","effective","regions","to","1",".","Args",":","mask_size","(","tuple",")",":","The","mask","size",".","polygons_ignore","(","list","[","[","ndarray","]","]",":","The","list","of","ignored","text","polygons",".","Returns",":","mask","(","ndarray",")",":","The","effective","mask","of","(","height",",","width",")","."]
code: def generate_effective_mask(self, mask_size: tuple, polygons_ignore):
      """Generate effective mask by setting the ineffective regions to 0 and
      effective regions to 1.
  
      Args:
          mask_size (tuple): The mask size.
          polygons_ignore (list[[ndarray]]: The list of ignored text
              polygons.
  
      Returns:
          mask (ndarray): The effective mask of (height, width).
      """
      mask = np.ones(mask_size, dtype=np.uint8)
  
      for poly in polygons_ignore:
          instance = poly.astype(np.int32).reshape(1, -1, 2)
          cv2.fillPoly(mask, instance, 0)
  
      return mask
  
imports: import cv2
  import numpy
  from ppocr.utils.utility import check_install
  from numpy.linalg import norm
label_desc: Use image node_id 18 for calling the DRRGTargets obj's underlying member method code with example usage: obj.generate_effective_mask(mask_size, polygons_ignore) and returns: mask