Skip to content

dnn(test): add IE models for face-detection#17393

Closed
alalek wants to merge 1 commit intoopencv:3.4from
alalek:dnn_test_ie_models_face_detection
Closed

dnn(test): add IE models for face-detection#17393
alalek wants to merge 1 commit intoopencv:3.4from
alalek:dnn_test_ie_models_face_detection

Conversation

@alalek
Copy link
Copy Markdown
Member

@alalek alalek commented May 26, 2020

WIP

Blocked by 1D Mat support: #18594

force_builders_only=Custom,Custom Win,Custom Mac
build_image:Custom=ubuntu-openvino-2021.2.0:20.04
build_image:Custom Win=openvino-2021.2.0
build_image:Custom Mac=openvino-2021.2.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=ON
test_bigdata:Custom=1
test_filter:Custom=*DNNTestOpenVINO*:*YOLO*

test_opencl:Custom Win=ON
test_bigdata:Custom Win=1
test_filter:Custom Win=*DNNTestOpenVINO*:*YOLO*

@alalek
Copy link
Copy Markdown
Member Author

alalek commented May 26, 2020

@dkurt @l-bat Do you have any idea how to deal with "face-detection" IE models?

@dkurt
Copy link
Copy Markdown
Member

dkurt commented May 26, 2020

@alalek, looks like the problem in 1D outputs:

<layer id="1248" name="labels/sink_port_0" type="Result" version="opset1">
  <input>
    <port id="0">
      <dim>200</dim>
    </port>
  </input>
</layer>

corresponding cv::Mat has 200x1 size that leads to exception from IE:

terminate called after throwing an instance of 'InferenceEngine::details::InferenceEngineException'
  what():  [PARAMETER_MISMATCH] Failed to set output Blob. Dimensions mismatch.
Aborted (core dumped)

This patch helped to run the model:

--- a/modules/dnn/src/dnn.cpp
+++ b/modules/dnn/src/dnn.cpp
@@ -930,6 +930,7 @@ public:
             // if dst already has been allocated with total(shape) elements,
             // it won't be recreated and pointer of dst.data remains the same.
             dst.create(shape, use_half ? CV_16S : CV_32F);
+            dst.dims = shape.size();
             addHost(lp, dst);
         }
     }

@Apokalypser
Copy link
Copy Markdown

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