input_shape = [int(x) for x in args.input_shape] #模型输入尺寸 img_path = args.img_path onnx_path = args.onnx_path print("image path:",img_path) print("onnx model path:",onnx_path)
data_input = process_image(img_path,input_shape) session = onnxruntime.InferenceSession(onnx_path) inname = [input.name forinputin session.get_inputs()] outname = [output.name for output in session.get_outputs()]