Skip to content

Edited on tag '4.3.0-openvino' to support HDDL#18220

Merged
alalek merged 7 commits intoopencv:masterfrom
Omar-AE:hddl-supported
Nov 17, 2020
Merged

Edited on tag '4.3.0-openvino' to support HDDL#18220
alalek merged 7 commits intoopencv:masterfrom
Omar-AE:hddl-supported

Conversation

@Omar-AE
Copy link
Copy Markdown
Contributor

@Omar-AE Omar-AE commented Aug 29, 2020

This pull request is not ready to be merged. I still have an issue and I created this pull request to seek assistance as suggested by @dkurt . @mshabunin

First, I am trying to create this pull request to be compared with the tag 4.3.0-openvino. However, I could only compare it to master, and I would like to merge it to the tag 4.3.0-openvino. I know that a tag is different from a branch but I edited the code starting from the tag 4.3.0-openvino.

Second, I am getting the following exception when I try to use the newly added directive cv2.dnn.DNN_TARGET_HDDL instead of cv2.dnn.DNN_TARGET_MYRIAD:

AttributeError: module 'cv2.dnn' has no attribute 'DNN_TARGET_HDDL'

I am not sure where should I edit to let python3 be able to have the new constant DNN_TARGET_HDDL.

closes #17727

force_builders=Custom,Custom Win,Custom Mac
build_image:Custom=ubuntu-openvino-2020.4.0:16.04
build_image:Custom Win=openvino-2020.4.0
build_image:Custom Mac=openvino-2020.4.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=*

@dkurt
Copy link
Copy Markdown
Member

dkurt commented Aug 31, 2020

Hi!

Please start with the latest master branch to resolve the conflicts.

AttributeError: module 'cv2.dnn' has no attribute 'DNN_TARGET_HDDL'

Check python3 -c "import cv2 as cv; print(cv.__file__)" - it should point to build directory. Is not, specify PYTHONPATH=/path/to/opencv/build/lib/python3

@Omar-AE
Copy link
Copy Markdown
Contributor Author

Omar-AE commented Sep 4, 2020

Hi!

Please start with the latest master branch to resolve the conflicts.

AttributeError: module 'cv2.dnn' has no attribute 'DNN_TARGET_HDDL'

Check python3 -c "import cv2 as cv; print(cv.__file__)" - it should point to build directory. Is not, specify PYTHONPATH=/path/to/opencv/build/lib/python3

Thank you for your reply.

Adding the python path you mentioned worked.

I started again from the latest master branch and moved my commit to it. How can I change the branch I would like to request a merge from? Should I open a new PR?

@dkurt
Copy link
Copy Markdown
Member

dkurt commented Sep 4, 2020

@Omar-AE, you can just rename the branches and force push actual changes:

git branch -m hddl-supported old-hddl-supported
git branch -m new_branch hddl-supported
git push <fork_name> -f hddl-supported

@Omar-AE Omar-AE force-pushed the hddl-supported branch 3 times, most recently from b91d44e to cf40e07 Compare September 5, 2020 11:37
@Omar-AE Omar-AE closed this Sep 5, 2020
@Omar-AE Omar-AE deleted the hddl-supported branch September 5, 2020 12:40
@Omar-AE Omar-AE reopened this Sep 5, 2020
@Omar-AE
Copy link
Copy Markdown
Contributor Author

Omar-AE commented Sep 11, 2020

I successfully built the last changes on my Ubuntu 18.04.5 LTS machine. Any idea how to resolve the remaining failed builds (on Linux x64 and iOS)?

* Inference Engine's Myriad plugin.
*/
CV_EXPORTS_W void resetMyriadDevice();
CV_EXPORTS_W void resetMyriadDevice(const std::string& device = "MYRIAD");
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.

@alalek, can you suggest a new version number for #define OPENCV_DNN_API_VERSION 20200908?

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.

I would prefer to add dedicated resetHDDLDevice() API for that.

@Omar-AE
Copy link
Copy Markdown
Contributor Author

Omar-AE commented Oct 21, 2020

I successfully built the last changes on my Ubuntu 18.04.5 LTS machine. Any idea how to resolve the remaining failed builds (on Linux x64 and iOS)?

Any update regarding this?

if ((backendId == DNN_BACKEND_INFERENCE_ENGINE_NN_BUILDER_2019 || preferableTarget != DNN_TARGET_MYRIAD && preferableTarget != DNN_TARGET_HDDL) && blobs.empty())
return false;
return (preferableTarget != DNN_TARGET_MYRIAD || dilation.width == dilation.height);
return (preferableTarget != DNN_TARGET_MYRIAD && preferableTarget != DNN_TARGET_HDDL || dilation.width == dilation.height);
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.

Obfuscated conditions.

Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

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

LGTM

@alalek alalek merged commit a316b11 into opencv:master Nov 17, 2020
@alalek alalek mentioned this pull request Nov 27, 2020
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
* added HDDL VPU support

* changed to return True in one line if any device connected

* dnn: use releaseHDDLPlugin()

* dnn(hddl): fix conditions
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.

OpenCV with OpenVINO - dual MYRIAD mPCIe

3 participants