Using image features

If you want to create a Deep Learning model that treats images, you will do a Custom preprocessing on its image_path feature that looks like:

from keras.preprocessing.image import img_to_array, load_img

# Custom image preprocessing function.
# Must return a numpy ndarray representing the image.
#  - image_file is a file like object
def preprocess_image(image_file):
    img = load_img(image_file,target_size=(197, 197, 3))
    array = img_to_array(img)
    array = array / 255
    return array

where we see that the output for an image has a (197, 197, 3) shape. Then, this outptut is sent to a image_path_preprocessed input, so the corresponding input in the model should look like:

input_img = Input(shape=(197, 197, 3), name="image_path_preprocessed")