def extract_features_from_image()

in datasets.py [0:0]


    def extract_features_from_image(self, image_content):
        """
        This function performs image encoding based on selected algorithm
        """
        # self.image_encoding_model.summary()
        # print(type(image_content))

        img_data = image.img_to_array(image_content)
        img_data = np.expand_dims(img_data, axis=0)

        if self.image_encoding_algo == 'MobileNet':
            img_data = mobile_net_preprocess(img_data)
        elif self.image_encoding_algo == 'VGG19':
            img_data = vgg_preprocess(img_data)
        elif self.image_encoding_algo == 'DenseNet':
            img_data = dense_net_preprocess(img_data)
        # elif self.image_encoding_algo == 'Inception':
        #     img_data = inception_net_preprocess(img_data)
        elif self.image_encoding_algo == 'ResNet':
            img_data = res_net_preprocess(img_data)

        image_encoding_feature = self.image_encoding_model.predict(img_data)
        image_encoding_feature_np = np.array(image_encoding_feature)
        image_encoding_feature_vector = image_encoding_feature_np.flatten()

        return image_encoding_feature_vector