Fix loading of ONNX models with Resize operation with Opset 11 for newer versions of Pytorch#18316
Merged
alalek merged 3 commits intoopencv:3.4from Sep 17, 2020
Merged
Fix loading of ONNX models with Resize operation with Opset 11 for newer versions of Pytorch#18316alalek merged 3 commits intoopencv:3.4from
alalek merged 3 commits intoopencv:3.4from
Conversation
Contributor
|
@mshabunin could you merge the patch? |
alalek
reviewed
Sep 12, 2020
| CV_CheckEQ(shapes.size[0], 4, ""); | ||
| CV_CheckEQ(shapes.size[1], 1, ""); | ||
| CV_CheckTypeEQ(shapes.depth(), CV_32S, ""); | ||
| CV_Check(shapes.depth(), shapes.depth() == CV_32S || shapes.depth() == CV_32F, ""); |
Member
There was a problem hiding this comment.
-CV_Check
+CV_CheckDepthfor better diagnostic messages.
cb0eb23 to
0e7e6df
Compare
Contributor
|
thanks ! using your fix, https://github.com/princeton-vl/YouTube3D works now with opencv ;) |
0e7e6df to
5724c18
Compare
Member
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With Pytorch ver. 1.6 (or newer) onnx importer with Opset 11 stores scales parameter as float32.
relates: #18253 and #18300
merge with extra: opencv/opencv_extra#806
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.