Error While Using eye cascade XML files

eye_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + “F:\Python Udemy\Coding Blocks\Coding Practice\KNN\Assignment\third-party\frontalEyes35x16.xml”)

mustache_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + “F:\Python Udemy\Coding Blocks\Coding Practice\KNN\Assignment\third-party\Nose18x15.xml”)

eye_1=mustache_cascade.detectMultiScale(jamie,1.3,6)

i have searched on stack overflow but didn’t find appropriate answer.

OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\objdetect\src\cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function ‘cv::CascadeClassifier::detectMultiScale’

This error arises as later versions of opencv doesn’t support this formal, uninstall opencv first
and than install any older version using following command,
!pip install opencv-python==4.0.1.23

After this your code will run fine.

Hope this cleared your doubt. :blush:

Just write this command in terminal, older installed version will be automatically removed,

pip install opencv-python==4.0.1.23.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

Hi, This is regarding Relu ,

Hi team, As it is earlier said that back propagation will only work if & only if our activation function is differentiable , but Relu is not diffrentiable at 0 .

You are requested not to post new doubts on previously resolved doubts. Since this is new doubt, ask it in a new thread. This is part of our policies. Our TA’s will be catching you there only.

If you are facing problem in posting doubts mail at [email protected].