public class SegmentObjectsFromTensorFlowModel extends SegmentStackIntoObjectsScaleDecode<org.opencv.core.Mat,OpenCVModel>
.pb
SavedModel file.
Optionally a .pb.txt
file may accompany it.
Constructor and Description |
---|
SegmentObjectsFromTensorFlowModel() |
Modifier and Type | Method and Description |
---|---|
ConcurrentModelPool<OpenCVModel> |
createModelPool(ConcurrencyPlan plan,
Logger logger)
Creates the model pool (to be used by multiple threads).
|
protected org.opencv.core.Mat |
deriveInput(Stack stack,
Optional<double[]> subtractMeans)
Derives the input tensor from an image.
|
String |
getModelBinaryPath()
Relative-path to the TensorFlow model file, likely with
.pb extension, relative
to the models/ directory in the Anchor distribution. |
String |
getModelTextGraphPath()
Relative-path to the TensorFlow model file, likely with
.pb.txt extension,
relative to the models/ directory in the Anchor distribution. |
protected Optional<String> |
inputName()
The name of the tensor in the model which the input-image is mapped to.
|
void |
setModelBinaryPath(String modelBinaryPath)
Relative-path to the TensorFlow model file, likely with
.pb extension, relative
to the models/ directory in the Anchor distribution. |
void |
setModelTextGraphPath(String modelTextGraphPath)
Relative-path to the TensorFlow model file, likely with
.pb.txt extension,
relative to the models/ directory in the Anchor distribution. |
getClassLabelsPath, getDecode, getDisplayer, getInterpolator, getScaleInput, getSubtractMean, segment, setClassLabelsPath, setDecode, setDisplayer, setInterpolator, setScaleInput, setSubtractMean
resolve, segment
getInitialization, getLogger, getPropertyInitializer, initialize, initializeRecursive, initRecursiveWithInitializer, isInitialized, onInitialization
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public ConcurrentModelPool<OpenCVModel> createModelPool(ConcurrencyPlan plan, Logger logger) throws CreateModelFailedException
SegmentStackIntoObjectsPooled
createModelPool
in class SegmentStackIntoObjectsPooled<OpenCVModel>
plan
- the number and types of processors available for concurrent execution.logger
- the logger.CreateModelFailedException
- if a model cannot be created.protected org.opencv.core.Mat deriveInput(Stack stack, Optional<double[]> subtractMeans) throws OperationFailedException
SegmentStackIntoObjectsScaleDecode
deriveInput
in class SegmentStackIntoObjectsScaleDecode<org.opencv.core.Mat,OpenCVModel>
stack
- the image which is mapped into an input tensor.subtractMeans
- respective intensity values that are subtracted from the voxels before
being added to the tensor (respectively for each channel).OperationFailedException
- if an input tensor cannot be created.protected Optional<String> inputName()
SegmentStackIntoObjectsScaleDecode
inputName
in class SegmentStackIntoObjectsScaleDecode<org.opencv.core.Mat,OpenCVModel>
public String getModelBinaryPath()
.pb
extension, relative
to the models/ directory in the Anchor distribution.public void setModelBinaryPath(String modelBinaryPath)
.pb
extension, relative
to the models/ directory in the Anchor distribution.public String getModelTextGraphPath()
.pb.txt
extension,
relative to the models/ directory in the Anchor distribution.
If empty, then no such file is specified.
public void setModelTextGraphPath(String modelTextGraphPath)
.pb.txt
extension,
relative to the models/ directory in the Anchor distribution.
If empty, then no such file is specified.
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.