上QQ阅读APP看书,第一时间看更新
Converting your own model into a Core ML model
Convert your existing model into a Core ML model can be done through the coremltools Python package. If you want to convert a simple Caffe model to a Core ML model, it can be done with the following example:
import coremltools
my_coremlmodel =
coremltools.converters.caffe.convert('faces.caffemodel')
coremltools.utils.save_spec(my_coremlmodel, 'faces.mlmodel')
This conversion step varies between different models. You may need to add labels and input names, as well as the structure of the model.