-
-
Save azamsharp/8635f13f339a5ffb120f41521625dce0 to your computer and use it in GitHub Desktop.
Tagging Images
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
import turicreate as tc | |
# load the images | |
data = tc.image_analysis.load_images('images', with_path = True) | |
data['label'] = data['path'].apply(lambda path:'dog' if 'dog' in path else 'cat') | |
print(data.groupby('label',[tc.aggregate.COUNT])) | |
# save the data | |
data.save('cats-dogs.sframe') | |
data.explore() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment