View Source Evision.Zoo.TextDetection.DB (Evision v0.2.9)
Real-time Scene Text Detection with Differentiable Binarization
IC15
model is trained on IC15 dataset, which can detect English text instances only.TD500
model is trained on TD500 dataset, which can detect both English & Chinese instances.
Summary
Functions
Default configuration.
Docs in smart cell.
Inference.
Initialize model.
Model URL and filename of predefined model.
Customizable parameters from smart cell.
Smart cell tasks.
Generate quoted code from smart cell attrs.
Visualize the result.
Functions
@spec default_config() :: map()
Default configuration.
@spec docs() :: String.t()
Docs in smart cell.
@spec infer(Evision.DNN.TextDetectionModelDB.t(), Evision.Mat.maybe_mat_in()) :: {[{{number(), number()}, {number(), number()}, number()}], [number()]} | {:error, String.t()}
Inference.
Positional arguments
self:
Evision.DNN.TextDetectionModelDB.t()
.An initialized
Evision.DNN.TextDetectionModelDB
model.image:
Evision.Mat.maybe_mat_in()
.Input image.
Return
{detections, confidence}
@spec init( binary() | :ic15_resnet18 | :ic15_resnet50 | :td500_resnet18 | :td500_resnet50, nil | Keyword.t() ) :: {:error, String.t()} | Evision.DNN.TextDetectionModelDB.t()
Initialize model.
Positional arguments
model:
String.t()
|:ic15_resnet18
|:ic15_resnet50
|:td500_resnet18
|:td500_resnet50
Keyword arguments
cache_dir:
String.t()
.Path to the cache directory.
Optional. Defaults to
:filename.basedir(:user_cache, "", ...)
backend:
integer()
.Specify the backend.
Optional. Defaults to
Evision.Constant.cv_DNN_BACKEND_OPENCV()
.target:
integer()
.Specify the target.
Optional. Defaults to
Evision.Constant.cv_DNN_TARGET_CPU()
.
Model URL and filename of predefined model.
@spec smartcell_params() :: Evision.Zoo.smartcell_params()
Customizable parameters from smart cell.
@spec smartcell_tasks() :: Evision.Zoo.smartcell_tasks()
Smart cell tasks.
A list of variants of the current model.
Generate quoted code from smart cell attrs.
Visualize the result.
Positional arguments
image:
Evision.Mat.maybe_mat_in()
.Original image.
detections:
list({{number(), number()}, {number(), number()}, number()})
.Rotation retangulars.
confidences:
list(number())
.Confidence values.
Keyword arguments
box_color:
{blue=integer(), green=integer(), red=integer()}
.Values should be in
[0, 255]
. Defaults to{0, 255, 0}
.Specify the color of the bounding box.
text_color:
{blue=integer(), green=integer(), red=integer()}
.Values should be in
[0, 255]
. Defaults to{0, 0, 255}
.Specify the color of the text (confidence value).