示例#1
0
 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))
示例#2
0
 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))
示例#3
0
 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))
示例#4
0
 def get_prediction(input_path):
     # print ("prediction", input_path)
     results = [[("sa", "bot_34", 0.2)], [("sa", "bot_35", 0.6)]]
     return safe_jsonify(results)