Skip to content

Fix loading issue for Faster RCNN model from #16783#18296

Merged
alalek merged 5 commits intoopencv:3.4from
sl-sergei:fix_16783
Nov 17, 2020
Merged

Fix loading issue for Faster RCNN model from #16783#18296
alalek merged 5 commits intoopencv:3.4from
sl-sergei:fix_16783

Conversation

@sl-sergei
Copy link
Copy Markdown
Contributor

@sl-sergei sl-sergei commented Sep 8, 2020

relates: #16783
merge with extra: opencv/opencv_extra#804

Necessary changes for further work on supporting RCNN-like models from torchvision.

opencv_extra=multi_output_gather
force_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=*

@sl-sergei sl-sergei requested a review from dkurt September 8, 2020 22:28
@sl-sergei
Copy link
Copy Markdown
Contributor Author

sl-sergei commented Sep 8, 2020

@dkurt Please, take a look at the fix (seems like a crutch, but anyway). Still, it doesn't fix the problem on whole, because there are many unsupported operations in the ONNX model:
Control Flow:

image
Eltwise:

image
They cannot be reduced to the current implementations of Detection output layers, so I think it is a good idea to implement these layers as was suggested in #16750.
Can we discuss it somewhere outside Github?

@dkurt
Copy link
Copy Markdown
Member

dkurt commented Sep 9, 2020

Even all the layers will be imported, model execution will be inefficient because of too atomic operations.

@sl-sergei
Copy link
Copy Markdown
Contributor Author

Even all the layers will be imported, model execution will be inefficient because of too atomic operations.

Yes, I understand it, but to prevent it I plan to implement aggregate layers for RCNN models in a way similar to current Softmax or BatchNormalization OpenCV layers. And even in this case extra layers are required.

@sl-sergei
Copy link
Copy Markdown
Contributor Author

@mshabunin I think there is a problem with Linux Custom builder, there might be some problems with MYRIAD device, could you check?

@mshabunin
Copy link
Copy Markdown
Contributor

@sl-sergei , there is a merge conflict in opencv_extra repository now, please rebase your branch.

@sl-sergei sl-sergei force-pushed the fix_16783 branch 4 times, most recently from 8fbb81c to 5d1e719 Compare September 18, 2020 07:21
Copy link
Copy Markdown
Member

@dkurt dkurt 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!

@alalek alalek merged commit 2b82f8f into opencv:3.4 Nov 17, 2020
@alalek
Copy link
Copy Markdown
Member

alalek commented Nov 17, 2020

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.

4 participants