Skip to content

dnn onnx: add group norm layer#24610

Merged
asmorkalov merged 13 commits intoopencv:4.xfrom
jimmylaw21:dnn-onnx-add-group-norm-layer
Jan 12, 2024
Merged

dnn onnx: add group norm layer#24610
asmorkalov merged 13 commits intoopencv:4.xfrom
jimmylaw21:dnn-onnx-add-group-norm-layer

Conversation

@jimmylaw21
Copy link
Copy Markdown
Contributor

@jimmylaw21 jimmylaw21 commented Nov 28, 2023

dnn onnx: add group norm layer

Todo:

  • speed up by multi-threading
  • add perf
  • add backend: OpenVINO
  • add backend: CUDA
  • add backend: OpenCL (no fp16)
  • add backend: CANN

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

@jimmylaw21 jimmylaw21 marked this pull request as draft November 28, 2023 13:30
@asmorkalov asmorkalov added feature category: dnn (onnx) ONNX suport issues in DNN module labels Nov 28, 2023
@fengyuentau fengyuentau self-assigned this Nov 28, 2023
Copy link
Copy Markdown
Member

@fengyuentau fengyuentau left a comment

Choose a reason for hiding this comment

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

Please add tests to test your code:

  1. Make your test data and model. You can use the existing ONNX models and input data, but you should regenerate the outputs since their implementation is wrong.
  2. Fork opencv_extra, make a branch with the same branch name dnn-onnx-add-group-norm-layer, upload the models and data to the branch and submit a PR to opencv_extra. Models should be put to $opencv_extra/testdata/dnn/onnx/conformance/node. Make sure you regenerate the ouput data files. Example: opencv/opencv_extra#1122.
  3. Add tests in modules/dnn/test/test_onnx_conformance.cpp. Example can be found here: https://github.com/opencv/opencv/pull/24544/files#diff-e5218dd7d4983b99874acb663bf3a849fca73572ae2d6da8083db8d08ee1433f.

@fengyuentau
Copy link
Copy Markdown
Member

Also you need to check the item: "I agree to contribute to the project under Apache 2 License."

@asmorkalov asmorkalov added this to the 4.9.0 milestone Dec 1, 2023
@asmorkalov
Copy link
Copy Markdown
Contributor

@fengyuentau @dkurt What are the next steps here?

@asmorkalov asmorkalov modified the milestones: 4.9.0, 4.10.0 Dec 20, 2023
@fengyuentau
Copy link
Copy Markdown
Member

@fengyuentau @dkurt What are the next steps here?

Seems like this PR cannot catch the release. Let me review this.

Copy link
Copy Markdown
Member

@fengyuentau fengyuentau left a comment

Choose a reason for hiding this comment

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

Please resolve merge conflicts with the following commands:

git remote add upstream https://github.com/opencv/opencv
git fetch upstream
git rebase upstream/4.x

# Solve merge conflicts with your editor

git rebase --continue
git push -f

@jimmylaw21 jimmylaw21 force-pushed the dnn-onnx-add-group-norm-layer branch from 01090ae to a321dac Compare December 21, 2023 11:07
@fengyuentau fengyuentau marked this pull request as ready for review December 27, 2023 08:04
{"test_gridsample_reflection_padding", 2, 1},
{"test_gridsample_zeros_padding", 2, 1},
{"test_group_normalization_epsilon", 3, 1},
{"test_group_normalization_example", 3, 1},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@asmorkalov
Copy link
Copy Markdown
Contributor

@jimmylaw21 Friendly reminder.

@asmorkalov
Copy link
Copy Markdown
Contributor

@jimmylaw21 Thanks a lot for the contribution! Feel free to create a new PR for CANN support too.

@asmorkalov asmorkalov merged commit a7fa1e6 into opencv:4.x Jan 12, 2024
This was referenced Jan 19, 2024
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 feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants