Class SegmentObjectsFromTensorFlowModel
Object
org.anchoranalysis.bean.AnchorBean<B>
org.anchoranalysis.bean.initializable.InitializableBean<T,org.anchoranalysis.image.bean.nonbean.init.ImageInitialization>
org.anchoranalysis.image.bean.ImageBean<T>
org.anchoranalysis.image.bean.segment.SegmentationBean<org.anchoranalysis.image.inference.bean.segment.instance.SegmentStackIntoObjectsPooled<T>>
org.anchoranalysis.image.inference.bean.segment.instance.SegmentStackIntoObjectsPooled<S>
org.anchoranalysis.image.inference.bean.segment.instance.SegmentStackIntoObjectsScaleDecode<org.opencv.core.Mat,OpenCVModel>
org.anchoranalysis.plugin.opencv.bean.object.segment.stack.SegmentObjectsFromTensorFlowModel
public class SegmentObjectsFromTensorFlowModel extends org.anchoranalysis.image.inference.bean.segment.instance.SegmentStackIntoObjectsScaleDecode<org.opencv.core.Mat,OpenCVModel>
Performs instance-segmentation using OpenCV's DNN module and a TensorFlow
.pb SavedModel file.
Optionally a .pb.txt file may accompany it.
- Author:
- Owen Feehan
-
Constructor Summary
Constructors Constructor Description SegmentObjectsFromTensorFlowModel() -
Method Summary
Modifier and Type Method Description org.anchoranalysis.inference.concurrency.ConcurrentModelPool<OpenCVModel>createModelPool(org.anchoranalysis.inference.concurrency.ConcurrencyPlan plan, org.anchoranalysis.core.log.Logger logger)protected org.opencv.core.MatderiveInput(org.anchoranalysis.image.core.stack.Stack stack, Optional<double[]> subtractMeans)StringgetModelBinaryPath()Relative-path to the TensorFlow model file, likely with.pbextension, relative to the models/ directory in the Anchor distribution.StringgetModelTextGraphPath()Relative-path to the TensorFlow model file, likely with.pb.txtextension, relative to the models/ directory in the Anchor distribution.protected Optional<String>inputName()voidsetModelBinaryPath(String modelBinaryPath)Relative-path to the TensorFlow model file, likely with.pbextension, relative to the models/ directory in the Anchor distribution.voidsetModelTextGraphPath(String modelTextGraphPath)Relative-path to the TensorFlow model file, likely with.pb.txtextension, relative to the models/ directory in the Anchor distribution.Methods inherited from class org.anchoranalysis.image.inference.bean.segment.instance.SegmentStackIntoObjectsScaleDecode
getClassLabelsPath, getDecode, getDisplayer, getInterpolator, getScaleInput, getSubtractMean, segment, setClassLabelsPath, setDecode, setDisplayer, setInterpolator, setScaleInput, setSubtractMeanMethods inherited from class org.anchoranalysis.image.inference.bean.segment.instance.SegmentStackIntoObjectsPooled
resolve, segmentMethods inherited from class org.anchoranalysis.bean.initializable.InitializableBean
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitialization
-
Constructor Details
-
SegmentObjectsFromTensorFlowModel
public SegmentObjectsFromTensorFlowModel()
-
-
Method Details
-
createModelPool
public org.anchoranalysis.inference.concurrency.ConcurrentModelPool<OpenCVModel> createModelPool(org.anchoranalysis.inference.concurrency.ConcurrencyPlan plan, org.anchoranalysis.core.log.Logger logger) throws org.anchoranalysis.inference.concurrency.CreateModelFailedException- Specified by:
createModelPoolin classorg.anchoranalysis.image.inference.bean.segment.instance.SegmentStackIntoObjectsPooled<OpenCVModel>- Throws:
org.anchoranalysis.inference.concurrency.CreateModelFailedException
-
deriveInput
protected org.opencv.core.Mat deriveInput(org.anchoranalysis.image.core.stack.Stack stack, Optional<double[]> subtractMeans) throws org.anchoranalysis.core.exception.OperationFailedException- Specified by:
deriveInputin classorg.anchoranalysis.image.inference.bean.segment.instance.SegmentStackIntoObjectsScaleDecode<org.opencv.core.Mat,OpenCVModel>- Throws:
org.anchoranalysis.core.exception.OperationFailedException
-
inputName
- Specified by:
inputNamein classorg.anchoranalysis.image.inference.bean.segment.instance.SegmentStackIntoObjectsScaleDecode<org.opencv.core.Mat,OpenCVModel>
-
getModelBinaryPath
Relative-path to the TensorFlow model file, likely with.pbextension, relative to the models/ directory in the Anchor distribution. -
setModelBinaryPath
Relative-path to the TensorFlow model file, likely with.pbextension, relative to the models/ directory in the Anchor distribution. -
getModelTextGraphPath
Relative-path to the TensorFlow model file, likely with.pb.txtextension, relative to the models/ directory in the Anchor distribution.If empty, then no such file is specified.
-
setModelTextGraphPath
Relative-path to the TensorFlow model file, likely with.pb.txtextension, relative to the models/ directory in the Anchor distribution.If empty, then no such file is specified.
-