0
votes

I just trained a sklearn model and converted it into CoreML. The problem is, I am using an image as the input to this model. However, what the model is asking for is a MultiArray (which is MLMultiArray). From this question I can see that there is a parameter for coremltools that can let you specify that the input is an image. But that parameter is for converting a Keras model, and in sklearn converting tool this option doesn't exist.

The question is, how do I convert my UIImage to the MLMultiArray required by the model. (or even better, how can I enable image for the model)

1

1 Answers

0
votes

You can convert your UIImage to byte values and then load those bytes into an MLMultiArray. The question is: what shape is the MLMultiArray and what range should its values be in?