컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
텐서플로우:: 작전:: NonMaxSuppressionV2
#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_v2( 상자, 점수, max_output_size, iou_threshold) selected_boxes = tf.gather( 상자, selected_indices)
인수:
- 범위: 범위 개체
- 상자:
[num_boxes, 4]
모양의 2차원 부동 텐서. - 점수: 각 상자(상자의 각 행)에 해당하는 단일 점수를 나타내는
[num_boxes]
모양의 1차원 부동 소수점 텐서입니다. - max_output_size: 최대가 아닌 억제로 선택할 최대 상자 수를 나타내는 스칼라 정수 텐서.
- iou_threshold: IOU와 관련하여 상자가 너무 많이 겹치는지 여부를 결정하기 위한 임계값을 나타내는 0-D 부동 텐서입니다.
보고:
-
Output
: 상자 텐서에서 선택된 인덱스를 나타내는 [M]
모양의 1차원 정수 텐서. 여기서 M <= max_output_size
.
공개 속성
공공 기능
마디
::tensorflow::Node * node() const
operator::tensorflow::Input() const
연산자::텐서플로우::출력
operator::tensorflow::Output() const
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[null,null,["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# tensorflow::ops::NonMaxSuppressionV2 Class Reference\n\ntensorflow::ops::NonMaxSuppressionV2\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.\n\nThe 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:\n\nselected_indices = tf.image.non_max_suppression_v2( boxes, scores, max_output_size, iou_threshold) selected_boxes = tf.gather(boxes, selected_indices)\n\nArguments:\n\n- scope: A [Scope](/versions/r2.3/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- iou_threshold: A 0-D float tensor representing the threshold for deciding whether boxes overlap too much with respect to IOU.\n\n\u003cbr /\u003e\n\nReturns:\n\n- [Output](/versions/r2.3/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| [NonMaxSuppressionV2](#classtensorflow_1_1ops_1_1_non_max_suppression_v2_1aa344ba54e3c8ecdf351160841d620b90)`(const ::`[tensorflow::Scope](/versions/r2.3/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` boxes, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` scores, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` max_output_size, ::`[tensorflow::Input](/versions/r2.3/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` iou_threshold)` ||\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_non_max_suppression_v2_1aa5c9890c89f51ea289a417dc96e5155e) | [Operation](/versions/r2.3/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [selected_indices](#classtensorflow_1_1ops_1_1_non_max_suppression_v2_1abd7f6df70942924aba1f37d144c96bf6) | `::`[tensorflow::Output](/versions/r2.3/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_v2_1a74b7fd12711f34637858a5695ed0c654)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_non_max_suppression_v2_1a204a073b24bbf63d20c616abcf020a48)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_non_max_suppression_v2_1aaf3f8cdfaf63a67e5f7afdc2eb714271)`() const ` | ` ` ` ` |\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### NonMaxSuppressionV2\n\n```gdscript\n NonMaxSuppressionV2(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input boxes,\n ::tensorflow::Input scores,\n ::tensorflow::Input max_output_size,\n ::tensorflow::Input iou_threshold\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```"]]