Skip to content

DNN: Add support for ConvTranspose when parsing ONNX - #13131

Merged
alalek merged 4 commits into
opencv:3.4from
Christopher22:add_transposedConv_onnx
Nov 16, 2018
Merged

alalek merged 4 commits into
opencv:3.4from
Christopher22:add_transposedConv_onnx

Conversation

@Christopher22

@Christopher22 Christopher22 commented Nov 12, 2018 •

Copy link
Copy Markdown
Contributor

Merge with extra: opencv/opencv_extra#551

This tiny patch adds support for parsing ONNX files containing "ConvTranspose" layer. The existing Deconvolution implementation is capable of handling those, only the mapping was missing.

opencv_extra=add_transposedConv_onnx

@dkurt

dkurt commented Nov 12, 2018 •

Copy link
Copy Markdown
Member

@Christopher22, Thanks for your contribution! It'll be great patch if you add some tests.
The following PRs can help you:

#12596 + opencv/opencv_extra#523
#13002 + opencv/opencv_extra#539

Please also choose 3.4 branch as a base branch. Then we port it to master.

@dkurt dkurt added the pr: needs test New functionality requires minimal tests set label Nov 12, 2018
@alalek

This comment has been minimized.

@Christopher22

Copy link
Copy Markdown
Contributor Author

Well, thats an convenient way for testing ONNX imports! I have not seen it before, but utilized one of my own models to check the correctness of the code. I will include the test (and thanks @alalek for the extensive How-To ;) )

@Christopher22
Christopher22 changed the base branch from master to 3.4 November 13, 2018 08:37
@Christopher22

Copy link
Copy Markdown
Contributor Author

Well, I feel like the rebase will not work that smoothly. Its probably not worth it fixing those Git errors for hours for such a small modification but just to start with a clean slate, after I create the test data in opencv_extra.

@dkurt
dkurt force-pushed the add_transposedConv_onnx branch from 461e2a1 to 426dc88 Compare November 13, 2018 09:08
@dkurt

dkurt commented Nov 13, 2018

Copy link
Copy Markdown
Member

@Christopher22, Fixed that. Please update your local branch.

@Christopher22

Copy link
Copy Markdown
Contributor Author

Thanks @dkurt! A pleasure to commit here ;) Tests are now included and run successfully on my local machine. Let's wait for the one here...

@dkurt

dkurt commented Nov 15, 2018 •

Copy link
Copy Markdown
Member

@alalek, it looks like Merge with extra doesn't work here as expected (is it because of 3.4 base branch?)

https://pullrequest.opencv.org/buildbot/builders/precommit_linux64/builds/19257/steps/test_dnn/logs/stdio

[ RUN      ] Test_ONNX_layers.Deconvolution/0, where GetParam() = OCV/CPU
[     SKIP ] OpenCV tests: Can't find data file: dnn/onnx/models/deconvolution.onnx

@alalek

alalek commented Nov 15, 2018 •

Copy link
Copy Markdown
Member

Right, my bad. Need to add "squash" button on CI and avoid merging from GitHub.

BTW, Can't we "require" such kind of data and fails on missings? (it doesn't come from download_models.py)


Wrong again. This PR is not merged.

Due different branch names need to add opencv_extra parameter with branch name

@dkurt

dkurt commented Nov 15, 2018

Copy link
Copy Markdown
Member

@alalek, Yeah, there is a flag. It's good idea because there are not a lot of dnn tests which can work without extra data.

findDataFile(filename, false);
std::string findDataFile(const std::string& relative_path, bool required)
{
    return findData(relative_path, required, false);
}

@dkurt dkurt left a comment

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.

Tested it locally. Looks good. Thank you!

@dkurt dkurt self-assigned this Nov 16, 2018
@alalek
alalek merged commit b58a872 into opencv:3.4 Nov 16, 2018
@alalek alalek mentioned this pull request Nov 17, 2018
SavyaSanchi-Sharma pushed a commit to SavyaSanchi-Sharma/opencv that referenced this pull request Jul 30, 2026
…_onnx

* Add support for ConvTranspose when parsing ONNX.

* Add support for ConvTranspose when parsing ONNX.

* Add test for Deconvolution
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants