Class SegmentationModel
java.lang.Object
org.opencv.dnn.Model
org.opencv.dnn.SegmentationModel
This class represents high-level API for segmentation models
SegmentationModel allows to set params for preprocessing input image.
SegmentationModel creates net from file with trained weights and config,
sets preprocessing input, runs forward pass and returns the class prediction for each pixel.
-
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSegmentationModel(long addr) SegmentationModel(String model) Create segmentation model from network represented in one of the supported formats.SegmentationModel(String model, String config) Create segmentation model from network represented in one of the supported formats.SegmentationModel(Net network) Create model from deep learning network. -
Method Summary
Modifier and TypeMethodDescriptionstatic SegmentationModel__fromPtr__(long addr) protected voidfinalize()voidGiven theinputframe, create input blob, run netMethods inherited from class Model
enableWinograd, getNativeObjAddr, predict, setInputCrop, setInputMean, setInputParams, setInputParams, setInputParams, setInputParams, setInputParams, setInputParams, setInputScale, setInputSize, setInputSize, setInputSwapRB, setOutputNames, setPreferableBackend, setPreferableTarget
-
Constructor Details
-
SegmentationModel
protected SegmentationModel(long addr) -
SegmentationModel
Create segmentation model from network represented in one of the supported formats. An order ofmodelandconfigarguments does not matter.- Parameters:
model- Binary file contains trained weights.config- Text file contains network configuration.
-
SegmentationModel
Create segmentation model from network represented in one of the supported formats. An order ofmodelandconfigarguments does not matter.- Parameters:
model- Binary file contains trained weights.
-
SegmentationModel
Create model from deep learning network.- Parameters:
network- Net object.
-
-
Method Details
-
__fromPtr__
-
segment
-
finalize
-