Created
June 19, 2017 22:16
-
-
Save gaelfoppolo/f16998ede7c1c2bd03284d77fb42c03f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import coremltools | |
caffe_model = ('oxford102.caffemodel', 'deploy.prototxt') | |
labels = 'list.txt' | |
coreml_model = coremltools.converters.caffe.convert( | |
caffe_model, | |
class_labels=labels, | |
image_input_names='data' | |
) | |
coreml_model.author = 'Gael Foppolo' | |
coreml_model.license = 'MIT' | |
coreml_model.short_description = "Guess the flower type" | |
coreml_model.input_description['data'] = 'Input image to be classified' | |
coreml_model.output_description['prob'] = 'Probability of each flower' | |
coreml_model.output_description['classLabel'] = 'Most likely flower on the image' | |
coreml_model.save('FlowerClassifier.mlmodel') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment