Skip to content
Snippets Groups Projects
Commit 8bb68f57 authored by tgupta6's avatar tgupta6
Browse files

acc vs rarity final version

parent 14290858
No related branches found
No related tags found
No related merge requests found
...@@ -97,7 +97,7 @@ if __name__ == '__main__': ...@@ -97,7 +97,7 @@ if __name__ == '__main__':
'100': 0, '100': 0,
'200': 0, '200': 0,
'500': 0, '500': 0,
'>1000': 0, '>700': 0,
} }
bin_correct = { bin_correct = {
...@@ -107,7 +107,7 @@ if __name__ == '__main__': ...@@ -107,7 +107,7 @@ if __name__ == '__main__':
'100': 0, '100': 0,
'200': 0, '200': 0,
'500': 0, '500': 0,
'>1000': 0, '>700': 0,
} }
for item in val_results: for item in val_results:
...@@ -116,9 +116,9 @@ if __name__ == '__main__': ...@@ -116,9 +116,9 @@ if __name__ == '__main__':
if filter_by_ques_type(vqa_val_anno, str(qid)): if filter_by_ques_type(vqa_val_anno, str(qid)):
rarity = cmp_qa_rarity(vqa_vocab_freq, vqa_val_anno, str(qid)) rarity = cmp_qa_rarity(vqa_vocab_freq, vqa_val_anno, str(qid))
correct = float(vqa_val_anno[str(qid)]['multiple_choice_answer'] == ans) correct = float(vqa_val_anno[str(qid)]['multiple_choice_answer'] == ans)
if rarity > 1000: if rarity > 700:
bin_counts['>1000'] += 1 bin_counts['>700'] += 1
bin_correct['>1000'] += correct bin_correct['>700'] += correct
elif rarity > 500: elif rarity > 500:
bin_counts['500'] += 1 bin_counts['500'] += 1
bin_correct['500'] += correct bin_correct['500'] += correct
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment