August 2018
Intermediate to advanced
438 pages
12h 3m
English
We took several images from Flickr that focus on a wide variety of outdoor scenes and used both our image captioning models to generate captions for each image, which is depicted as follows:
# load files import glob outdoor1_files = glob.glob('real_test/outdoor1/*') # initialize caption generators and generate captions cg1 = CaptionGenerator(image_locations=outdoor1_files, word_to_index_map=word_to_index, index_to_word_map=index_to_word, max_caption_size=max_caption_size, caption_model=model1, beam_size=3) cg2 = CaptionGenerator(image_locations=outdoor1_files, word_to_index_map=word_to_index, index_to_word_map=index_to_word, max_caption_size=max_caption_size, caption_model=model2, beam_size=3) ...Read now
Unlock full access