Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not Running fix #1

Open
mb1319 opened this issue Jul 11, 2022 · 0 comments
Open

Not Running fix #1

mb1319 opened this issue Jul 11, 2022 · 0 comments

Comments

@mb1319
Copy link

mb1319 commented Jul 11, 2022

When cloning and then running the detection.py file I got the following error: [Error:(-215:Assertion failed) !empty() in function 'cv::CascadeClassifier::detectMultiScale'](https://stackoverflow.com/questions/66942582/error-215assertion-failed-empty-in-function-cvcascadeclassifierdetec)

After a quick google the solution was to add cv2.data.haarcascades before referencing the .xml file.

#[...]

face_cascade=cv2.CascadeClassifier(cv2.data.haarcascades + "haarcascade_frontalface_default.xml") #Note the change

#[...]

Source: https://stackoverflow.com/questions/66942582/error-215assertion-failed-empty-in-function-cvcascadeclassifierdetec

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant