docstr: Prepare for prediction.
  The usage and docs of paddle inference, please refer to
  https://paddleinference.paddlepaddle.org.cn/product_introduction/summary.html
docstr_tok: ["Prepare","for","prediction",".","The","usage","and","docs","of","paddle","inference",",","please","refer","to","https",":","\/\/paddleinference.paddlepaddle.org.cn\/product_introduction\/summary.html"]
code: def __init__(self, args):
      """
      Prepare for prediction.
      The usage and docs of paddle inference, please refer to
      https://paddleinference.paddlepaddle.org.cn/product_introduction/summary.html
      """
      self.args = args
      self.cfg = DeployConfig(args.cfg)
  
      self._init_base_config()
      self._init_cpu_config()
  
      self.predictor = create_predictor(self.pred_cfg)
  
imports: import argparse
  import codecs
  import os
  import sys
  import cv2
  import yaml
  import numpy
  import paddle
  from paddle.inference import create_predictor, PrecisionType
  from paddle.inference import Config
  from paddleseg.cvlibs import manager
  from paddleseg.utils import get_sys_env, logger, get_image_list
  from third_party import tusimple_processor
  import paddleseg.transforms.transforms
label_desc: Use image node_id 1 to create a new Predictor object  with example: obj = Predictor(args)