View Source Evision.Zoo.TextDetection.PPOCRV3 (Evision v0.2.9)
Real-time Scene Text Detection with PP-OCRv3
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() | :en | :cn, nil | Keyword.t()) :: {:error, String.t()} | Evision.DNN.TextDetectionModelDB.t()
Initialize model.
Positional arguments
model:
String.t()
|:en
|:cn
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).