tensorflow:: אופס:: NonMaxSuppressionV3
#include <image_ops.h>
בוחר בתאוותנות קבוצת משנה של תיבות תוחמות בסדר יורד של הניקוד,.
תַקצִיר
גיזום תיבות בעלות חפיפה גבוהה של צומת-על-איחוד (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_indexes)
טיעונים:
- scope: אובייקט Scope
- תיבות: טנזור צף דו-ממדי בעל צורה
[num_boxes, 4]
. - ציונים: טנזור צף 1-D של צורה
[num_boxes]
המייצג ניקוד בודד המתאים לכל תיבה (כל שורה של תיבות). - max_output_size: טנזור שלם סקלארי המייצג את המספר המרבי של תיבות שייבחרו על ידי דיכוי לא מקסימלי.
- iou_threshold: טנזור צף 0-D המייצג את הסף להחלטה אם תיבות חופפות יותר מדי ביחס ל-IOU.
- score_threshold: טנזור צף 0-D המייצג את הסף להחלטה מתי להסיר תיבות על סמך ניקוד.
החזרות:
-
Output
: טנסור שלם 1-D בצורת [M]
המייצג את המדדים שנבחרו מהטנסור של התיבות, כאשר M <= max_output_size
.
תכונות ציבוריות
מִבצָע
Operation operation
נבחרים_מדדים
::tensorflow::Output selected_indices
תפקידים ציבוריים
NonMaxSuppressionV3
NonMaxSuppressionV3(
const ::tensorflow::Scope & scope,
::tensorflow::Input boxes,
::tensorflow::Input scores,
::tensorflow::Input max_output_size,
::tensorflow::Input iou_threshold,
::tensorflow::Input score_threshold
)
צוֹמֶת
::tensorflow::Node * node() const
operator::tensorflow::Input() const
אופרטור::tensorflow::פלט
operator::tensorflow::Output() const
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-07-27 (שעון UTC).
[null,null,["עדכון אחרון: 2025-07-27 (שעון UTC)."],[],[],null,["# tensorflow::ops::NonMaxSuppressionV3 Class Reference\n\ntensorflow::ops::NonMaxSuppressionV3\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 with score less than `score_threshold` are removed. 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 and more generally 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_v2( boxes, scores, max_output_size, iou_threshold, score_threshold) selected_boxes = tf.gather(boxes, selected_indices)\n\nArguments:\n\n- scope: A [Scope](/versions/r2.2/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- 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/r2.2/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| [NonMaxSuppressionV3](#classtensorflow_1_1ops_1_1_non_max_suppression_v3_1a17764bb3f4d7a6fa8f7f7b3c62510435)`(const ::`[tensorflow::Scope](/versions/r2.2/api_docs/cc/class/tensorflow/scope#classtensorflow_1_1_scope)` & scope, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` boxes, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` scores, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` max_output_size, ::`[tensorflow::Input](/versions/r2.2/api_docs/cc/class/tensorflow/input#classtensorflow_1_1_input)` iou_threshold, ::`[tensorflow::Input](/versions/r2.2/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_v3_1a04f4f175f8c0cc6176fb555f9113418d) | [Operation](/versions/r2.2/api_docs/cc/class/tensorflow/operation#classtensorflow_1_1_operation) |\n| [selected_indices](#classtensorflow_1_1ops_1_1_non_max_suppression_v3_1a31738ea2eda8ca1f5f7581f2379939c2) | `::`[tensorflow::Output](/versions/r2.2/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_v3_1a116c420004985181682d064631cf727c)`() const ` | `::tensorflow::Node *` |\n| [operator::tensorflow::Input](#classtensorflow_1_1ops_1_1_non_max_suppression_v3_1a218f159eb67ca2415aa5dfaf8d566aca)`() const ` | ` ` ` ` |\n| [operator::tensorflow::Output](#classtensorflow_1_1ops_1_1_non_max_suppression_v3_1ad25f25b6aaeed58caf03e3adc092c5f7)`() 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### NonMaxSuppressionV3\n\n```gdscript\n NonMaxSuppressionV3(\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 ::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```"]]