tensorflow :: ops :: NonMaxSuppression
#include <image_ops.h>
スコアの降順で境界ボックスのサブセットを貪欲に選択します。
概要
高い交差オーバーユニオン(IOU)を持つボックスを剪定すると、以前に選択したボックスと重複します。境界ボックスは[y1、x1、y2、x2]として提供されます。ここで、(y1、x1)および(y2、x2)はボックスの角の対角線ペアの座標であり、座標は正規化されたものとして提供できます(つまり、間隔[0、1])または絶対。このアルゴリズムは、原点が座標系のどこにあるかに依存しないことに注意してください。このアルゴリズムは、座標系の直交変換および平行移動に対して不変であることに注意してください。したがって、座標系の変換または反射により、アルゴリズムによって同じボックスが選択されます。この操作の出力は、選択されたボックスを表すバウンディングボックスの入力コレクションにインデックスを付ける整数のセットです。選択したインデックスに対応するバウンディングボックスの座標は、 tf.gather operation
を使用して取得できtf.gather operation
。例:selected_indices = tf.image.non_max_suppression(boxes、scores、max_output_size、iou_threshold)selected_boxes = tf.gather(boxes、selected_indices)
引数:
- スコープ:スコープオブジェクト
- ボックス:形状
[num_boxes, 4]
2次元浮動小数点テンソル。 - スコア:各ボックス(ボックスの各行)に対応する単一のスコアを表す形状
[num_boxes]
の1次元浮動小数点テンソル。 - max_output_size:非最大抑制によって選択されるボックスの最大数を表すスカラー整数テンソル。
オプションの属性(参照Attrs
):
- iou_threshold:ボックスがIOUに対してオーバーラップしすぎているかどうかを判断するためのしきい値を表すfloat。
戻り値:
-
Output
:ボックステンソルから選択されたインデックスを表す形状[M]
の1次元整数テンソル。ここで、M <= max_output_size
。
コンストラクタとデストラクタ | |
---|---|
NonMaxSuppression (const :: tensorflow::Scope & scope, :: tensorflow::Input boxes, :: tensorflow::Input scores, :: tensorflow::Input max_output_size) | |
NonMaxSuppression (const :: tensorflow::Scope & scope, :: tensorflow::Input boxes, :: tensorflow::Input scores, :: tensorflow::Input max_output_size, const NonMaxSuppression::Attrs & attrs) |
パブリック属性 | |
---|---|
operation | |
selected_indices |
公の行事 | |
---|---|
node () const | ::tensorflow::Node * |
operator::tensorflow::Input () const | |
operator::tensorflow::Output () const |
パブリック静的関数 | |
---|---|
IouThreshold (float x) |
構造体 | |
---|---|
tensorflow :: ops :: NonMaxSuppression :: Attrs | NonMaxSuppressionのオプションの属性セッター。 |
パブリック属性
操作
Operation operation
selected_indices
::tensorflow::Output selected_indices
公の行事
NonMaxSuppression
NonMaxSuppression( const ::tensorflow::Scope & scope, ::tensorflow::Input boxes, ::tensorflow::Input scores, ::tensorflow::Input max_output_size )
NonMaxSuppression
NonMaxSuppression( const ::tensorflow::Scope & scope, ::tensorflow::Input boxes, ::tensorflow::Input scores, ::tensorflow::Input max_output_size, const NonMaxSuppression::Attrs & attrs )
ノード
::tensorflow::Node * node() const
operator :: tensorflow :: Input
operator::tensorflow::Input() const
operator :: tensorflow :: Output
operator::tensorflow::Output() const
パブリック静的関数
IouThreshold
Attrs IouThreshold( float x )