File size: 444 Bytes
92e0882 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import json
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('name', type=str, default='refcoco_val')
args = parser.parse_args()
name = args.name
print(name)
count = 0
all_count = 0
for i in range(8):
pth = f'output/{name}_count_{i}.json'
acc = json.load(open(pth, 'r'))
a_list = acc.split()
a, b = a_list[0], a_list[1]
count += int(a)
all_count += int(b)
print(float(count) / float(all_count)) |