一、目标
本文主要介绍要将原始yolov5分割的输出掩膜从[b,c,h,.w]修改为[b, h, w, c]
原来的:
目标的:
代码如下:
'''
Descripttion:
version:
@Company: WT-XM
Author: yang jinyi
Date: 2023-09-08 11:26:28
LastEditors: yang jinyi
LastEditTime: 2023-09-08 11:48:01
'''
import onnx
import onnxruntime as ort
# 加载 ONNX 模型
model_path = "./model/OutputModel_no_jm.onnx"
model = onnx.load(model_path)
#print(model.graph.output[1])
origin_model_c = model.graph.output[1].type.tensor_type.s