dlpy.image_captioning.create_captioning_table

dlpy.image_captioning.create_captioning_table(conn, image_table, features_model, captions_file, obj_detect_model=None, word_embeddings_file=None, num_captions=5, dense_layer='fc7', captions_delimiter='\t', caption_col_name='Var', embeddings_delimiter='\t', n_threads=None, gpu=None)

Builds CASTable with all necessary info to train an image captioning model

Parameters
connCAS

Specifies the CAS connection object.

image_table: imageTable

Specifies name of CASTable that contains images to be used for training

features_modeldlpy Model object

Specifies CNN model to use for extracting features

captions_filestring

Specifies absolute path to file containing image filenames and captions Client should have access to this file.

obj_detect_modelCASTable or string, optional

Specifies CASTable containing model parameters for the object detection model Default : None

word_embeddings_filestring, optional

Specifies full path to file containing pre-trained word vectors to be used for text generation. This file should be accessible from the client. Required if obj_detect_model is not None Default : None

num_captionsint, optional

Specifies number of captions for each image in the captions file Default : 5

dense_layer: string, optional

Specifies layer from CNN model to extract features from Default : ‘fc7’

captions_delimiterstring, optional

Specifies delimiter between filenames and captions in the image captions text file Default : ‘ ‘

caption_col_namestring, optional

Specifies base name for column names for the columns containing captions Default : ‘Var’

embeddings_delimiterstring, optional

Specifies delimiter used in word embeddings file Default : ‘ ‘

n_threadsint, optional

Specifies the number of threads to use when scoring the table. All cores available used when nothing is set. Default : None

gpuGpu, optional

When specified, specifies which gpu to use when scoring the table. GPU=1 uses all available GPU devices and default parameters. Default : None

Returns
CASTable