ranjaykrishna / visual_genome_python_driver

A python wrapper for the Visual Genome API
MIT License
354 stars 90 forks source link

Unable to find scene_graph.json #27

Open rushyanth7 opened 6 years ago

rushyanth7 commented 6 years ago

I am trying to execute following code but its asking scene_graph.json file. where I can find that file

import visual_genome.local as vg

Convert full .json files to image-specific .jsons, save these to 'data/by-id'.

These files will take up a total ~1.1G space on disk.

vg.save_scene_graphs_by_id(data_dir='data/', image_data_dir='data/by-id/')

Load scene graphs in 'data/by-id', from index 0 to 200.

We'll only keep scene graphs with at least 1 relationship.

scene_graphs = vg.get_scene_graphs(start_index=0, end_index=-1, min_rels=1, data_dir='data/', image_data_dir='data/by-id/')

print len(scene_graphs) 149

print scene_graphs[0].objects [clock, street, shade, man, sneakers, headlight, car, bike, bike, sign, building, ... , street, sidewalk, trees, car, work truck]

NicoliAraujo commented 4 years ago

If you go to https://visualgenome.org/api/v0/api_home.html, you'll see a "Download the scene graphs (739.37 MB)" link. That's the scene graphs json file.