Last active
December 14, 2020 16:05
-
-
Save jacKlinc/9b75da33ec9ccf55b02eeed91605b719 to your computer and use it in GitHub Desktop.
Image Data Curation
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
def make_category(cat, path, label): | |
if not path.exists(): | |
path.mkdir() | |
dest = (path/label) | |
dest.mkdir(exist_ok=True) | |
results = search_images_bing(key, cat) | |
download_images(dest, urls=results.attrgot('contentUrl')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment