code: def __init__(
      self,
      character_dict_path,
      max_text_length,
      max_text_nums,
      tcl_len,
      batch_size=14,
      use_resize=True,
      use_random_crop=False,
      min_crop_size=24,
      min_text_size=4,
      max_text_size=512,
      point_gather_mode=None,
      **kwargs,
  ):
      self.tcl_len = tcl_len
      self.max_text_length = max_text_length
      self.max_text_nums = max_text_nums
      self.batch_size = batch_size
      if use_random_crop is True:
          self.min_crop_size = min_crop_size
          self.use_random_crop = use_random_crop
      self.min_text_size = min_text_size
      self.max_text_size = max_text_size
      self.use_resize = use_resize
      self.point_gather_mode = point_gather_mode
      self.Lexicon_Table = self.get_dict(character_dict_path)
      self.pad_num = len(self.Lexicon_Table)
      self.img_id = 0
  
imports: import math
  import cv2
  import numpy
  from skimage.morphology._skeletonize import thin
  from ppocr.utils.e2e_utils.extract_textpoint_fast import sort_and_expand_with_direction_v2
label_desc: Use image node_id 1 to create a new PGProcessTrain object from inherited base classes: object with example: obj = PGProcessTrain(character_dict_path, max_text_length, max_text_nums, tcl_len, batch_size, use_resize, use_random_crop, min_crop_size, min_text_size, max_text_size, point_gather_mode)