update print in parse_test_res.py

pull/462/head^2
kaiyangzhou 2021-04-28 16:54:06 +08:00
parent b882bc8a09
commit 45cf03b65e
1 changed files with 3 additions and 1 deletions

View File

@ -81,13 +81,15 @@ def main(args):
fullpath = os.path.join(args.directory, directory)
filepath = glob.glob(os.path.join(fullpath, 'test.log*'))[0]
check_isfile(filepath)
print(f'Parsing {filepath}')
res = parse_file(
filepath, regex_mAP, regex_r1, regex_r5, regex_r10, regex_r20
)
for key, value in res.items():
final_res[key].append(value)
print(f'* Average results over {num_dirs} splits')
print('Finished parsing')
print(f'The average results over {num_dirs} splits are shown below')
for key, values in final_res.items():
mean_val = np.mean(values)