class_docstr: Text recognition packer with image cropper. It is used to pack the
  parsed annotation info and crop out the word images from the full-size
  ones.
  
  Args:
      crop_with_warp (bool): Whether to crop the text from the original
          image using opencv warpPerspective.
      jitter (bool): (Applicable when crop_with_warp=True)
          Whether to jitter the box.
      jitter_ratio_x (float): (Applicable when crop_with_warp=True)
          Horizontal jitter ratio relative to the height.
      jitter_ratio_y (float): (Applicable when crop_with_warp=True)
          Vertical jitter ratio relative to the height.
      long_edge_pad_ratio (float): (Applicable when crop_with_warp=False)
          The ratio of padding the long edge of the cropped image.
          Defaults to 0.1.
      short_edge_pad_ratio (float): (Applicable when crop_with_warp=False)
          The ratio of padding the short edge of the cropped image.
          Defaults to 0.05.
code: def __init__(
      self,
      crop_with_warp: bool = False,
      jitter: bool = False,
      jitter_ratio_x: float = 0.0,
      jitter_ratio_y: float = 0.0,
      long_edge_pad_ratio: float = 0.0,
      short_edge_pad_ratio: float = 0.0,
      **kwargs,
  ):
      super().__init__(**kwargs)
      self.crop_with_warp = crop_with_warp
      self.jitter = jitter
      self.jrx = jitter_ratio_x
      self.jry = jitter_ratio_y
      self.lepr = long_edge_pad_ratio
      self.sepr = short_edge_pad_ratio
      # Crop converter crops the images of textdet to patches
      self.cropped_img_dir = "textrecog_imgs"
      self.crop_save_path = osp.join(
          self.data_root, self.cropped_img_dir
      )
      mkdir_or_exist(self.crop_save_path)
      mkdir_or_exist(osp.join(self.crop_save_path, self.split))
  
file_path: mmocr/mmocr/datasets/preparers/packers/textrecog_packer.py
imports: import os.path
  from typing import Dict, List, Tuple
  import mmcv
  from mmengine import mkdir_or_exist
  from mmocr.registry import DATA_PACKERS
  from mmocr.utils import bbox2poly, crop_img, poly2bbox, warp_img
  from .base import BasePacker
label_desc: Use image node_id 1 to create a new TextRecogCropPacker object from inherited base classes: TextRecogPacker with example: obj = TextRecogCropPacker(crop_with_warp, jitter, jitter_ratio_x, jitter_ratio_y, long_edge_pad_ratio, short_edge_pad_ratio)