code: def __init__(self):
      from six import text_type as _text_type
  
      parser = argparse.ArgumentParser()
  
      parser.add_argument(
          "-p",
          "--preprocess",
          type=_text_type,
          help="Model Preprocess Type",
      )
  
      parser.add_argument(
          "--model",
          "-n",
          "-w",
          type=_text_type,
          required=True,
          help="CoreML Model path.",
      )
  
      parser.add_argument(
          "-s",
          type=_text_type,
          help="Source Framework Type",
          choices=self.truth.keys(),
      )
  
      parser.add_argument(
          "--image",
          "-i",
          type=_text_type,
          help="Test image path.",
          default="mmdnn/conversion/examples/data/seagull.jpg",
      )
  
      parser.add_argument(
          "-input",
          type=_text_type,
          required=True,
          help="CoreML Input Node",
      )
  
      parser.add_argument(
          "-output",
          type=_text_type,
          required=True,
          help="CoreML Output Node",
      )
  
      parser.add_argument(
          "-size", type=int, default=224, help="CoreML Input Image Size"
      )
  
      self.args = parser.parse_args()
  
      print("Loading model [{}].".format(self.args.model))
  
      self.model = coremltools.models.MLModel(self.args.model.encode())
  
      print("Model loading success.")
  
file_path: MMdnn/mmdnn/conversion/examples/coreml/imagenet_test.py
imports: import argparse
  import numpy
  import sys
  import os
  from mmdnn.conversion.examples.imagenet_test import TestKit
  import coremltools
label_desc: Use image node_id 1 to create a new TestCoreML object from inherited base classes: TestKit with example: obj = TestCoreML()