Unable to use the nose xml file

what function are we supposed to get data from the nose xml file… as we used the CascadeClassifier in the lecture for detecting the face and what parameters am i supose to pass… till now i have the input img read and what outpu it must give… I have the knn algo ready

1 face_cascade = cv2.CascadeClassifier(‘cb/6. Project - Face Recognition/Face Recognition Project/hr.xml’) ----> 2 eye_cascade = cv2.CascadeClassifier(’…/Snapchart/Eyes.xml’)

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

--------------------------------------------------------------------------- error Traceback (most recent call last) error: OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\objdetect\src\cascadedetect.cpp:569: error: (-2:Unspecified error) in function ‘bool _cdecl cv::HaarEvaluator::Feature::read(const class cv::FileNode &,const class cv::Size &)’ > Invalid HAAR feature (expected: ‘rw.r.x + rw.r.width <= W’), where > ‘rw.r.x + rw.r.width’ is 22 > must be less than or equal to > ‘W’ is 16

Hey @apsdk000, downgrade the opencv 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.