def initialize(self, args):
        """`initialize` is called only once when the model is being loaded.
        Implementing `initialize` function is optional. This function allows
        the model to intialize any state associated with this model.
        Parameters
        ----------
        args : dict
          Both keys and values are strings. The dictionary keys and values are:
          * model_config: A JSON string containing the model configuration
          * model_instance_kind: A string containing model instance kind
          * model_instance_device_id: A string containing model instance device ID
          * model_repository: Model repository path
          * model_version: Model version
          * model_name: Model name
        """
        # You must parse model_config. JSON string is not parsed here
        self.model_config = json.loads(args['model_config'])
        print("model_config:", self.model_config)

        self.input_names = []
        for input_config in self.model_config["input"]:
            self.input_names.append(input_config["name"])
        print("preprocess input names:", self.input_names)

        self.output_names = []
        self.output_dtype = []
        for output_config in self.model_config["output"]:
            self.output_names.append(output_config["name"])
            # dtype = pb_utils.triton_string_to_numpy(output_config["data_type"])
            # self.output_dtype.append(dtype)
            self.output_dtype.append(output_config["data_type"])
        print("preprocess output names:", self.output_names)

        # init PaddleSegPreprocess class
        yaml_path = os.path.abspath(os.path.dirname(__file__)) + "/deploy.yaml"
        self.preprocess_ = fd.vision.segmentation.PaddleSegPreprocessor(
            yaml_path)
        #if args['model_instance_kind'] == 'GPU':
        #    device_id = int(args['model_instance_device_id'])
        #    self.preprocess_.use_gpu(device_id)
`initialize` is called only once when the model is being loaded.
        Implementing `initialize` function is optional. This function allows
        the model to intialize any state associated with this model.
        Parameters
        ----------
        args : dict
          Both keys and values are strings. The dictionary keys and values are:
          * model_config: A JSON string containing the model configuration
          * model_instance_kind: A string containing model instance kind
          * model_instance_device_id: A string containing model instance device ID
          * model_repository: Model repository path
          * model_version: Model version
          * model_name: Model name
        
deploy/fastdeploy/semantic_segmentation/serving/fastdeploy_serving/models/preprocess/1/model.py