View Source Evision.DNN.SegmentationModel (Evision v0.1.10)

Link to this section Summary

Types

t()

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
Return
  • mask: Evision.Mat.

    Allocated class prediction for each pixel

Python prototype (for reference):

segment(frame[, mask]) -> mask
Link to this function

segment(self, frame, opts)

View Source
@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
Return
  • mask: Evision.Mat.

    Allocated class prediction for each pixel

Python prototype (for reference):

segment(frame[, mask]) -> mask
Link to this function

segmentationModel(network)

View Source
@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
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>
Link to this function

segmentationModel(model, opts)

View Source
@spec segmentationModel(binary(), [{atom(), term()}, ...] | nil) ::
  t() | {:error, String.t()}

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>