coremltools icon indicating copy to clipboard operation
coremltools copied to clipboard

How to append additional layers on the top or warp the input(MLMultiArray) to Image existing Core ML model?

Open tucan9389 opened this issue 3 years ago • 1 comments

❓Question

I have a Core ML model that was created by GCP's AutoML. But the model's input, output specification are just MultiArray type.

Screen Shot 2022-09-08 at 11 25 09 AM

I'd like to wrap the input type as Image, output as the following:

image source: https://stackoverflow.com/questions/59494249/the-model-does-not-have-a-valid-input-feature-of-type-image-create-ml

Is there any guideline or example python script to append and wrap the input/output layer to the existing Core ML model?

Thank you :)

tucan9389 avatar Sep 08 '22 02:09 tucan9389

Core ML models are not really designed to be modified after they have been created. It's going to be easier to make the modification to your original model before you convert it to Core ML.

Are you using TensorFlow? If you are, then modify your TensorFlow model to accept an image, before you convert that model to Core ML.

TobyRoseman avatar Sep 08 '22 19:09 TobyRoseman