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

Loading Haar Cascade data for Face Detection tutorial #236

Open
bnlcas opened this issue Apr 8, 2020 · 0 comments
Open

Loading Haar Cascade data for Face Detection tutorial #236

bnlcas opened this issue Apr 8, 2020 · 0 comments

Comments

@bnlcas
Copy link

bnlcas commented Apr 8, 2020

The tutorial for Face Detection with Haar Cascades is a really helpful resource. Unfortunately on some installations of opencv the xml file for the trained haar model is not properly linked. A call of cv2.data.haarcascades should resolve this issue for people.

I would like to propose the following change:
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
to:
face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + 'haarcascade_frontalface_default.xml')

I would be happy to submit a pull request to switch this if there are no issues here.

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