OpenCV 4.12.0
開源計算機視覺
載入中...
搜尋中...
無匹配項
cv::dnn::TextDetectionModel_DB 類參考

此類表示與 DB 模型相容的文字檢測 DL 網路的高階 API。更多...

#include <opencv2/dnn/dnn.hpp>

cv::dnn::TextDetectionModel_DB 的協作圖

公共成員函式

 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="")
 從以受支援格式之一表示的網路建立文字檢測模型。 modelconfig 引數的順序無關緊要。
 
float getBinaryThreshold () const
 
int getMaxCandidates () const
 
float getPolygonThreshold () const
 
double getUnclipRatio () const
 
TextDetectionModel_DBsetBinaryThreshold (float binaryThreshold)
 
TextDetectionModel_DBsetMaxCandidates (int maxCandidates)
 
TextDetectionModel_DBsetPolygonThreshold (float polygonThreshold)
 
TextDetectionModel_DBsetUnclipRatio (double unclipRatio)
 
- 從 cv::dnn::TextDetectionModel 繼承的公共成員函式
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
 執行檢測。
 
- 從 cv::dnn::Model 繼承的公共成員函式
 Model (模型) ()
 
 Model (const Model &)=default
 
 Model (const Net &network)
 從深度學習網路建立模型。
 
 Model (CV_WRAP_FILE_PATH const String &model, CV_WRAP_FILE_PATH const String &config="")
 從以受支援格式之一表示的深度學習網路建立模型。 modelconfig 引數的順序無關緊要。
 
 Model (Model &&)=default
 
ModelenableWinograd (bool useWinograd)
 
Impl * getImpl () const
 
Impl & getImplRef () const
 
NetgetNetwork_ ()
 
NetgetNetwork_ () const
 
 operator Net & () const
 
Modeloperator= (const Model &)=default
 
Modeloperator= (Model &&)=default
 
void predict (InputArray frame, OutputArrayOfArrays outs) const
 給定 input 幀,建立輸入 blob,執行網路並返回輸出 blobs
 
ModelsetInputCrop (bool crop)
 設定幀的 crop 標誌。
 
ModelsetInputMean (const Scalar &mean)
 設定幀的均值。
 
void setInputParams (double scale=1.0, const Size &size=Size(), const Scalar &mean=Scalar(), bool swapRB=false, bool crop=false)
 設定幀的預處理引數。
 
ModelsetInputScale (const Scalar &scale)
 設定幀的 scalefactor 值。
 
ModelsetInputSize (const Size &size)
 設定幀的輸入大小。
 
ModelsetInputSize (int width, int height)
 
ModelsetInputSwapRB (bool swapRB)
 設定幀的 swapRB 標誌。
 
ModelsetOutputNames (const std::vector< String > &outNames)
 設定幀的輸出名稱。
 
ModelsetPreferableBackend (dnn::Backend backendId)
 
ModelsetPreferableTarget (dnn::Target targetId)
 

其他繼承的成員

- 從 cv::dnn::TextDetectionModel 繼承的保護成員函式
 TextDetectionModel ()
 
- 從 cv::dnn::Model 繼承的保護屬性
Ptr< Impl > impl
 

詳細描述

此類表示與 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 物件>

從深度學習網路建立文字檢測演算法。

引數
[輸入]網路Net 物件。

◆ TextDetectionModel_DB() [3/3]

cv::dnn::TextDetectionModel_DB::TextDetectionModel_DB ( CV_WRAP_FILE_PATH const std::string & model,
CV_WRAP_FILE_PATH const std::string & config = "" )
inline
Python
cv.dnn.TextDetectionModel_DB(網路) -> <dnn_TextDetectionModel_DB 物件>
cv.dnn.TextDetectionModel_DB(model[, config]) -> <dnn_TextDetectionModel_DB 物件>

從以受支援格式之一表示的網路建立文字檢測模型。 modelconfig 引數的順序無關緊要。

引數
[輸入]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()

TextDetectionModel_DB & cv::dnn::TextDetectionModel_DB::setBinaryThreshold ( float binaryThreshold)
Python
cv.dnn.TextDetectionModel_DB.setBinaryThreshold(binaryThreshold) -> retval

◆ setMaxCandidates()

TextDetectionModel_DB & cv::dnn::TextDetectionModel_DB::setMaxCandidates ( int maxCandidates)
Python
cv.dnn.TextDetectionModel_DB.setMaxCandidates(maxCandidates) -> retval

◆ setPolygonThreshold()

TextDetectionModel_DB & cv::dnn::TextDetectionModel_DB::setPolygonThreshold ( float polygonThreshold)
Python
cv.dnn.TextDetectionModel_DB.setPolygonThreshold(polygonThreshold) -> retval

◆ setUnclipRatio()

TextDetectionModel_DB & cv::dnn::TextDetectionModel_DB::setUnclipRatio ( double unclipRatio)
Python
cv.dnn.TextDetectionModel_DB.setUnclipRatio(unclipRatio) -> retval

此類的文件由以下檔案生成