code: def __init__(self, cfg):
      config = ConfigParser(cfg)
      config.print_cfg()
      self.model_cfg, self.env_cfg = config.parse()
      self.modules = Builder(self.model_cfg, self.env_cfg)
      self.output_dir = self.env_cfg.get("output_dir", "output")
      if not osp.exists(self.output_dir):
          os.makedirs(self.output_dir)
      self.visualize = self.env_cfg.get("visualize", False)
      self.save = self.env_cfg.get("save", False)
  
file_path: PaddleSeg/contrib/QualityInspector/qinspector/apis/pipeline.py
imports: import glob
  import json
  import os
  import os.path
  from qinspector.cvlib.configs import ConfigParser
  from qinspector.cvlib.framework import Builder
  from qinspector.utils.logger import setup_logger
  from qinspector.utils.visualizer import show_result
label_desc: Use image node_id 1 to create a new Pipeline object from inherited base classes: object with example: obj = Pipeline(cfg)