Skip to content

Add NonMaxSupression op to contribution ops - #60

Merged
Hector Li (HectorSVC) merged 8 commits into
masterfrom
non_max_supression
Dec 1, 2018
Merged

Hector Li (HectorSVC) merged 8 commits into
masterfrom
non_max_supression

Conversation

@HectorSVC

Copy link
Copy Markdown
Contributor

No description provided.

bool SuppressByIOU(const T* boxes_data, int32_t box_index1, int32_t box_index2) const;
void MaxMin(const T& lhs, const T& rhs, T& min, T& max) const;

private : int64_t max_output_size_;

@wenbingl Wenbing Li (wenbingl) Nov 29, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a new line? #Resolved

"Integer representing the maximum number of boxes to be selected by non max suppression.",
AttributeProto::INT)
.Attr(
"iou_threshold",

@wenbingl Wenbing Li (wenbingl) Nov 29, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any default value for it? #Resolved


if (max_output_size_ <= 0 || boxes_dims[0] == 0) {
std::vector<int64_t> output_dims(1, 0);
TensorShape output_shape(output_dims);

@tracysh Tracy Sharpe (tracysh) Nov 29, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TensorShape can take an initializer list, so this can be output_shape({1, 0}) to save the overhead of a local vector alloc/destroy. Same thing below for {1, num_to_copy}. #Resolved

@tracysh Tracy Sharpe (tracysh) Nov 30, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, not exactly what I said above, whatever the transform from what you have to an initializer list. #Resolved

sorted_scores_with_index.pop();

bool selected = true;
// Check with existing boxes, suppress if exceed the IOU (Intersection Over Union) threadhold

@tracysh Tracy Sharpe (tracysh) Nov 30, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

threadhold->threshold? #Resolved

@HectorSVC Hector Li (HectorSVC) Nov 30, 2018 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch. 👍 #Resolved

"score_threshold",
"Float tensor representing the threshold for deciding when to remove boxes based on score.",
AttributeProto::FLOAT);
}

@duli2012 Du Li (duli2012) Nov 29, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to add shape inference here since the shape inference is enabled by default now? #Resolved

@HectorSVC
Hector Li (HectorSVC) merged commit 31780ca into master Dec 1, 2018
@HectorSVC
Hector Li (HectorSVC) deleted the non_max_supression branch December 1, 2018 01:15
Tang, Cheng (souptc) pushed a commit that referenced this pull request Dec 17, 2018
…from execution

- Remove construction of MLValue name -> idx mapping from execution
  frame to inference session since it needs to be done per session only.
- Minor change in Executor interface (eliminate one heap allocation).

Related work items: #60
trent (tmccrmck) pushed a commit to tmccrmck/onnxruntime that referenced this pull request Aug 28, 2019
…data

Missing test data from the rename change
Nat Kershaw (MSFT) (natke) referenced this pull request in natke/onnxruntime Feb 15, 2022
* Address compliance issue and some minor updates

* minor update

* Add poli exclusion for RESNETLABELMAP.CS
Ashrit Shetty (ashrit-ms) added a commit that referenced this pull request Jun 4, 2025
This change generates the telemetry hash before initializing the session to ensure that the telemetry hash is generated correctly and consistently without any issues related to accessing invalid memory.

The issue is seen in cases where the initializers are cleared after the session is initialized if the tensor was not pre-allocated with some other tensors in a single 'allocate' call or if the context is not to be saved. ORT does this to remove weights from the graph to save memory.

Tested with OnnxRuntimeLoad, CppConsoleDesktop, CppOnnxRuntimeConsoleDesktop
Ashrit Shetty (ashrit-ms) added a commit that referenced this pull request Jun 12, 2025
This change generates the telemetry hash before initializing the session to ensure that the telemetry hash is generated correctly and consistently without any issues related to accessing invalid memory.

The issue is seen in cases where the initializers are cleared after the session is initialized if the tensor was not pre-allocated with some other tensors in a single 'allocate' call or if the context is not to be saved. ORT does this to remove weights from the graph to save memory.

Tested with OnnxRuntimeLoad, CppConsoleDesktop, CppOnnxRuntimeConsoleDesktop
Mike Hsu (quic-muchhsu) pushed a commit to CodeLinaro/onnxruntime that referenced this pull request Feb 27, 2026
* Fix permissions issue with nightly publish job
* Add issue_comment trigger so that this can be played around with more via a new PR
Dmitri Smirnov (yuslepukhin) pushed a commit that referenced this pull request Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants