Yolo 11 segmentation on CoreML returns all 0 mask prototypes

I am exporting the Yolo11n-seg model to Core ML. In this format the model seems to lack any post-processing (e.g. NMS). I can live with that, but…

The output of the Core ML model is 2 tensors: var_1366 and p. The latter is supposed to contain the mask prototypes if I understand correctly, but its contents are always all zeroes. Is this a known issue? Any ideas of what I could be doing wrong? (the mask coefficients and the boxes do seem to contain plausible data)

Same issue with yolov8-seg.

Are all the values 0?

Yes, they are all 0. Seems like a bug in the CoreML export to me.

Does the Core ML model work in Ultralytics?

What do you mean? CoreML is an Apple framework, which I use from Swift.

You can load and run CoreML model in Ultralytics (if you have a Mac)

It does work, my mistake (I had a bug in the debug output).

1 Like

Hello!

That’s great to hear, and I’m glad you were able to resolve the issue. Thank you for updating the thread with your findings—it’s very helpful for the community.

Happy coding