code: def __init__(
      self,
      data_path: str,
      img_mode,
      pre_processes,
      filter_keys,
      transform=None,
      **kwargs,
  ):
      self.transform = transform
      self.dataRoot = pathlib.Path(data_path)
      if not self.dataRoot.exists():
          raise FileNotFoundError("Dataset folder is not exist.")
  
      self.targetFilePath = self.dataRoot / "gt.mat"
      if not self.targetFilePath.exists():
          raise FileExistsError("Target file is not exist.")
      targets = {}
      sio.loadmat(
          self.targetFilePath,
          targets,
          squeeze_me=True,
          struct_as_record=False,
          variable_names=["imnames", "wordBB", "txt"],
      )
  
      self.imageNames = targets["imnames"]
      self.wordBBoxes = targets["wordBB"]
      self.transcripts = targets["txt"]
      super().__init__(
          data_path, img_mode, pre_processes, filter_keys, transform
      )
  
imports: import pathlib
  import os
  import cv2
  import numpy
  import scipy.io
  from tqdm.auto import tqdm
  from base import BaseDataSet
  from utils import order_points_clockwise, get_datalist, load, expand_polygon
label_desc: Use image node_id 1 to create a new SynthTextDataset object from inherited base classes: BaseDataSet with example: obj = SynthTextDataset(data_path, img_mode, pre_processes, filter_keys, transform)