polo.marco package

Submodules

polo.marco.run_marco module

polo.marco.run_marco.run_model(tf_predictor, image_path)[source]

Given a tensorflow predictor (the MARCO model) and the path to an image, runs the model on that image. Returns a tuple where the first item is the classification with greatest confidence and the second is a dictionary where keys are image classification types and values are model confidence for that classification. The image classifications of this dictionary are used universally throughout the program and are accessible through the IMAGE_CLASSIFICATIONS constant.

Parameters
  • tf_predictor (tensorflow model) – Loaded MARCO model

  • image_path (str) – Path to the image to be classified by the model

Returns

tuple

Return type

tuple

Module contents