Robotics StackExchange | Archived questions

CV2 DNN face detection assertion failed

Basically it's the same problem with https://answers.ros.org/question/294476/ros-kinetic-dnn-opencv-error-assertion-failed-cv2error-error-215-bashrc-deep-learning/

I tried the tutorial from https://www.pyimagesearch.com/2018/02/26/face-detection-with-opencv-and-deep-learning/ but it said "OpenCV Error: Assertion failed (input.dims == 4 && (input.type() == 5 || input.type() == 6)) in finalize, file /tmp/binarydeb/ros-kinetic-opencv3-3.3.1/modules/dnn/src/layers/convolution_layer.cpp, line 78"

Is it because the Python in ROS is 2.7 and the DNN need python 3? I tried in my friend's laptop which is installed with ROS and gave same error. Could anyone help me to integrate this with ROS?

Thank you

Asked by hansenmaster on 2018-11-24 02:17:10 UTC

Comments

I have exactly the same problem. But I think I have found the problem. If you look for the samples/dnn/face_detector folder you will not find it. Hence, the problem is the OpenCV version preinstalled with ROS. Now I am trying to use OpenCV 3.4.4 with ROS which has the necessary files.

Asked by pskampas on 2018-12-20 09:51:13 UTC

Hi, I have the same problem, Can you please tell me how can I install another version (other than 3.3.1) of OpenCV with ROS ? Your help will be highly appreciated. @pskampas

Asked by Ibrahim_aerospace on 2019-07-21 13:59:37 UTC

Answers