.. java:import:: ij.process ImageProcessor .. java:import:: ij.process FloatProcessor Predictor ========= .. java:package:: ch.epfl.leb.defcon.predictors :noindex: .. java:type:: public interface Predictor Makes density map predictions from images. :author: Kyle M. Douglass Methods ------- close ^^^^^ .. java:method:: public void close() :outertype: Predictor Closes resources associated with this predictor. getCount ^^^^^^^^ .. java:method:: public double getCount() throws UninitializedPredictorException :outertype: Predictor Returns the most recent count. :throws ch.epfl.leb.defcon.predictors.UninitializedPredictorException: :return: The predicted count from the density map. getDensityMap ^^^^^^^^^^^^^ .. java:method:: public FloatProcessor getDensityMap() throws UninitializedPredictorException :outertype: Predictor Returns the most recently calculated density map prediction. :throws ch.epfl.leb.defcon.predictors.UninitializedPredictorException: :return: The predicted density map. getLocalCountMap ^^^^^^^^^^^^^^^^ .. java:method:: public FloatProcessor getLocalCountMap() throws NoLocalCountMapException :outertype: Predictor Returns the most recently-calculated local count map. :throws ch.epfl.leb.defcon.predictors.NoLocalCountMapException: :return: The most recently calculated local count map. getMaximumLocalCount ^^^^^^^^^^^^^^^^^^^^ .. java:method:: public double getMaximumLocalCount(int boxSize) throws UninitializedPredictorException :outertype: Predictor Returns the maximum local count value. This value is obtained by convolving the density map with a square kernel whose values are all 1 and then taking the maximum of the resulting map. It effectively produces the highest count value over length scales equal to the size of the kernel. :param boxSize: The width of the square kernel. :throws ch.epfl.leb.defcon.predictors.UninitializedPredictorException: :return: The maximum local count from the density map. predict ^^^^^^^ .. java:method:: public void predict(ImageProcessor ip) throws ImageBitDepthException, SessionClosedException :outertype: Predictor Makes a density map prediction from a 2D image. :param ip: The image to perform a prediction on. setup ^^^^^ .. java:method:: public void setup(String pathToModel) :outertype: Predictor Initializes the predictor with a saved TensorFlow model bundle. :param pathToModel: The path to a saved TensorFlow model bundle.