Xml files not reading

i am receiving this error in reading xml files

class ‘cv2.CascadeClassifier’> returned a result with an error set


code is


import cv2

import numpy as np

face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + “haarcascade_frontalface_alt.xml”)

eyes_cascade = cv2.CascadeClassifier( “Train/third-party/frontalEyes35x16.xml”)

nose_cascade = cv2.CascadeClassifier(“Train/third-party/Nose18x15.xml”)

glasses = cv2.imread(“Train/glasses.png”, -1)

mustaches = cv2.imread(“Train/mustache.png”)


error is in eyes_cascade line

Hey @yashb4569 downgrade the openc version,
pip install opencv-python==3.4.3.18 or any other version that is 3.4.3.* if .18 is not available.

Hope this resolved your doubt.
Plz mark the doubt as resolved in my doubts section. :blush:

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.