Every time I use cv2.CasacadeClassifier on the nose file or the eyes file it seems to give the error <class ‘cv2.CascadeClassifier’> returned a result with an error set
I am trying to use the line cv2.CascadeClassifier(‘Nose18x15.xml’) and cv2.CascadeClassifier(‘frontalEyes35x16’) for eyes and nose respectively.
The haar cascade files do not seem to work properly
Hey @rahul.bisht16,
This should not be the case. Might be your files are corrupted, Just download the eyes and nose xml file again.
I hope you have done frontface detection. In that case also there was a xml file to be loaded with cv2.CascadeClassifier, and now eyes and nose also xml files. Just make sure everything is correct and it will work fine.
Thanks
I’m also facing the same problem as stated by @rahul.bisht16.
I’ve downloaded the eyes and nose xml files again, but the problem is not solved from this.
So please help.I’ve attached the image of error.
Try this :
cv2.CascadeClassifier(cv2.data.haarcascades + "your_xml_file.xml")
I am facing the same issue. I also tried cv2.data.haarcascades but it is showing an error that cv2.cv2 has no attr ‘data’.
getting error;-
Traceback (most recent call last):
File “face_detection.py”, line 4, in
eye_cascade = cv2.CascadeClassifier(‘Train/third-party/frontalEyes35x16.xml’)
SystemError: <class ‘cv2.CascadeClassifier’> returned a result with an error set
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.
I am also getting the same error. Did u solve it??