This file contains hidden or 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
# Creating a model with TuriCreate | |
import turicreate as tc | |
data = tc.image_analysis.load_images('image/train', with_path=True) | |
data['label'] = data['path'].apply(lambda path: 'healthy' if '/healthy' in path else 'fast food') | |
model = tc.image_classifier.create(data, target='label') | |
model.save("LunchImageClassifier.model") | |
model.export_coreml('LunchImageClassifier.mlmodel') |