View Source Evision.DNN.SegmentationModel (Evision v0.1.15)
Link to this section Summary
Types
Type that represents an Evision.DNN.SegmentationModel
struct.
Functions
Given the @p input frame, create input blob, run net
Given the @p input frame, create input blob, run net
Variant 1:
Create model from deep learning network.
Create segmentation model from network represented in one of the supported formats. An order of @p model and @p config arguments does not matter.
Link to this section Types
@type t() :: %Evision.DNN.SegmentationModel{ref: reference()}
Type that represents an Evision.DNN.SegmentationModel
struct.
ref.
reference()
The underlying erlang resource variable.
Link to this section Functions
@spec segment(t(), Evision.Mat.maybe_mat_in()) :: Evision.Mat.t() | {:error, String.t()}
Given the @p input frame, create input blob, run net
Positional Arguments
- frame:
Evision.Mat
Return
mask:
Evision.Mat
.Allocated class prediction for each pixel
Python prototype (for reference):
segment(frame[, mask]) -> mask
@spec segment(t(), Evision.Mat.maybe_mat_in(), [{atom(), term()}, ...] | nil) :: Evision.Mat.t() | {:error, String.t()}
Given the @p input frame, create input blob, run net
Positional Arguments
- frame:
Evision.Mat
Return
mask:
Evision.Mat
.Allocated class prediction for each pixel
Python prototype (for reference):
segment(frame[, mask]) -> mask
@spec segmentationModel(Evision.DNN.Net.t()) :: t() | {:error, String.t()}
@spec segmentationModel(binary()) :: t() | {:error, String.t()}
Variant 1:
Create model from deep learning network.
Positional Arguments
network:
Evision.DNN.Net
.Net object.
Return
Python prototype (for reference):
SegmentationModel(network) -> <dnn_SegmentationModel object>
Variant 2:
Create segmentation model from network represented in one of the supported formats. An order of @p model and @p config arguments does not matter.
Positional Arguments
model:
String
.Binary file contains trained weights.
Keyword Arguments
config:
String
.Text file contains network configuration.
Return
Python prototype (for reference):
SegmentationModel(model[, config]) -> <dnn_SegmentationModel object>
Create segmentation model from network represented in one of the supported formats. An order of @p model and @p config arguments does not matter.
Positional Arguments
model:
String
.Binary file contains trained weights.
Keyword Arguments
config:
String
.Text file contains network configuration.
Return
Python prototype (for reference):
SegmentationModel(model[, config]) -> <dnn_SegmentationModel object>