code: def __init__(self, args):
      self.mode = args.mode
      self.recovery = args.recovery
  
      self.image_orientation_predictor = None
      if args.image_orientation:
          import paddleclas
  
          self.image_orientation_predictor = paddleclas.PaddleClas(
              model_name="text_image_orientation"
          )
  
      if self.mode == "structure":
          if not args.show_log:
              logger.setLevel(logging.INFO)
          if args.layout == False and args.ocr == True:
              args.ocr = False
              logger.warning(
                  "When args.layout is false, args.ocr is automatically set to false"
              )
          args.drop_score = 0
          # init model
          self.layout_predictor = None
          self.text_system = None
          self.table_system = None
          if args.layout:
              self.layout_predictor = LayoutPredictor(args)
              if args.ocr:
                  self.text_system = TextSystem(args)
          if args.table:
              if self.text_system is not None:
                  self.table_system = TableSystem(
                      args,
                      self.text_system.text_detector,
                      self.text_system.text_recognizer,
                  )
              else:
                  self.table_system = TableSystem(args)
  
      elif self.mode == "kie":
          from ppstructure.kie.predict_kie_token_ser_re import (
              SerRePredictor,
          )
  
          self.kie_predictor = SerRePredictor(args)
  
imports: import os
  import sys
  import subprocess
  import cv2
  import json
  import numpy
  import time
  import logging
  from copy import deepcopy
  from ppocr.utils.utility import get_image_file_list, check_and_read
  from ppocr.utils.logging import get_logger
  from ppocr.utils.visual import draw_ser_results, draw_re_results
  from tools.infer.predict_system import TextSystem
  from ppstructure.layout.predict_layout import LayoutPredictor
  from ppstructure.table.predict_table import TableSystem, to_excel
  from ppstructure.utility import parse_args, draw_structure_result
label_desc: Use image node_id 1 to create a new StructureSystem object from inherited base classes: object with example: obj = StructureSystem(args)