docstr: Generate crop target and make sure not to crop the polygon
  instances.
  
  Args:
      image (ndarray): The image waited to be crop.
      all_polys (list[list[ndarray]]): All polygons including ground
          truth polygons and ground truth ignored polygons.
      pad_h (int): Padding length of height.
      pad_w (int): Padding length of width.
  Returns:
      h_axis (ndarray): Vertical cropping range.
      w_axis (ndarray): Horizontal cropping range.
docstr_tok: ["Generate","crop","target","and","make","sure","not","to","crop","the","polygon","instances",".","Args",":","image","(","ndarray",")",":","The","image","waited","to","be","crop",".","all_polys","(","list","[","list","[","ndarray","]","]",")",":","All","polygons","including","ground","truth","polygons","and","ground","truth","ignored","polygons",".","pad_h","(","int",")",":","Padding","length","of","height",".","pad_w","(","int",")",":","Padding","length","of","width",".","Returns",":","h_axis","(","ndarray",")",":","Vertical","cropping","range",".","w_axis","(","ndarray",")",":","Horizontal","cropping","range","."]
code: def generate_crop_target(self, image, all_polys, pad_h, pad_w):
      """Generate crop target and make sure not to crop the polygon
      instances.
  
      Args:
          image (ndarray): The image waited to be crop.
          all_polys (list[list[ndarray]]): All polygons including ground
              truth polygons and ground truth ignored polygons.
          pad_h (int): Padding length of height.
          pad_w (int): Padding length of width.
      Returns:
          h_axis (ndarray): Vertical cropping range.
          w_axis (ndarray): Horizontal cropping range.
      """
      h, w, _ = image.shape
      h_array = np.zeros((h + pad_h * 2), dtype=np.int32)
      w_array = np.zeros((w + pad_w * 2), dtype=np.int32)
  
      text_polys = []
      for polygon in all_polys:
          rect = cv2.minAreaRect(
              polygon.astype(np.int32).reshape(-1, 2)
          )
          box = cv2.boxPoints(rect)
          box = np.int64(box)
          text_polys.append([box[0], box[1], box[2], box[3]])
  
      polys = np.array(text_polys, dtype=np.int32)
      for poly in polys:
          poly = np.round(poly, decimals=0).astype(np.int32)
          minx = np.min(poly[:, 0])
          maxx = np.max(poly[:, 0])
          w_array[minx + pad_w : maxx + pad_w] = 1
          miny = np.min(poly[:, 1])
          maxy = np.max(poly[:, 1])
          h_array[miny + pad_h : maxy + pad_h] = 1
  
      h_axis = np.where(h_array == 0)[0]
      w_axis = np.where(w_array == 0)[0]
      return h_axis, w_axis
  
imports: import numpy
  from PIL import Image, ImageDraw
  import cv2
  from shapely.geometry import Polygon
  import math
  from ppocr.utils.poly_nms import poly_intersection
label_desc: Use image node_id 4 for calling the RandomCropFlip obj's underlying member method code with example usage: obj.generate_crop_target(image, all_polys, pad_h, pad_w) and returns: h_axis,  w_axis