OpenCV 5.0.0
Open Source Computer Vision
読み込み中...
検索中...
見つかりません
🤖 AIによる機械翻訳(非公式) — これは OpenCV 5.0.0 公式リファレンス(英語)を AI (Claude) で自動翻訳したものです。訳に誤りを含む場合があります。正確な情報は 公式英語版(原文) を参照してください。
cv::dnn_objdetect::InferBbox クラス

モデルの予測結果を後処理するクラス。 続き...

#include <opencv2/core_detect.hpp>

Collaboration diagram for cv::dnn_objdetect::InferBbox:

公開メンバ関数

 InferBbox (Mat _delta_bbox, Mat _class_scores, Mat _conf_scores)
 デフォルトコンストラクタ。
 
void filter (double thresh=0.8)
 バウンディングボックスをフィルタリングする。
 

公開変数類

std::vector< objectdetections
 モデルの最終的な検出結果を保持するベクトル。
 

限定公開メンバ関数

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 final_probability_dist (std::vector< std::vector< double > > *final_probs)
 各バウンディングボックスの最終的な確率値を計算する。
 
void intersection_over_union (std::vector< std::vector< double > > *boxes, std::vector< double > *base_box, std::vector< double > *iou)
 バウンディングボックスのIoU(Intersection over Union)を計算する。
 
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 Suppressionを適用するためのラッパー。
 
std::vector< bool > non_maximal_suppression (std::vector< std::vector< double > > *boxes, std::vector< double > *probs)
 Non-Maximal Suppressionを適用する。
 
void transform_bboxes (std::vector< std::vector< double > > *bboxes)
 ConvDetの相対座標をバウンディングボックスの座標へ変換する。
 
void transform_bboxes_inv (std::vector< std::vector< double > > *pre, std::vector< std::vector< double > > *post)
 バウンディングボックスを [x, y, h, w] から [xmin, ymin, xmax, ymax] へ変換する。
 

静的限定公開メンバ関数

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] の形式のバウンディングボックスを含むベクトル

◆ comparator()

static bool cv::dnn_objdetect::InferBbox::comparator ( std::pair< double, size_t > l1,
std::pair< double, size_t > l2 )
inlinestaticprotected

◆ filter()

void cv::dnn_objdetect::InferBbox::filter ( double thresh = 0.8)

バウンディングボックスをフィルタリングする。

◆ 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

バウンディングボックスのIoU(Intersection over Union)を計算する。

引数
boxesバウンディングボックス座標のベクトル
base_boxIOUを計算する基準となる基底ボックス
iouIOU値を格納するベクトル

◆ 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 Suppressionを適用するためのラッパー。

引数
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 Suppressionを適用する。

引数
boxes1つのクラスに属するバウンディングボックスの座標
probs1つのクラスに属するボックスの確率値

◆ 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変換後の座標を格納するベクトル

メンバ変数詳解

◆ detections

std::vector<object> cv::dnn_objdetect::InferBbox::detections

モデルの最終的な検出結果を保持するベクトル。


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