public class DefaultPredictor extends AbstractPredictor implements Predictor
isClosed, tfSession| Constructor and Description |
|---|
DefaultPredictor() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
finalize()
Failsafe in case the TensorFlow session has not been closed.
|
double |
getCount()
Returns the most recent count.
|
FloatProcessor |
getDensityMap()
Returns the most recently calculated density map prediction.
|
FloatProcessor |
getLocalCountMap()
Returns the most recently-calculated local count map.
|
double |
getMaximumLocalCount(int boxSize)
Returns the maximum local count value.
|
void |
predict(ImageProcessor ip)
Makes a density map prediction from a 2D image.
|
close, imageToTensor, setuppublic double getCount()
throws UninitializedPredictorException
getCount in interface PredictorUninitializedPredictorExceptionpublic FloatProcessor getDensityMap() throws UninitializedPredictorException
getDensityMap in interface PredictorUninitializedPredictorExceptionpublic FloatProcessor getLocalCountMap() throws NoLocalCountMapException
getLocalCountMap in interface PredictorNoLocalCountMapExceptionpublic double getMaximumLocalCount(int boxSize)
throws UninitializedPredictorException
getMaximumLocalCount in interface PredictorboxSize - The width of the square kernel.UninitializedPredictorExceptionpublic void predict(ImageProcessor ip) throws ImageBitDepthException, SessionClosedException
predict in interface Predictorip - The image to perform a prediction on.ImageBitDepthExceptionSessionClosedExceptionprotected void finalize()
throws Throwable
finalize in class AbstractPredictorThrowableCopyright © 2018 The Laboratory of Experimental Biophysics. All rights reserved.