code: def __init__(self, seg_config, seg_model):
      self.seg_config = seg_config
      self.model = seg_config.model
      self.model_path = seg_model
      self.transforms = Compose(seg_config.val_transforms)
      utils.utils.load_entire_model(self.model, self.model_path)
      self.model.eval()
  
file_path: PaddleSeg/contrib/QualityInspector/qinspector/seg/engine/predictor.py
imports: import numpy
  import cv2
  import paddle
  from paddleseg import utils
  from paddleseg.core import infer
  from paddleseg.core.predict import partition_list
  from paddleseg.transforms import Compose
  from paddleseg.utils import progbar
  from qinspector.utils.logger import setup_logger
label_desc: Use image node_id 1 to create a new SegPredictor object from inherited base classes: object with example: obj = SegPredictor(seg_config, seg_model)