VQA-CP
下载链接
问题类型:65个类别
- Yes/No
- Num
- other
答案:如上总体分为3个类别,共有2274
图像:每张图片的36个区域的2048维的特征向量。
FIELDNAMES = [‘image_id’, ‘image_w’,‘image_h’,‘num_boxes’, ‘boxes’, ‘features’]
其中item[‘boxes’]为对应检测框的位置信息 x,y,w,h
item['‘boxes’].shape=(num_boxes,4)
item[‘features’]为对应检测框 在pool5_flat 层的特征
item[‘features’].shape=(num_boxes, feature_dim)
item[‘num_boxes’] 为该张图片对应的检测框数目
文件详细说明:
question.json
字典{"描述信息":"...", "questions":[{"image_id":22222, "question":"Is", "question_id":222334}]}
用法:
annotations.json
"字典"{"描述信息":"...", "annotations":[{"question_type":"what is this", "multiple_choice_answer":"net", "answers":[{"answer":"net", "answer_confidence":"yes", "answer_id":1-10}], "image_id":2222, "answer_type":"other", "question_id":2222222}]
dictionary.pkl [self.word2idx, self.idx2word]
glove6b_init_300.npy 权重代表dictionary中单词下标对应的向量表示。注意:如果单词不在glove中,会赋值为0。
ans2label.pkl
label2ans.pkl
target.pkl
target = [{
'question_id': ans_entry['question_id'],
'question_type': ans_entry['question_type'],
'image_id': ans_entry['image_id'],
'label_counts': label_counts,
'labels': labels,
'scores': scores
}]
scores 是通过每个answer的数量计算得分,注意得分计算时只在每个"answer_id":1-10中计算,即每个问题单独计算。labels代表该问题每个答案对应的下标,scores代表labels对应答案的得分。
scores计算公式为
答案分布
排序前
排序后