此类表示与 DB 模型兼容的文本检测 DL 网络的高级 API。更多...
#include <opencv2/dnn/dnn.hpp>
|
| | TextDetectionModel_DB () |
| |
| | TextDetectionModel_DB (const Net &network) |
| | 从深度学习网络创建文本检测算法。
|
| |
| | TextDetectionModel_DB (CV_WRAP_FILE_PATH const std::string &model, CV_WRAP_FILE_PATH const std::string &config="") |
| | 从以受支持格式之一表示的网络创建文本检测模型。 model 和 config 参数的顺序无关紧要。
|
| |
| float | getBinaryThreshold () const |
| |
| int | getMaxCandidates () const |
| |
| float | getPolygonThreshold () const |
| |
| double | getUnclipRatio () const |
| |
| TextDetectionModel_DB & | setBinaryThreshold (float binaryThreshold) |
| |
| TextDetectionModel_DB & | setMaxCandidates (int maxCandidates) |
| |
| TextDetectionModel_DB & | setPolygonThreshold (float polygonThreshold) |
| |
| TextDetectionModel_DB & | setUnclipRatio (double unclipRatio) |
| |
| void | detect (InputArray frame, std::vector< std::vector< Point > > &detections) const |
| |
| void | detect (InputArray frame, std::vector< std::vector< Point > > &detections, std::vector< float > &confidences) const |
| | 执行检测。
|
| |
| void | detectTextRectangles (InputArray frame, std::vector< cv::RotatedRect > &detections) const |
| |
| void | detectTextRectangles (InputArray frame, std::vector< cv::RotatedRect > &detections, std::vector< float > &confidences) const |
| | 执行检测。
|
| |
| | Model (模型) () |
| |
| | Model (const Model &)=default |
| |
| | Model (const Net &network) |
| | 从深度学习网络创建模型。
|
| |
| | Model (CV_WRAP_FILE_PATH const String &model, CV_WRAP_FILE_PATH const String &config="") |
| | 从以受支持格式之一表示的深度学习网络创建模型。 model 和 config 参数的顺序无关紧要。
|
| |
| | Model (Model &&)=default |
| |
| Model & | enableWinograd (bool useWinograd) |
| |
| Impl * | getImpl () const |
| |
| Impl & | getImplRef () const |
| |
| Net & | getNetwork_ () |
| |
| Net & | getNetwork_ () const |
| |
| | operator Net & () const |
| |
| Model & | operator= (const Model &)=default |
| |
| Model & | operator= (Model &&)=default |
| |
| void | predict (InputArray frame, OutputArrayOfArrays outs) const |
| | 给定 input 帧,创建输入 blob,运行网络并返回输出 blobs。
|
| |
| Model & | setInputCrop (bool crop) |
| | 设置帧的 crop 标志。
|
| |
| Model & | setInputMean (const Scalar &mean) |
| | 设置帧的均值。
|
| |
| void | setInputParams (double scale=1.0, const Size &size=Size(), const Scalar &mean=Scalar(), bool swapRB=false, bool crop=false) |
| | 设置帧的预处理参数。
|
| |
| Model & | setInputScale (const Scalar &scale) |
| | 设置帧的 scalefactor 值。
|
| |
| Model & | setInputSize (const Size &size) |
| | 设置帧的输入大小。
|
| |
| Model & | setInputSize (int width, int height) |
| |
| Model & | setInputSwapRB (bool swapRB) |
| | 设置帧的 swapRB 标志。
|
| |
| Model & | setOutputNames (const std::vector< String > &outNames) |
| | 设置帧的输出名称。
|
| |
| Model & | setPreferableBackend (dnn::Backend backendId) |
| |
| Model & | setPreferableTarget (dnn::Target targetId) |
| |
此类表示与 DB 模型兼容的文本检测 DL 网络的高级 API。
相关出版物:[169] 论文:https://arxiv.org/abs/1911.08947 有关超参数设置的更多信息,请参阅 https://github.com/MhLiao/DB
可配置参数
- (float) binaryThreshold - 二值图的阈值。 通常设置为 0.3。
- (float) polygonThreshold - 文本多边形的阈值。 通常设置为 0.5、0.6 和 0.7。 默认值为 0.5f
- (double) unclipRatio - 检测到的文本区域的 unclip 比率,它决定了输出大小。 通常设置为 2.0。
- (int) maxCandidates - 输出结果的最大数量。
◆ TextDetectionModel_DB() [1/3]
| cv::dnn::TextDetectionModel_DB::TextDetectionModel_DB |
( |
| ) |
|
| Python |
|---|
| cv.dnn.TextDetectionModel_DB( | 网络 | ) -> | <dnn_TextDetectionModel_DB 对象> |
| cv.dnn.TextDetectionModel_DB( | model[, config] | ) -> | <dnn_TextDetectionModel_DB 对象> |
◆ TextDetectionModel_DB() [2/3]
| cv::dnn::TextDetectionModel_DB::TextDetectionModel_DB |
( |
const Net & | 网络 | ) |
|
| Python |
|---|
| cv.dnn.TextDetectionModel_DB( | 网络 | ) -> | <dnn_TextDetectionModel_DB 对象> |
| cv.dnn.TextDetectionModel_DB( | model[, config] | ) -> | <dnn_TextDetectionModel_DB 对象> |
◆ TextDetectionModel_DB() [3/3]
| Python |
|---|
| cv.dnn.TextDetectionModel_DB( | 网络 | ) -> | <dnn_TextDetectionModel_DB 对象> |
| cv.dnn.TextDetectionModel_DB( | model[, config] | ) -> | <dnn_TextDetectionModel_DB 对象> |
从以受支持格式之一表示的网络创建文本检测模型。 model 和 config 参数的顺序无关紧要。
- 参数
-
| [输入] | model | 二进制文件包含训练权重。 |
| [输入] | config | 文本文件包含网络配置。 |
◆ getBinaryThreshold()
| float cv::dnn::TextDetectionModel_DB::getBinaryThreshold |
( |
| ) |
const |
| Python |
|---|
| cv.dnn.TextDetectionModel_DB.getBinaryThreshold( | | ) -> | retval |
◆ getMaxCandidates()
| int cv::dnn::TextDetectionModel_DB::getMaxCandidates |
( |
| ) |
const |
| Python |
|---|
| cv.dnn.TextDetectionModel_DB.getMaxCandidates( | | ) -> | retval |
◆ getPolygonThreshold()
| float cv::dnn::TextDetectionModel_DB::getPolygonThreshold |
( |
| ) |
const |
| Python |
|---|
| cv.dnn.TextDetectionModel_DB.getPolygonThreshold( | | ) -> | retval |
◆ getUnclipRatio()
| double cv::dnn::TextDetectionModel_DB::getUnclipRatio |
( |
| ) |
const |
| Python |
|---|
| cv.dnn.TextDetectionModel_DB.getUnclipRatio( | | ) -> | retval |
◆ setBinaryThreshold()
| Python |
|---|
| cv.dnn.TextDetectionModel_DB.setBinaryThreshold( | binaryThreshold | ) -> | retval |
◆ setMaxCandidates()
| Python |
|---|
| cv.dnn.TextDetectionModel_DB.setMaxCandidates( | maxCandidates | ) -> | retval |
◆ setPolygonThreshold()
| Python |
|---|
| cv.dnn.TextDetectionModel_DB.setPolygonThreshold( | polygonThreshold | ) -> | retval |
◆ setUnclipRatio()
| Python |
|---|
| cv.dnn.TextDetectionModel_DB.setUnclipRatio( | unclipRatio | ) -> | retval |
此类的文档由以下文件生成