tensorflow:: ops:: CombinedNonMaxSuppression
#include <image_ops.h>スコアの降順でバウンディングボックスのサブセットを貪欲に選択します。
まとめ
この操作では、バッチごとに、すべてのクラスにわたって入力に対して non_max_suppression を実行します。以前に選択されたボックスとの交差オーバーユニオン (IOU) の重なりが大きいボックスを削除します。バウンディング ボックスは [y1, x1, y2, x2] として指定され、(y1, x1) と (y2, x2) は任意の対角線上のボックス コーナーの座標です。座標は正規化 (つまり、[0, 1] の範囲内) または絶対値で指定できます。このアルゴリズムは、座標系の原点の位置に依存しないことに注意してください。また、このアルゴリズムは座標系の直交変換と平行移動に対して不変であることにも注意してください。したがって、座標系の平行移動または反転によって、アルゴリズムによって選択されるボックスは同じになります。この操作の出力は、non_max_suppression を実行した後に返される最終的なボックス、スコア、およびクラスのテンソルです。
議論:
- スコープ:スコープオブジェクト
- boxes: 形状が
[batch_size, num_boxes, q, 4]の 4 次元浮動小数点テンソル。qq1 の場合は、すべてのクラスで同じボックスが使用されます。それ以外の場合、qがクラス数と等しい場合は、クラス固有のボックスが使用されます。 - scores: 各ボックス(ボックスの各行)に対応する単一のスコアを表す、形状
[batch_size, num_boxes, num_classes]の3次元浮動小数点テンソル。 - max_output_size_per_class: クラスごとに非最大抑制によって選択されるボックスの最大数を表すスカラー整数テンソル
- max_total_size: 全クラスにわたって保持されるボックスの最大数を表すスカラー値。
- iou_threshold: IOUに関してボックスが重なりすぎているかどうかを判断するための閾値を表す0次元浮動小数点テンソル。
- score_threshold: スコアに基づいてボックスを削除するタイミングを決定するためのしきい値を表す 0 次元の float テンソル。
オプション属性( Attrs参照):
- pad_per_class: false の場合、出力される nmsed ボックス、スコア、およびクラスは
max_total_sizeにパディング/切り詰められます。true の場合、出力される nmsed ボックス、スコア、およびクラスはmax_size_per_class*num_classes長さにパディングされますが、max_total_size超える場合はmax_total_sizeに切り詰められます。デフォルトは false です。 - clip_boxes: trueの場合、ボックス座標は[0, 1]の範囲内であるとみなし、[0, 1]を超える場合は出力ボックスをクリップします。falseの場合、クリップは行わず、ボックス座標をそのまま出力します。
返品:
-
Outputnmsed_boxes: 最大抑制されていないボックスを含む [batch_size, max_detections, 4] float32 テンソル。 -
Outputnmsed_scores: ボックスのスコアを含む [batch_size, max_detections] float32 テンソル。 -
Outputnmsed_classes: ボックスのクラスを含む [batch_size, max_detections] float32 テンソル。 -
Outputvalid_detections: バッチ項目ごとの有効な検出数を表す [batch_size] の int32 テンソル。nms_boxes[i]、nms_scores[i]、nms_class[i] の上位 num_detections[i] エントリのみが有効です。残りのエントリはゼロパディングです。
コンストラクターとデストラクタ | |
|---|---|
CombinedNonMaxSuppression (const :: tensorflow::Scope & scope, :: tensorflow::Input boxes, :: tensorflow::Input scores, :: tensorflow::Input max_output_size_per_class, :: tensorflow::Input max_total_size, :: tensorflow::Input iou_threshold, :: tensorflow::Input score_threshold) | |
CombinedNonMaxSuppression (const :: tensorflow::Scope & scope, :: tensorflow::Input boxes, :: tensorflow::Input scores, :: tensorflow::Input max_output_size_per_class, :: tensorflow::Input max_total_size, :: tensorflow::Input iou_threshold, :: tensorflow::Input score_threshold, const CombinedNonMaxSuppression::Attrs & attrs) |
公開属性 | |
|---|---|
nmsed_boxes | |
nmsed_classes | |
nmsed_scores | |
operation | |
valid_detections | |
パブリック静的関数 | |
|---|---|
ClipBoxes (bool x) | |
PadPerClass (bool x) | |
構造 | |
|---|---|
| tensorflow:: ops:: CombinedNonMaxSuppression:: Attrs | CombinedNonMaxSuppressionのオプション属性設定子。 |
公開属性
nmsed_boxes
::tensorflow::Output nmsed_boxes
nmsed_classes
::tensorflow::Output nmsed_classes
nmsed_scores
::tensorflow::Output nmsed_scores
手術
Operation operation
有効な検出
::tensorflow::Output valid_detections
公的機能
複合非最大抑制
CombinedNonMaxSuppression( const ::tensorflow::Scope & scope, ::tensorflow::Input boxes, ::tensorflow::Input scores, ::tensorflow::Input max_output_size_per_class, ::tensorflow::Input max_total_size, ::tensorflow::Input iou_threshold, ::tensorflow::Input score_threshold )
複合非最大抑制
CombinedNonMaxSuppression( const ::tensorflow::Scope & scope, ::tensorflow::Input boxes, ::tensorflow::Input scores, ::tensorflow::Input max_output_size_per_class, ::tensorflow::Input max_total_size, ::tensorflow::Input iou_threshold, ::tensorflow::Input score_threshold, const CombinedNonMaxSuppression::Attrs & attrs )
パブリック静的関数
クリップボックス
Attrs ClipBoxes( bool x )
PadPerClass
Attrs PadPerClass( bool x )