Every item has 2 T/F questions (one True and one False) - only if these two are both correct, acc_score += 1.
Here is the function that you can use:
from sklearn.metrics import accuracy_score, precision_score, recall_score, confusion_matrix
def process_result(preds, gts):
"""
This func. is working for only one task (items with same labels)
"""
cnt = 0
acc_plus_correct_num = 0
for pred, gt in zip(preds, gts):
if pred == gt:
cnt += 1
if cnt == 2:… See the full description on the dataset page:
https://huggingface.co/datasets/Holmes377/Comprehensive_VQA_MME.