【发布时间】:2021-07-22 17:46:02
【问题描述】:
我将 deelplab v3 模型从 Pytorch 转换为 coreml,并将输出视为 MultiArray,因此我需要将输出转换为图像。我一直在使用许多不同的建议(例如来自 coreml 生存指南),但仍然没有成功。你们有人能帮我吗?非常感谢。
仅供参考,这是 Python 的模型规范:
spec desc is
input {
name: "input.1"
type {
imageType {
width: 513
height: 513
colorSpace: RGB
}
}
}
output {
name: "1436"
type {
multiArrayType {
dataType: FLOAT32
}
}
}
在Xcode中,我在Xcode中打印的输出是“Float32 1 × 14 × 513 × 513 array”,我假设1是通道数,14是标签数,513 x 514是Width x 高度。如何将此数组转换为 Int32 513 × 513 矩阵或图像?
感谢您的帮助!
已编辑:我在下面添加了我的模型输出结构与 Apple 的 DeeplabV3(通过 Netron 可视化)进行比较,供您参考。任何指导表示赞赏! 1/My model output's architecture
【问题讨论】:
标签: pytorch type-conversion coreml