Google I/O에 참여해 주셔서 감사합니다. 주문형 모든 세션 보기 주문형 시청

tensorflow :: ops :: CombinedNonMaxSuppression

#include <image_ops.h>

탐욕스럽게 점수의 내림차순으로 경계 상자의 하위 집합을 선택합니다.

요약

이 작업은 모든 클래스에서 배치 당 입력에 대해 non_max_suppression을 수행합니다. IOU (Intersection-over-union)가 높은 상자를 이전에 선택한 상자와 겹치는 부분을 잘라냅니다. 경계 상자는 [y1, x1, y2, x2]로 제공됩니다. 여기서 (y1, x1) 및 (y2, x2)는 대각선 상자 모서리 쌍의 좌표이며 좌표는 정규화 (예 : 간격 [0, 1]) 또는 절대. 이 알고리즘은 좌표계에서 원점이 어디에 있는지 알 수 없습니다. 또한이 알고리즘은 좌표계의 직교 변환 및 변환에 변하지 않습니다. 따라서 좌표계를 변환하거나 반사하면 알고리즘에 의해 동일한 상자가 선택됩니다. 이 연산의 출력은 non_max_suppression을 수행 한 후 반환 된 최종 상자, 점수 및 클래스 텐서입니다.

인수 :

  • 범위 : 범위 개체
  • 상자 : 모양의 4 차원 부동 텐서 [batch_size, num_boxes, q, 4] . q 가 1이면 모든 클래스에 대해 동일한 상자가 사용됩니다. 그렇지 않으면 q 가 클래스 수와 같으면 클래스 별 상자가 사용됩니다.
  • scores : 각 상자 (각 상자 행)에 해당하는 단일 점수를 나타내는 3 차원 부동 텐서 [batch_size, num_boxes, num_classes] .
  • max_output_size_per_class : 클래스 당 비 최대 억제에 의해 선택 될 최대 상자 수를 나타내는 스칼라 정수 텐서
  • max_total_size : 모든 클래스에 대해 보유되는 최대 상자 수를 나타내는 스칼라.
  • iou_threshold : IOU와 관련하여 상자가 너무 많이 겹치는 지 여부를 결정하기위한 임계 값을 나타내는 0-D 부동 텐서.
  • score_threshold : 점수에 따라 상자를 제거 할시기를 결정하기위한 임계 값을 나타내는 0-D 부동 텐서입니다.

선택적 속성 ( Attrs 참조) :

  • pad_per_class : false이면 출력 nmsed 상자, 점수 및 클래스가 max_total_size 로 채워지거나 잘립니다. 참이면, 출력 nmsed 박스 점수 및 클래스 길이 될 패딩이다 max_size_per_class * num_classes 가 초과되지 않는 한, max_total_size 가 잘린되는 경우 max_total_size . 기본값은 false입니다.
  • clip_boxes : true이면 상자 좌표가 [0, 1] 사이에 있다고 가정하고 출력 상자가 [0, 1]을 넘어 가면 클립합니다. 거짓이면 클리핑을하지 않고 박스 좌표를 그대로 출력합니다.

보고:

  • Output nmsed_boxes : 최대 억제되지 않은 상자가 포함 된 [batch_size, max_detections, 4] float32 텐서.
  • Output nmsed_scores : 상자에 대한 점수를 포함하는 [batch_size, max_detections] float32 텐서.
  • Output nmsed_classes : 상자에 대한 클래스를 포함하는 [batch_size, max_detections] float32 텐서.
  • Output valid_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에 대한 선택적 속성 setter입니다.

공용 속성

nmsed_boxes

::tensorflow::Output nmsed_boxes

nmsed_classes

::tensorflow::Output nmsed_classes

nmsed_scores

::tensorflow::Output nmsed_scores

조작

Operation operation

valid_detections

::tensorflow::Output valid_detections

공공 기능

CombinedNonMaxSuppression

 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

 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
)

공개 정적 함수

ClipBoxes

Attrs ClipBoxes(
  bool x
)

PadPerClass

Attrs PadPerClass(
  bool x
)