-
-
Save anupamchugh/8852fce58e91d5faf687b73443d5ac47 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 | |
output_labels = ['Cat', 'Dog'] | |
coreml_model = coremltools.converters.keras.convert('model.h5', input_names=['image'], output_names=['output'], | |
class_labels=output_labels, | |
image_input_names='image') | |
coreml_model.author = 'Anupam Chugh' | |
coreml_model.short_description = 'Cat Dog Classifier converted from a Keras model' | |
coreml_model.input_description['image'] = 'Takes as input an image' | |
coreml_model.output_description['output'] = 'Prediction as cat or dog' | |
coreml_model.output_description['classLabel'] = 'Returns Cat Or Dog as class label' | |
coreml_model.save('catdogclassifier.mlmodel') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment