I want to use CoreML for my Xamarin.iOS app but how can I use models? All samples in developer.xamarin is use .mlmodelc but I downloaded .mlmodel. How can I convert to .mlmodelc?
You can use Xcode to compile your model:
xcrun coremlcompiler compile MyModel.mlmodel MyModel.mlmodelc
This outputs an .mlmodelc that you can add to your project.
Or you can do it dynamically inside your app by using MLModel.compileModel(at:)
.
You can also use this command in Mac terminal:
/Applications/Xcode.app/Contents/Developer/usr/bin/coremlc compile coreml.mlmodel
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With