Haarcascade files are not working

the files are not woring,
Invalid HAAR feature (expected: ‘rw.r.x + rw.r.width <= W’), where

'rw.r.x + rw.r.width' is 16

must be less than or equal to
‘W’ is 15

this error is showing up again and again

hey @itzsakshi26gupta ,
kindly check that the haarcascade file that you are using is not corrupt.
or you can share me a link to it and allow me to check it .

Thank You. :slightly_smiling_face:.

https://drive.google.com/drive/folders/1Zp-bH_t_FzepTtyYb34v9u6zS87wrmqf?usp=sharing

in which file are facing error in ?
Kindly also upload your code file on the same drive link.

i have uploaded the code and the the file in which i am facing issues
https://drive.google.com/drive/folders/1Zp-bH_t_FzepTtyYb34v9u6zS87wrmqf?usp=sharing

your code and files are working fine.
Can you please also upload the photo that you are using ,although i don’t think that would make any error.
And also let me know what opencv and python version are you working on.

Thank You.

python version: 3.7.6
open cv Version: 4.2.0.34

the picture has been uploaded
https://drive.google.com/drive/folders/1Zp-bH_t_FzepTtyYb34v9u6zS87wrmqf?usp=sharing

its because of the version errors , as new version of opencv don’t work well on classifiers.
So , try installing opencv with this command
pip install opencv-python==3.4.2.17

and then try the same code . I hope it will work.
Thank You :slightly_smiling_face:.

1 Like