Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Models face-detection-0205 and face-detection-0206 showing errors #2060

Open
campos537 opened this issue Feb 4, 2021 · 9 comments
Open

Models face-detection-0205 and face-detection-0206 showing errors #2060

campos537 opened this issue Feb 4, 2021 · 9 comments
Labels
OpenCV OpenCV issue/question, which is not related to OpenVINO/Open Model Zoo

Comments

@campos537
Copy link

Hey guys! I'm trying to run the face-detection-0205 and the face-detection-0206 but i wasn't able to get the proper output result, instead of that i got:

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

I'm using OpenCV 4.5.1 with OpenVINO 2021.2 with the following code:

cv::dnn::Net detect = cv::dnn::readNet(
      path + "/face-detection-0206/deploy.xml", path + "/face-detection-0206/model.bin", "DLDT");
  detect.setPreferableBackend(2);

  cv::VideoCapture cap(argv[2]);  // cap(0);

  cv::Mat frame;
  int total_frames = 0;
  float total_time = 0;
  while (true) {
    cap >> frame;

    if (frame.empty()) {
      std::cerr << "End of stream" << std::endl;
      exit(0);
    }
    detect.setInput(cv::dnn::blobFromImage(frame, 1.0, cv::Size(640, 640),
                                           cv::Scalar(), false, false, CV_32F),
                    "image");

    cv::Mat a;
    detect.forward("labels");

Also i get the same problem with cv::dnn::DetectionModel

@vladimir-dudnik
Copy link
Contributor

@campos537 we'll look at OpenCV DNN issue, but meantime you may test these models with Open Model Zoo python object_detection_demo.
@l-bat could you please take a look at the issue from OpenCV DNN point of view

@campos537
Copy link
Author

@vladimir-dudnik thanks, i will test here with the object_detection_demo and check the results!

@campos537
Copy link
Author

@vladimir-dudnik i tested with the latest object_detection_demo using the command line below:
./object_detection_demo -i 0 -m /media/crystal/main_files/Repositorios/eye_is_looking/face_heavy/deploy.xml -at ssd
i got this output here:

[ INFO ] InferenceEngine: 	API version ......... 2.1
	Build ........... 2021.2.0-1877-176bdf51370-releases/2021/2
[ INFO ] Parsing input parameters
[ INFO ] Reading input
[ INFO ] Loading Inference Engine
[ INFO ] Device info: 
[ INFO ] 	CPU
	MKLDNNPlugin version ......... 2.1
	Build ........... 2021.2.0-1877-176bdf51370-releases/2021/2
Loading network files
[ INFO ] Batch size is forced to 1.
[ INFO ] Checking that the inputs are as the demo expects
[ INFO ] Checking that the outputs are as the demo expects
[ ERROR ] [ ERROR ] This demo accepts networks having only one output

@vladimir-dudnik
Copy link
Contributor

@campos537 yeah, but what the model did you use (/media/crystal/main_files/Repositorios/eye_is_looking/face_heavy/deploy.xml)?

Open Model Zoo demo developed and validated on OMZ models, each demo has models.lst file, which you can use as a parameter to model downloader to get models which validated with this demo.

Note, if you still interested to test face-detection-0205/0206 models, they supported in python variant of object_detection_demo.

@campos537
Copy link
Author

sorry i changed the name but is the face-detection-0206. Hmm let me test with the python variant to check! Thanks @vladimir-dudnik .

@campos537
Copy link
Author

Just an update, i tested with python example and worked normally, any reason it don't work with c++ code?

@vladimir-dudnik
Copy link
Contributor

@campos537 face-detection-0205/0206 have two output layers. We did not modified C++ demo to support this yet.

@campos537
Copy link
Author

Thanks for the explanation @vladimir-dudnik! I tested the two output layers "labels" and "boxes" but for some reason didn't worked with C++ OpenCV dnn don't know why.

@vladimir-dudnik
Copy link
Contributor

@campos537 those two a new models, introduced in OpenVINO 2021.2. It might be OpenCV DNN was not updated yet to support them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OpenCV OpenCV issue/question, which is not related to OpenVINO/Open Model Zoo
Projects
None yet
Development

No branches or pull requests

2 participants