貪心地按分數的降序選擇邊界框的子集。
用法
tf.image.non_max_suppression_overlaps(
overlaps, scores, max_output_size, overlap_threshold=0.5,
score_threshold=float('-inf'), name=None
)
參數
-
overlaps
形狀為[num_boxes, num_boxes]
的二維浮點數Tensor
,表示n-by-n 框重疊值。 -
scores
形狀為[num_boxes]
的一維浮點數Tensor
,表示對應於每個框(每行框)的單個分數。 -
max_output_size
一個標量整數Tensor
,表示非最大抑製要選擇的最大框數。 -
overlap_threshold
一個 0-D 浮點張量,表示用於確定框相對於提供的重疊值是否重疊過多的閾值。 -
score_threshold
一個 0-D 浮點張量,表示根據分數決定何時移除框的閾值。 -
name
操作的名稱(可選)。
返回
-
selected_indices
形狀為[M]
的一維整數Tensor
表示從重疊張量中選擇的索引,其中M <= max_output_size
。
修剪掉與先前選擇的框有高度重疊的框。 N-by-n 重疊值以方陣形式提供。此操作的輸出是一組整數,索引到表示所選框的邊界框的輸入集合中。然後可以使用tf.gather
操作獲得與所選索引對應的邊界框坐標。例如:
selected_indices = tf.image.non_max_suppression_overlaps(
overlaps, scores, max_output_size, iou_threshold)
selected_boxes = tf.gather(boxes, selected_indices)
相關用法
- Python tf.image.non_max_suppression_padded用法及代碼示例
- Python tf.image.non_max_suppression_with_scores用法及代碼示例
- Python tf.image.non_max_suppression用法及代碼示例
- Python tf.image.random_brightness用法及代碼示例
- Python tf.image.pad_to_bounding_box用法及代碼示例
- Python tf.image.adjust_hue用法及代碼示例
- Python tf.image.random_contrast用法及代碼示例
- Python tf.image.rot90用法及代碼示例
- Python tf.image.random_hue用法及代碼示例
- Python tf.image.flip_left_right用法及代碼示例
- Python tf.image.convert_image_dtype用法及代碼示例
- Python tf.image.stateless_random_flip_up_down用法及代碼示例
- Python tf.image.random_saturation用法及代碼示例
- Python tf.image.extract_glimpse用法及代碼示例
- Python tf.image.flip_up_down用法及代碼示例
- Python tf.image.crop_to_bounding_box用法及代碼示例
- Python tf.image.stateless_random_jpeg_quality用法及代碼示例
- Python tf.image.crop_and_resize用法及代碼示例
- Python tf.image.psnr用法及代碼示例
- Python tf.image.stateless_random_hue用法及代碼示例
注:本文由純淨天空篩選整理自tensorflow.org大神的英文原創作品 tf.image.non_max_suppression_overlaps。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。