scene-graph-TF-release icon indicating copy to clipboard operation
scene-graph-TF-release copied to clipboard

How and where are the frequent objects and relationships selected?

Open wishforgood opened this issue 5 years ago • 3 comments

I wonder from which version of Visual Genome are the frequent objects and relationships selected. Because I counted the occurrences myself but got totally different results as in VG-SGG-dicts.json. For example, for object 'man', I got 88886 instances from Visual Genome V1.0, rather than 54659. I tried all the three versions of the dataset, but fail to get a same result with VG-SGG-dicts.json.

wishforgood avatar Nov 05 '19 07:11 wishforgood

import json
import os
from collections import Counter

work_dir = 'C:/Users/Admin/Downloads'
object_list = open('object_list.txt', 'r')
object_list = object_list.readlines()
for idx, line in enumerate(object_list):
    object_list[idx] = object_list[idx].strip('\n')
name_counter = Counter()
with open(os.path.join(work_dir, 'objects_v1.json/objects.json')) as f:
    objects = json.load(f)
for image in objects:
    for object_ in image['objects']:
        for name in object_['names']:
            if name in object_list:
                name_counter.update([name])

wishforgood avatar Nov 05 '19 07:11 wishforgood

Here are my codes to count the objects.

wishforgood avatar Nov 05 '19 07:11 wishforgood

Can you generate proposals.h5 corresponding to the small data set? Please tell me how to generate it if you can. Thank you very much.

L6-hong avatar Oct 30 '20 13:10 L6-hong