From 563237d5fde2ec56b6d24f908cb2cd9328abf7c4 Mon Sep 17 00:00:00 2001 From: vetterjn <25137666+vetterjn@users.noreply.github.com> Date: Wed, 11 Dec 2019 10:47:08 +0100 Subject: [PATCH] Update build_vqa_inputs.py --- utils/build_vqa_inputs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/build_vqa_inputs.py b/utils/build_vqa_inputs.py index b585ee0..43cceb3 100644 --- a/utils/build_vqa_inputs.py +++ b/utils/build_vqa_inputs.py @@ -37,7 +37,7 @@ def vqa_processing(image_dir, annotation_file, question_file, valid_answer_set, image_name = image_name_template % image_id image_path = os.path.join(abs_image_dir, image_name+'.jpg') question_str = q['question'] - question_tokens = text_processing.tokenize(question_str) + question_tokens = text_helper.tokenize(question_str) iminfo = dict(image_name=image_name, image_path=image_path, @@ -66,7 +66,7 @@ def main(args): question_file = args.input_dir+'/Questions/v2_OpenEnded_mscoco_%s_questions.json' vocab_answer_file = args.output_dir+'/vocab_answers.txt' - answer_dict = text_processing.VocabDict(vocab_answer_file) + answer_dict = text_helper.VocabDict(vocab_answer_file) valid_answer_set = set(answer_dict.word_list) train = vqa_processing(image_dir, annotation_file, question_file, valid_answer_set, 'train2014')