简体   繁体   中英

Using an MLMultiArray as an Output of a CoreML model

I trained a YOLOv3-SPP model using PyTorch. I then saved the model in onnx format and then converted my onnx model to CoreML using onnx-coreml. I cannot seem to figure out how to use my model since the outputs are MLMultiArrays.

This is what my outputs look like:

在此处输入图片说明

I am new to Machine Learning and don't know where to begin when it comes to trying to use this model. I don't know what information each MultiArray contains and cannot figure out how to access it. Given that my model is an object detector trained on 3 classes, can anyone tell me what information each MultiArray holds and how I can get access to it? Some sample code with explanation would go a long way. If anybody knows of any Github project that I can simply drop this model into to test it, that would also work.

You need to decode the outputs from the model into bounding boxes etc, just like the PyTorch model does. Not everything the PyTorch code does is part of the Core ML model.

It's too much work to explain this on StackOverflow but I've written extensively about this on my blog: https://machinethink.net/blog/

In particular,

YOLOv3-SPP is different in the details but this should get you started.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM