View Source Evision.DNN.TextDetectionModelEAST (Evision v0.2.9)
Summary
Functions
detect
Performs detection
enableWinograd
Get the detection confidence threshold
Get the detection confidence threshold
Given the @p input frame, create input blob, run net and return the output @p blobs.
Given the @p input frame, create input blob, run net and return the output @p blobs.
Set the detection confidence threshold
Set flag crop for frame.
Set mean value for frame.
Set preprocessing parameters for frame.
Set preprocessing parameters for frame.
Set scalefactor value for frame.
Set input size for frame.
setInputSize
Set flag swapRB for frame.
Set the detection NMS filter threshold
Set output names for frame.
setPreferableBackend
setPreferableTarget
Variant 1:
Create text detection model from network represented in one of the supported formats. An order of @p model and @p config arguments does not matter.
Create text detection model from network represented in one of the supported formats. An order of @p model and @p config arguments does not matter.
Types
@type t() :: %Evision.DNN.TextDetectionModelEAST{ref: reference()}
Type that represents an DNN.TextDetectionModelEAST
struct.
ref.
reference()
The underlying erlang resource variable.
Functions
@spec detect(t(), Evision.Mat.maybe_mat_in()) :: [[{number(), number()}]] | {:error, String.t()}
detect
Positional Arguments
- self:
Evision.DNN.TextDetectionModelEAST.t()
- frame:
Evision.Mat
Return
- detections:
[[Point]]
Has overloading in C++
Python prototype (for reference only):
detect(frame) -> detections
@spec detectTextRectangles(t(), Evision.Mat.maybe_mat_in()) :: {[{{number(), number()}, {number(), number()}, number()}], [number()]} | {:error, String.t()}
Performs detection
Positional Arguments
self:
Evision.DNN.TextDetectionModelEAST.t()
frame:
Evision.Mat
.the input image
Return
detections:
[{centre={x, y}, size={s1, s2}, angle}]
.array with detections' RotationRect results
confidences:
[float]
.array with detection confidences
Given the input @p frame, prepare network input, run network inference, post-process network output and return result detections. Each result is rotated rectangle. Note: Result may be inaccurate in case of strong perspective transformations.
Python prototype (for reference only):
detectTextRectangles(frame) -> detections, confidences
@spec enableWinograd(t(), boolean()) :: Evision.DNN.Model.t() | {:error, String.t()}
enableWinograd
Positional Arguments
- self:
Evision.DNN.TextDetectionModelEAST.t()
- useWinograd:
bool
Return
- retval:
Evision.DNN.Model.t()
Python prototype (for reference only):
enableWinograd(useWinograd) -> retval
@spec getConfidenceThreshold(Keyword.t()) :: any() | {:error, String.t()}
@spec getConfidenceThreshold(t()) :: number() | {:error, String.t()}
Get the detection confidence threshold
Positional Arguments
- self:
Evision.DNN.TextDetectionModelEAST.t()
Return
- retval:
float
Python prototype (for reference only):
getConfidenceThreshold() -> retval
@spec getNMSThreshold(Keyword.t()) :: any() | {:error, String.t()}
@spec getNMSThreshold(t()) :: number() | {:error, String.t()}
Get the detection confidence threshold
Positional Arguments
- self:
Evision.DNN.TextDetectionModelEAST.t()
Return
- retval:
float
Python prototype (for reference only):
getNMSThreshold() -> retval
@spec predict(t(), Evision.Mat.maybe_mat_in()) :: [Evision.Mat.t()] | {:error, String.t()}
Given the @p input frame, create input blob, run net and return the output @p blobs.
Positional Arguments
- self:
Evision.DNN.TextDetectionModelEAST.t()
- frame:
Evision.Mat
Return
outs:
[Evision.Mat]
.Allocated output blobs, which will store results of the computation.
Python prototype (for reference only):
predict(frame[, outs]) -> outs
@spec predict(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 and return the output @p blobs.
Positional Arguments
- self:
Evision.DNN.TextDetectionModelEAST.t()
- frame:
Evision.Mat
Return
outs:
[Evision.Mat]
.Allocated output blobs, which will store results of the computation.
Python prototype (for reference only):
predict(frame[, outs]) -> outs
Set the detection confidence threshold
Positional Arguments
self:
Evision.DNN.TextDetectionModelEAST.t()
confThreshold:
float
.A threshold used to filter boxes by confidences
Return
- retval:
Evision.DNN.TextDetectionModelEAST.t()
Python prototype (for reference only):
setConfidenceThreshold(confThreshold) -> retval
@spec setInputCrop(t(), boolean()) :: Evision.DNN.Model.t() | {:error, String.t()}
Set flag crop for frame.
Positional Arguments
self:
Evision.DNN.TextDetectionModelEAST.t()
crop:
bool
.Flag which indicates whether image will be cropped after resize or not.
Return
- retval:
Evision.DNN.Model.t()
Python prototype (for reference only):
setInputCrop(crop) -> retval
@spec setInputMean(t(), Evision.scalar()) :: Evision.DNN.Model.t() | {:error, String.t()}
Set mean value for frame.
Positional Arguments
self:
Evision.DNN.TextDetectionModelEAST.t()
mean:
Evision.scalar()
.Scalar with mean values which are subtracted from channels.
Return
- retval:
Evision.DNN.Model.t()
Python prototype (for reference only):
setInputMean(mean) -> retval
@spec setInputParams(Keyword.t()) :: any() | {:error, String.t()}
@spec setInputParams(t()) :: Evision.DNN.Model.t() | {:error, String.t()}
Set preprocessing parameters for frame.
Positional Arguments
- self:
Evision.DNN.TextDetectionModelEAST.t()
Keyword Arguments
scale:
double
.Multiplier for frame values.
size:
Size
.New input size.
mean:
Evision.scalar()
.Scalar with mean values which are subtracted from channels.
swapRB:
bool
.Flag which indicates that swap first and last channels.
crop:
bool
.Flag which indicates whether image will be cropped after resize or not. blob(n, c, y, x) = scale * resize( frame(y, x, c) ) - mean(c) )
Python prototype (for reference only):
setInputParams([, scale[, size[, mean[, swapRB[, crop]]]]]) -> None
@spec setInputParams( t(), [crop: term(), mean: term(), scale: term(), size: term(), swapRB: term()] | nil ) :: Evision.DNN.Model.t() | {:error, String.t()}
Set preprocessing parameters for frame.
Positional Arguments
- self:
Evision.DNN.TextDetectionModelEAST.t()
Keyword Arguments
scale:
double
.Multiplier for frame values.
size:
Size
.New input size.
mean:
Evision.scalar()
.Scalar with mean values which are subtracted from channels.
swapRB:
bool
.Flag which indicates that swap first and last channels.
crop:
bool
.Flag which indicates whether image will be cropped after resize or not. blob(n, c, y, x) = scale * resize( frame(y, x, c) ) - mean(c) )
Python prototype (for reference only):
setInputParams([, scale[, size[, mean[, swapRB[, crop]]]]]) -> None
@spec setInputScale(t(), Evision.scalar()) :: Evision.DNN.Model.t() | {:error, String.t()}
Set scalefactor value for frame.
Positional Arguments
self:
Evision.DNN.TextDetectionModelEAST.t()
scale:
Evision.scalar()
.Multiplier for frame values.
Return
- retval:
Evision.DNN.Model.t()
Python prototype (for reference only):
setInputScale(scale) -> retval
@spec setInputSize( t(), {number(), number()} ) :: Evision.DNN.Model.t() | {:error, String.t()}
Set input size for frame.
Positional Arguments
self:
Evision.DNN.TextDetectionModelEAST.t()
size:
Size
.New input size.
Return
- retval:
Evision.DNN.Model.t()
Note: If shape of the new blob less than 0, then frame size not change.
Python prototype (for reference only):
setInputSize(size) -> retval
@spec setInputSize(t(), integer(), integer()) :: Evision.DNN.Model.t() | {:error, String.t()}
setInputSize
Positional Arguments
self:
Evision.DNN.TextDetectionModelEAST.t()
width:
integer()
.New input width.
height:
integer()
.New input height.
Return
- retval:
Evision.DNN.Model.t()
Has overloading in C++
Python prototype (for reference only):
setInputSize(width, height) -> retval
@spec setInputSwapRB(t(), boolean()) :: Evision.DNN.Model.t() | {:error, String.t()}
Set flag swapRB for frame.
Positional Arguments
self:
Evision.DNN.TextDetectionModelEAST.t()
swapRB:
bool
.Flag which indicates that swap first and last channels.
Return
- retval:
Evision.DNN.Model.t()
Python prototype (for reference only):
setInputSwapRB(swapRB) -> retval
Set the detection NMS filter threshold
Positional Arguments
self:
Evision.DNN.TextDetectionModelEAST.t()
nmsThreshold:
float
.A threshold used in non maximum suppression
Return
- retval:
Evision.DNN.TextDetectionModelEAST.t()
Python prototype (for reference only):
setNMSThreshold(nmsThreshold) -> retval
@spec setOutputNames(t(), [binary()]) :: Evision.DNN.Model.t() | {:error, String.t()}
Set output names for frame.
Positional Arguments
self:
Evision.DNN.TextDetectionModelEAST.t()
outNames:
[String]
.Names for output layers.
Return
- retval:
Evision.DNN.Model.t()
Python prototype (for reference only):
setOutputNames(outNames) -> retval
@spec setPreferableBackend(t(), Evision.DNN.Backend.enum()) :: Evision.DNN.Model.t() | {:error, String.t()}
setPreferableBackend
Positional Arguments
- self:
Evision.DNN.TextDetectionModelEAST.t()
- backendId:
dnn_Backend
Return
- retval:
Evision.DNN.Model.t()
Python prototype (for reference only):
setPreferableBackend(backendId) -> retval
@spec setPreferableTarget(t(), Evision.DNN.Target.enum()) :: Evision.DNN.Model.t() | {:error, String.t()}
setPreferableTarget
Positional Arguments
- self:
Evision.DNN.TextDetectionModelEAST.t()
- targetId:
dnn_Target
Return
- retval:
Evision.DNN.Model.t()
Python prototype (for reference only):
setPreferableTarget(targetId) -> retval
@spec textDetectionModelEAST(Keyword.t()) :: any() | {:error, String.t()}
@spec textDetectionModelEAST(binary()) :: t() | {:error, String.t()}
@spec textDetectionModelEAST(Evision.DNN.Net.t()) :: t() | {:error, String.t()}
Variant 1:
Create text detection 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
- self:
Evision.DNN.TextDetectionModelEAST.t()
Python prototype (for reference only):
TextDetectionModel_EAST(model[, config]) -> <dnn_TextDetectionModel_EAST object>
Variant 2:
Create text detection algorithm from deep learning network
Positional Arguments
network:
Evision.DNN.Net.t()
.Net object
Return
- self:
Evision.DNN.TextDetectionModelEAST.t()
Python prototype (for reference only):
TextDetectionModel_EAST(network) -> <dnn_TextDetectionModel_EAST object>
Create text detection 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
- self:
Evision.DNN.TextDetectionModelEAST.t()
Python prototype (for reference only):
TextDetectionModel_EAST(model[, config]) -> <dnn_TextDetectionModel_EAST object>