컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
텐서플로우:: 작전:: NonMaxSuppression
#include <image_ops.h>
점수의 내림차순으로 경계 상자의 하위 집합을 탐욕스럽게 선택합니다.
요약
IOU(Intersection-Over-Union)가 높은 상자가 이전에 선택한 상자와 겹치는 부분을 제거합니다. 경계 상자는 [y1, x1, y2, x2]로 제공됩니다. 여기서 (y1, x1) 및 (y2, x2)는 상자 모서리의 대각선 쌍의 좌표이며 좌표는 정규화된 대로 제공될 수 있습니다(예: 간격 [0, 1]) 또는 절대값. 이 알고리즘은 좌표계에서 원점이 어디에 있는지에 영향을 받지 않습니다. 이 알고리즘은 좌표계의 직교 변환 및 변환에 변하지 않습니다. 따라서 좌표계를 변환하거나 반영하면 알고리즘에 의해 동일한 상자가 선택됩니다. 이 작업의 출력은 선택한 상자를 나타내는 경계 상자의 입력 컬렉션을 인덱싱하는 정수 집합입니다. 선택한 인덱스에 해당하는 경계 상자 좌표는 tf.gather operation
사용하여 얻을 수 있습니다. 예: selected_indices = tf.image.non_max_suppression(boxs, Score, 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와 관련하여 상자가 너무 많이 겹치는지 여부를 결정하기 위한 임계값을 나타내는 부동 소수점입니다.
보고:
-
Output
: 상자 텐서에서 선택된 인덱스를 나타내는 [M]
모양의 1차원 정수 텐서. 여기서 M <= max_output_size
.
공개 속성
공공 기능
마디
::tensorflow::Node * node() const
operator::tensorflow::Input() const
연산자::텐서플로우::출력
operator::tensorflow::Output() const
공개 정적 함수
Iou임계값
Attrs IouThreshold(
float x
)
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-26(UTC)
[null,null,["최종 업데이트: 2025-07-26(UTC)"],[],[],null,["# tensorflow::ops::NonMaxSuppression Class Reference\n\ntensorflow::ops::NonMaxSuppression\n==================================\n\n`#include \u003cimage_ops.h\u003e`\n\nGreedily selects a subset of bounding boxes in descending order of score,.\n\nSummary\n-------\n\npruning away boxes that have high intersection-over-union (IOU) overlap with previously selected boxes. Bounding boxes are supplied as \\[y1, x1, y2, x2\\], where (y1, x1) and (y2, x2) are the coordinates of any diagonal pair of box corners and the coordinates can be provided as normalized (i.e., lying in the interval \\[0, 1\\]) or absolute. Note that this algorithm is agnostic to where the origin is in the coordinate system. Note that this algorithm is invariant to orthogonal transformations and translations of the coordinate system; thus translating or reflections of the coordinate system result in the same boxes being selected by the algorithm. The output of this operation is a set of integers indexing into the input collection of bounding boxes representing the selected boxes. The bounding box coordinates corresponding to the selected indices can then be obtained using the `tf.gather operation`. For example: selected_indices = tf.image.non_max_suppression( boxes, scores, max_output_size, iou_threshold) selected_boxes = tf.gather(boxes, selected_indices)\n\nArguments:\n\n- scope: A [Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope) object\n- boxes: A 2-D float tensor of shape `[num_boxes, 4]`.\n- scores: A 1-D float tensor of shape `[num_boxes]` representing a single score corresponding to each box (each row of boxes).\n- max_output_size: A scalar integer tensor representing the maximum number of boxes to be selected by non max suppression.\n\n\u003cbr /\u003e\n\nOptional attributes (see [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/non-max-suppression/attrs#structtensorflow_1_1ops_1_1_non_max_suppression_1_1_attrs)):\n\n- iou_threshold: A float representing the threshold for deciding whether boxes overlap too much with respect to IOU.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output): A 1-D integer tensor of shape `[M]` representing the selected indices from the boxes tensor, where `M \u003c= max_output_size`.\n\n\u003cbr /\u003e\n\n| ### Constructors and Destructors ||\n|---|---|\n| [NonMaxSuppression](#classtensorflow_1_1ops_1_1_non_max_suppression_1a9d86b1cd20b43d62327b4b497d6457d4)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` boxes, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` scores, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` max_output_size)` ||\n| [NonMaxSuppression](#classtensorflow_1_1ops_1_1_non_max_suppression_1a1ab4c9ad2a00fb51e1dfd72bc9fc363b)`(const ::`[tensorflow::Scope](/versions/r1.15/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` boxes, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` scores, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` max_output_size, const `[NonMaxSuppression::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/non-max-suppression/attrs#structtensorflow_1_1ops_1_1_non_max_suppression_1_1_attrs)` & attrs)` ||\n\n| ### Public attributes ||\n|--------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_non_max_suppression_1a1959f5a68ba6d16064a93d86a1414712) | [Operation](/versions/r1.15/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [selected_indices](#classtensorflow_1_1ops_1_1_non_max_suppression_1ad4219ad3203cc7d4d8c96f8833d367fc) | `::`[tensorflow::Output](/versions/r1.15/api_docs/cc/class/tensorflow/output#classtensorflow_1_1_output) |\n\n| ### Public functions ||\n|-------------------------------------------------------------------------------------------------------------------------------|------------------------|\n| [node](#classtensorflow_1_1ops_1_1_non_max_suppression_1a4cad107f2f05bbb87deb2241ecad5f6e)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_non_max_suppression_1af7a9dd9e033cacef4e2771bdf3998725)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_non_max_suppression_1acb3c005a4bed5fc05b4eaae70457faca)`() const ` | ` ` ` ` |\n\n| ### Public static functions ||\n|---------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|\n| [IouThreshold](#classtensorflow_1_1ops_1_1_non_max_suppression_1a136de54e18cc497fc70fc94659efd6ae)`(float x)` | [Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/non-max-suppression/attrs#structtensorflow_1_1ops_1_1_non_max_suppression_1_1_attrs) |\n\n| ### Structs ||\n|--------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [tensorflow::ops::NonMaxSuppression::Attrs](/versions/r1.15/api_docs/cc/struct/tensorflow/ops/non-max-suppression/attrs) | Optional attribute setters for [NonMaxSuppression](/versions/r1.15/api_docs/cc/class/tensorflow/ops/non-max-suppression#classtensorflow_1_1ops_1_1_non_max_suppression). |\n\nPublic attributes\n-----------------\n\n### operation\n\n```text\nOperation operation\n``` \n\n### selected_indices\n\n```scdoc\n::tensorflow::Output selected_indices\n``` \n\nPublic functions\n----------------\n\n### NonMaxSuppression\n\n```gdscript\n NonMaxSuppression(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input boxes,\n ::tensorflow::Input scores,\n ::tensorflow::Input max_output_size\n)\n``` \n\n### NonMaxSuppression\n\n```gdscript\n NonMaxSuppression(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input boxes,\n ::tensorflow::Input scores,\n ::tensorflow::Input max_output_size,\n const NonMaxSuppression::Attrs & attrs\n)\n``` \n\n### node\n\n```gdscript\n::tensorflow::Node * node() const \n``` \n\n### operator::tensorflow::Input\n\n```gdscript\n operator::tensorflow::Input() const \n``` \n\n### operator::tensorflow::Output\n\n```gdscript\n operator::tensorflow::Output() const \n``` \n\nPublic static functions\n-----------------------\n\n### IouThreshold\n\n```text\nAttrs IouThreshold(\n float x\n)\n```"]]