Skip to content

Instantly share code, notes, and snippets.

@tomas-wood
Created September 25, 2018 22:48
Show Gist options
  • Select an option

  • Save tomas-wood/f822effc84291ecc855207be22bf84f9 to your computer and use it in GitHub Desktop.

Select an option

Save tomas-wood/f822effc84291ecc855207be22bf84f9 to your computer and use it in GitHub Desktop.
get visual genome data
def fetch_data():
urls = [
"https://visualgenome.org/static/data/dataset/objects.json.zip",
"https://visualgenome.org/static/data/dataset/relationships.json.zip",
"https://visualgenome.org/static/data/dataset/object_alias.txt",
"https://visualgenome.org/static/data/dataset/relationship_alias.txt"
]
if not os.path.exists('data'):
os.mkdir('data')
else:
return
os.chdir('data')
for url in urls:
wget.download(url)
os.chdir('..')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment