def get_prediction(input_path): with get_evaluation_context(): return safe_jsonify( decode_predictions( model.predict( load_sig( join(abspath(input_folder), input_path[:-3] + 'npy'))), classes, top))
def get_prediction(input_path): with get_evaluation_context(): return safe_jsonify( decode_predictions( model.predict( load_img(join(abspath(input_folder), input_path), single_input_shape, grayscale=(input_channels == 1))), classes, top))
def get_prediction(input_path): with get_evaluation_context(): return safe_jsonify( decode_predictions( model.predict( load_img( join(abspath(input_folder), input_path), single_input_shape, grayscale=(input_channels == 1), mean=mean, std=std)), classes, top))
def get_prediction(input_path): # print ("prediction", input_path) results = [[("sa", "bot_34", 0.2)], [("sa", "bot_35", 0.6)]] return safe_jsonify(results)