Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

zihaomu
Copy link
Member

@zihaomu zihaomu commented Apr 12, 2023

Merge with test data: opencv/opencv_extra#1054

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@zihaomu zihaomu added test category: dnn (onnx) ONNX suport issues in DNN module labels Apr 12, 2023
@zihaomu zihaomu requested a review from rogday April 12, 2023 08:25
}

template <typename T, typename Functor>
void trinary_forward(const Functor& f, const std::vector<Mat>& inputs, std::vector<Mat>& outputs)
Copy link
Member

@rogday rogday Apr 13, 2023

Choose a reason for hiding this comment

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

To be honest it looks like we could change the original function to accept multiple inputs.
E.g. make it accept (data + step) buffer. And everywhere where there is $i suffix (e.g. ptr1_, etc), we could use buffer as well.
I think we had performance tests somewhere, we should check that it didn't degrade. If it does, we could have 1) fast binary path and 2) slower naray path.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hi, @rogday. Thanks for the code review.
I'm not very familiar with this part of the code, can you give some examples in more detail so I can complete it?

@asmorkalov asmorkalov changed the title DNN: add where node supported. DNN: add ONNX where node support Apr 13, 2023
@asmorkalov asmorkalov added this to the 4.8.0 milestone Apr 14, 2023
@asmorkalov asmorkalov requested a review from dkurt May 2, 2023 05:23
@asmorkalov
Copy link
Contributor

@dkurt Could you, please, review the PR too?

TEST_P(Test_ONNX_layers, where_node)
{
testONNXModels("where_layer");
}
Copy link
Member

Choose a reason for hiding this comment

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

Please add a test for broadcasting scenario.

Copy link
Member Author

Choose a reason for hiding this comment

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

image

Hi @dkurt. Thanks for your code review, and I have updated the test case.

@asmorkalov asmorkalov merged commit 25c28c5 into opencv:4.x May 5, 2023
@asmorkalov asmorkalov assigned dkurt and unassigned rogday May 5, 2023
@asmorkalov
Copy link
Contributor

@zihaomu where node is mentioned in some community reported issues. Could you update them and at lest add reverence to the PR.

@zihaomu
Copy link
Member Author

zihaomu commented May 5, 2023

Link to #23470 (comment)

@asmorkalov asmorkalov mentioned this pull request May 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category: dnn (onnx) ONNX suport issues in DNN module test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants