Skip to content

Fixing dnn Resize layer for variable input size#18841

Merged
alalek merged 4 commits intoopencv:3.4from
JulienMaille:patch-2
Nov 20, 2020
Merged

Fixing dnn Resize layer for variable input size#18841
alalek merged 4 commits intoopencv:3.4from
JulienMaille:patch-2

Conversation

@JulienMaille
Copy link
Copy Markdown
Contributor

@JulienMaille JulienMaille commented Nov 17, 2020

my previous PR #18708 closed itself!

resolves #18695
merge with extra opencv/opencv_extra#816

opencv_extra=patch-1
force_builders_only=linux,docs
test_modules=dnn,python2,python3,java

Xforce_builders=Custom,Custom Win,Custom Mac
build_image:Custom=ubuntu-openvino-2021.1.0:20.04
build_image:Custom Win=openvino-2021.1.0
build_image:Custom Mac=openvino-2021.1.0

test_modules:Custom=dnn,python2,python3,java
test_modules:Custom Win=dnn,python2,python3,java
test_modules:Custom Mac=dnn,python2,python3,java

buildworker:Custom=linux-1
# disabled due high memory usage: test_opencl:Custom=ON
test_opencl:Custom=OFF
test_bigdata:Custom=1
test_filter:Custom=*

@JulienMaille
Copy link
Copy Markdown
Contributor Author

So if I understand @l-bat @sl-sergei correctly, some of the new test onnx like dynamic_resize_scale_10.onnx do not pass the scales as a constant input. But if the scales are a variable input, then I don't know how we can proceed. I'm not even sure it makes sense.

That explains why I get this error:

[ERROR:0] onnx_importer.cpp (1798) handleNode DNN/ONNX: ERROR during processing node with 2 inputs and 1 outputs: [Upsample]:(10)
[ INFO:0] onnx_importer.cpp (1801) handleNode     Input[0] = 'input'
[ INFO:0] onnx_importer.cpp (1801) handleNode     Input[1] = '16'
[ INFO:0] onnx_importer.cpp (1805) handleNode     Output[0] = '10'
unknown file: Failure
C++ exception with description "OpenCV(4.5.0-dev) onnx_importer.cpp:1807: error: (-2:Unspecified error) in function 'handleNode'
> Node [Upsample]:(10) parse error: OpenCV(4.5.0-dev) onnx_importer.cpp:330: error: (-5:Bad argument) Blob 16 not found in const blobs in function 'getBlob'

@JulienMaille JulienMaille force-pushed the patch-2 branch 5 times, most recently from 6645bfb to 9bb18dd Compare November 17, 2020 22:59
@JulienMaille
Copy link
Copy Markdown
Contributor Author

Ok, I believe the exported onnx are invalid, because the default mode doesn't export parameters!

@JulienMaille
Copy link
Copy Markdown
Contributor Author

@alalek Yeah, finally, with the right models, all tests do pass! I've rebased, cleaned up and squashe commits.

@asmorkalov asmorkalov requested review from l-bat and sl-sergei and removed request for l-bat November 19, 2020 06:56
@l-bat
Copy link
Copy Markdown
Contributor

l-bat commented Nov 19, 2020

@JulienMaille Why did you delete the CI config in PR description?

@JulienMaille
Copy link
Copy Markdown
Contributor Author

@JulienMaille Why did you delete the CI config in PR description?

Because I intially copy pasted it from anyother PR without understanding what it does :)

@JulienMaille JulienMaille force-pushed the patch-2 branch 2 times, most recently from 0282c75 to 4219e24 Compare November 19, 2020 18:12
@JulienMaille JulienMaille force-pushed the patch-2 branch 4 times, most recently from cbbc896 to 8ce7d33 Compare November 19, 2020 19:18
@JulienMaille
Copy link
Copy Markdown
Contributor Author

thanks to all reviewers! @l-bat are you ok with the changes?

Copy link
Copy Markdown
Contributor

@l-bat l-bat left a comment

Choose a reason for hiding this comment

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

Thank you for valuable contribution! 👍

@alalek alalek merged commit ac24a72 into opencv:3.4 Nov 20, 2020
@JulienMaille JulienMaille deleted the patch-2 branch November 20, 2020 17:35
This was referenced Nov 20, 2020
@alalek alalek mentioned this pull request Jun 23, 2021
6 tasks
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