جریان تنسور:: عملیات:: NonMaxSuppressionWithOverlaps
#include <image_ops.h>
حریصانه زیرمجموعه ای از جعبه های محدود کننده را به ترتیب امتیاز نزولی انتخاب می کند.
خلاصه
هرس کردن جعبه هایی که همپوشانی بالایی با جعبه های انتخاب شده قبلی دارند. کادرهای محدود کننده با امتیاز کمتر از score_threshold
حذف می شوند. مقادیر همپوشانی N-by-n به عنوان ماتریس مربع ارائه می شود، که امکان تعریف یک معیار همپوشانی سفارشی را فراهم می کند (به عنوان مثال، تقاطع روی اتحاد، تقاطع بر روی مساحت، و غیره).
خروجی این عملیات مجموعه ای از اعداد صحیح است که در مجموعه ورودی جعبه های مرزی نمایانگر جعبه های انتخاب شده اند. سپس مختصات جعبه مرزی مربوط به شاخص های انتخاب شده را می توان با استفاده از tf.gather operation
به دست آورد. به عنوان مثال:
select_indices = tf.image.non_max_suppression_with_overlaps( همپوشانی ها، امتیازات، حداکثر_اندازه_خروجی، همپوشانی_آستانه، آستانه_امتیاز) boxes_ selected = tf.gather(جعبه ها، شاخص های_انتخاب شده)
استدلال ها:
- scope: یک شی Scope
- همپوشانی: یک تانسور شناور دوبعدی با شکل
[num_boxes, num_boxes]
که مقادیر همپوشانی جعبههای n به n را نشان میدهد. - امتیازها: یک تانسور شناور یک بعدی با شکل
[num_boxes]
که نشان دهنده یک امتیاز واحد مربوط به هر جعبه (هر ردیف از جعبه ها) است. - max_output_size: یک تانسور عدد صحیح اسکالر که نشان دهنده حداکثر تعداد کادرهایی است که باید با سرکوب غیر حداکثر انتخاب شوند.
- overlap_threshold: یک تانسور شناور 0-D که آستانه را برای تصمیم گیری در مورد همپوشانی جعبه ها نشان می دهد.
- score_threshold: یک تانسور شناور 0-D که آستانه تصمیم گیری برای حذف جعبه ها بر اساس امتیاز را نشان می دهد.
برمی گرداند:
-
Output
: یک تانسور عدد صحیح یک بعدی به شکل [M]
که نمایانگر شاخص های انتخاب شده از تانسور جعبه است، که در آن M <= max_output_size
.
صفات عمومی
عملیات
Operation operation
انتخاب_شاخص ها
::tensorflow::Output selected_indices
توابع عمومی
NonMaxSuppressionWithOverlaps
NonMaxSuppressionWithOverlaps(
const ::tensorflow::Scope & scope,
::tensorflow::Input overlaps,
::tensorflow::Input scores,
::tensorflow::Input max_output_size,
::tensorflow::Input overlap_threshold,
::tensorflow::Input score_threshold
)
گره
::tensorflow::Node * node() const
operator::tensorflow::Input() const
عملگر::tensorflow::خروجی
operator::tensorflow::Output() const
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-26 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 2025-07-26 بهوقت ساعت هماهنگ جهانی."],[],[],null,["# tensorflow::ops::NonMaxSuppressionWithOverlaps Class Reference\n\ntensorflow::ops::NonMaxSuppressionWithOverlaps\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 overlaps with previously selected boxes. Bounding boxes with score less than `score_threshold` are removed. N-by-n overlap values are supplied as square matrix, which allows for defining a custom overlap criterium (eg. intersection over union, intersection over area, etc.).\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_with_overlaps( overlaps, scores, max_output_size, overlap_threshold, score_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- overlaps: A 2-D float tensor of shape `[num_boxes, num_boxes]` representing the n-by-n box overlap values.\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- overlap_threshold: A 0-D float tensor representing the threshold for deciding whether boxes overlap too.\n- score_threshold: A 0-D float tensor representing the threshold for deciding when to remove boxes based on score.\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| [NonMaxSuppressionWithOverlaps](#classtensorflow_1_1ops_1_1_non_max_suppression_with_overlaps_1af965488437d8cbc7c79e1c36eca2abb3)`(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)` overlaps, ::`[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, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` overlap_threshold, ::`[tensorflow::Input](/versions/r1.15/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` score_threshold)` ||\n\n| ### Public attributes ||\n|----------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------|\n| [operation](#classtensorflow_1_1ops_1_1_non_max_suppression_with_overlaps_1a2f05b95bdafce0c5fc4a8269b35709e3) | [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_with_overlaps_1ab9ac497f027b7104d8ba5463a5a487ca) | `::`[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_with_overlaps_1a77c8843216c117ea9cc2597027f4a20e)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_non_max_suppression_with_overlaps_1a46f0366220ce965998602e5248c93070)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_non_max_suppression_with_overlaps_1a636de2d3e1a950d52efadd9bff02eb59)`() 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### NonMaxSuppressionWithOverlaps\n\n```gdscript\n NonMaxSuppressionWithOverlaps(\n const ::tensorflow::Scope & scope,\n ::tensorflow::Input overlaps,\n ::tensorflow::Input scores,\n ::tensorflow::Input max_output_size,\n ::tensorflow::Input overlap_threshold,\n ::tensorflow::Input score_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```"]]