title: Load onnx model in opencv dnn
body: <p>I get the following error while loading onnx model (downloaded from <a href="https://github.com/ShiqiYu/libfacedetection.train/blob/a61a428929148171b488f024b5d6774f93cdbc13/tasks/task1/onnx/yunet.onnx" rel="nofollow noreferrer">here</a>) in OpenCV-C++ (4.6.0-dev) using the given code. What am I doing wrong? Please help me to solve this problem.</p>
  <blockquote>
  <p>[ERROR:0@0.003] global
  /home/opencv_build/opencv/modules/dnn/src/onnx/onnx_importer.cpp
  (2564) parseShape DNN/ONNX(Shape): dynamic 'zero' shapes are not
  supported, input 243 [ 0 0 0 51 ] [ERROR:0@0.003] global
  /home/opencv_build/opencv/modules/dnn/src/onnx/onnx_importer.cpp
  (1042) handleNode DNN/ONNX: ERROR during processing node with 1 inputs
  and 1 outputs: [Shape]:(onnx_node!Shape_70) from domain='ai.onnx'
  terminate called after throwing an instance of 'cv::Exception'<br />
  what():  OpenCV(4.6.0-dev)
  /home/opencv_build/opencv/modules/dnn/src/onnx/onnx_importer.cpp:1064:
  error: (-2:Unspecified error) in function 'handleNode'</p>
  <blockquote>
  <p>Node [Shape@ai.onnx]:(onnx_node!Shape_70) parse error: OpenCV(4.6.0-dev)
  /home/opencv_build/opencv/modules/dnn/src/onnx/onnx_importer.cpp:2565:
  error: (-215:Assertion failed) !isDynamicShape in function
  'parseShape'</p>
  </blockquote>
  </blockquote>
  <p>Aborted (core dumped)</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;opencv2/core/core.hpp&gt;
  #include &lt;opencv2/highgui/highgui.hpp&gt;
  #include &lt;opencv2/imgproc/imgproc.hpp&gt;
  #include &lt;opencv2/dnn/dnn.hpp&gt;
  
  using namespace std;
  using namespace cv;
  using namespace dnn;
  
  int main()
  {
      // load the neural network model
      cv::dnn::Net net = cv::dnn::readNetFromONNX(&quot;yunet.onnx&quot;);
  }  
  </code></pre>
  <p>I can successfully load the model in Python using both of the following two methods:
  Method 1:</p>
  <pre><code>import onnx
  onnx_model = onnx.load('yunet.onnx')
  onnx.checker.check_model(onnx_model)
  </code></pre>
  <p>Method 2:</p>
  <pre><code>#net = cv2.dnn.readNet('yunet.onnx')
  net = cv2.dnn.readNetFromONNX('yunet.onnx')
  </code></pre>
  <p>Am I missing something during building the OpenCV from source?</p>