此類表示與 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 |
此類的文件由以下檔案生成