Spec-Zone.ru › TensorFlow 2.3

tf.raw_ops.NonMaxSuppressionV5

Жадно выбирает подмножество прямоугольных областей в порядке убывания оценки,

Просмотр псевдонимов

Псевдонимы совместимости для миграции

См. Руководство по миграции для получения дополнительной информации.

tf.compat.v1.raw_ops.NonMaxSuppressionV5

tf.raw_ops.NonMaxSuppressionV5(
    boxes, scores, max_output_size, iou_threshold, score_threshold, soft_nms_sigma,
    pad_to_max_output_size=False, name=None
)

удаляя прямоугольные области, которые имеют высокое перекрытие по площади (IOU) с ранее выбранными прямоугольными областями. Прямоугольные области с оценкой меньше, чем score_threshold удаляются. Прямоугольные области задаются как [y1, x1, y2, x2], где (y1, x1) и (y2, x2) — координаты любой диагональной пары углов прямоугольной области, и координаты могут быть заданы в нормированном виде (т. е. лежащие в интервале [0, 1]) или в абсолютном виде. Обратите внимание, что этот алгоритм не зависит от того, где находится начало координат в системе координат, и, более общо, инвариантен к ортогональным преобразованиям и сдвигам системы координат; таким образом, сдвиги или отражения системы координат приводят к тому, что алгоритм выбирает те же прямоугольные области. Выход этого оператора — набор целых чисел, индексирующих входной набор прямоугольных областей, представляющих выбранные прямоугольные области. Координаты прямоугольных областей, соответствующие выбранным индексам, можно получить, используя tf.gather operation. Например: selected_indices = tf.image.non_max_suppression_v2( boxes, scores, max_output_size, iou_threshold, score_threshold) selected_boxes = tf.gather(boxes, selected_indices) Этот оператор также поддерживает режим Soft-NMS (с гауссовым взвешиванием) (см. Bodla и др., https://arxiv.org/abs/1704.04503), где прямоугольные области уменьшают оценку других перекрывающихся прямоугольных областей вместо прямого их удаления. Чтобы включить этот режим Soft-NMS, установите параметр soft_nms_sigma больше 0.

Аргументы
boxes A Tensor. Must be one of the following types: half, float32. A 2-D float tensor of shape [num_boxes, 4].
scores A Tensor. Must have the same type as boxes. A 1-D float tensor of shape [num_boxes] representing a single score corresponding to each box (each row of boxes).
max_output_size A Tensor of type int32. A scalar integer tensor representing the maximum number of boxes to be selected by non max suppression.
iou_threshold A Tensor. Must have the same type as boxes. A 0-D float tensor representing the threshold for deciding whether boxes overlap too much with respect to IOU.
score_threshold A Tensor. Must have the same type as boxes. A 0-D float tensor representing the threshold for deciding when to remove boxes based on score.
soft_nms_sigma A Tensor. Must have the same type as boxes. A 0-D float tensor representing the sigma parameter for Soft NMS; see Bodla et al (c.f. https://arxiv.org/abs/1704.04503). When soft_nms_sigma=0.0 (which is default), we fall back to standard (hard) NMS.
pad_to_max_output_size An optional bool. Defaults to False. If true, the output selected_indices is padded to be of length max_output_size. Defaults to false.
name Name of the operation (optional).
Возвращаемые значения
A tuple of Tensor objects (selected_indices, selected_scores, valid_outputs).
selected_indices A Tensor of type int32.
selected_scores A Tensor. Has the same type as boxes.
valid_outputs A Tensor of type int32.

© 2020 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/versions/r2.3/api_docs/python/tf/raw_ops/NonMaxSuppressionV5

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API