OpenCV 4.5.3(日本語機械翻訳)
全て クラス 名前空間 ファイル 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
公開メンバ関数 | 公開変数類 | 限定公開メンバ関数 | 静的限定公開メンバ関数 | 全メンバ一覧
cv::dnn_objdetect::InferBbox クラス

A class to post process model predictions [詳解]

#include <core_detect.hpp>

公開メンバ関数

InferBbox (Mat _delta_bbox, Mat _class_scores, Mat _conf_scores)
デフォルトのコンストラクタ[【詳解】(英語]
void filter (double thresh=0.8)
バウンディングボックスをフィルタリングします。

公開変数類

std::vector< object > detections
モデルの最終的な検出値を保持するベクター

限定公開メンバ関数

void transform_bboxes (std::vector< std::vector< double > > *bboxes)
ConvDetからの相対座標をバウンディングボックス座標に変換する[【詳解】(英語]
void final_probability_dist (std::vector< std::vector< double > > *final_probs)
各バウンディングボックスの最終的な確率値を計算する[【詳解】(英語]
void transform_bboxes_inv (std::vector< std::vector< double > > *pre, std::vector< std::vector< double > > *post)
バウンディングボックスを[x, y, h, w]から[xmin, ymin, xmax, ymax]に変換します。[【詳解】(英語]
void assert_predictions (std::vector< std::vector< double > > *min_max_boxes)
バウンディングボックスの値が画像の境界内にあることを保証します。[【詳解】(英語]
void filter_top_n (std::vector< std::vector< double > > *probs, std::vector< std::vector< double > > *boxes, std::vector< std::vector< double > > &top_n_boxes, std::vector< size_t > &top_n_idxs, std::vector< double > &top_n_probs)
フィルタートップn予測値[【詳解】(英語]
void nms_wrapper (std::vector< std::vector< double > > &top_n_boxes, std::vector< size_t > &top_n_idxs, std::vector< double > &top_n_probs)
Non-Maximal Supressionを適用するラッパー[【詳解】(英語]
std::vector< bool > non_maximal_suppression (std::vector< std::vector< double > > *boxes, std::vector< double > *probs)
Non-Maximal Supression を適用する[【詳解】(英語]
void intersection_over_union (std::vector< std::vector< double > > *boxes, std::vector< double > *base_box, std::vector< double > *iou)
バウンディングボックスの和よりも交わりを計算する[【詳解】(英語]

静的限定公開メンバ関数

static bool comparator (std::pair< double, size_t > l1, std::pair< double, size_t > l2)

詳解

モデルの予測値をポストプロセスするクラス

構築子と解体子

InferBbox()

cv::dnn_objdetect::InferBbox::InferBbox ( Mat _delta_bbox,
Mat _class_scores,
Mat _conf_scores
)

デフォルトのコンストラクタ

引数
_delta_bbox バウンディング ボックスの相対座標を含むBlob
_class_scores 各クラスの確率値を含むBlob
_conf_scores 信頼度スコアを含むBlob

関数詳解

assert_predictions()

void cv::dnn_objdetect::InferBbox::assert_predictions ( std::vector< std::vector< double > > * min_max_boxes )
protected

バウンディングボックスの値が画像の境界内にあることを保証します。

引数
min_max_boxes xmin, ymin, xmax, ymax] という形式のバウンディング ボックスを含むベクトル

filter_top_n()

void cv::dnn_objdetect::InferBbox::filter_top_n ( std::vector< std::vector< double > > * probs,
std::vector< std::vector< double > > * boxes,
std::vector< std::vector< double > > & top_n_boxes,
std::vector< size_t > & top_n_idxs,
std::vector< double > & top_n_probs
)
protected

フィルタートップn予測値

引数
probs バウンディングボックスの最終的な確率値
boxes 予測されたバウンディングボックスの座標
top_n_boxes トップボックスのバウンディングボックスの座標を含むnボックス
top_n_idxs トップボックスのクラスインデックスを含むn境界線上のボックスの
top_n_probs トップボックスの確率値を含むn境界線上のボックスの

final_probability_dist()

void cv::dnn_objdetect::InferBbox::final_probability_dist ( std::vector< std::vector< double > > * final_probs )
protected

各バウンディングボックスの最終的な確率値を計算する

引数
final_probs 確率値を保持するベクター

intersection_over_union()

void cv::dnn_objdetect::InferBbox::intersection_over_union ( std::vector< std::vector< double > > * boxes,
std::vector< double > * base_box,
std::vector< double > * iou
)
protected

バウンディングボックスの和よりも交わりを計算する

引数
boxes バウンディングボックスの座標のベクトル
base_box IOUを計算する基準となる箱
iou IOUの値を格納するベクター

nms_wrapper()

void cv::dnn_objdetect::InferBbox::nms_wrapper ( std::vector< std::vector< double > > & top_n_boxes,
std::vector< size_t > & top_n_idxs,
std::vector< double > & top_n_probs
)
protected

Non-Maximal Supressionを適用するラッパー

引数
top_n_boxes トップボックスのバウンディングボックスの座標を含むnボックス
top_n_idxs トップボックスのクラスインデックスを含むn境界線上のボックスの
top_n_probs トップボックスの確率値を含むn境界線上のボックスの

non_maximal_suppression()

std::vector< bool > cv::dnn_objdetect::InferBbox::non_maximal_suppression ( std::vector< std::vector< double > > * boxes,
std::vector< double > * probs
)
protected

Non-Maximal Supression を適用する

引数
boxes 1つのクラスに属する境界箱の座標
probs 1つのクラスに属するボックスの確率値

transform_bboxes()

void cv::dnn_objdetect::InferBbox::transform_bboxes ( std::vector< std::vector< double > > * bboxes )
protected

ConvDetからの相対座標をバウンディングボックス座標に変換する

引数
bboxes 予測されたバウンディングボックスを保持するベクター

transform_bboxes_inv()

void cv::dnn_objdetect::InferBbox::transform_bboxes_inv ( std::vector< std::vector< double > > * pre,
std::vector< std::vector< double > > * post
)
protected

バウンディングボックスを[x, y, h, w]から[xmin, ymin, xmax, ymax]に変換します。

引数
pre 初期座標を表すベクトル
post 変換後の座標を表すベクトル

このクラス詳解は次のファイルから抽出されました: