Error in Face detection

Hi Bhaiya my face detection code is showing error

OpenCV(4.2.0) C:\projects\opencv-python\opencv\modules\objdetect\src\cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function ‘cv::CascadeClassifier::detectMultiScale’

This is showing error at line
faces = face_cascade.detectMultiScale(frame,1.3,5)

Hey @balyan236 , make sure haarcascade_frontalface_alt.xml exists in the same folder as is your .py file.
In the lecture bhaiya told about the haarcascade_frontalface_alt.xml file download that and put in the same folder as in the python file.
I hope it is clear to you. In case it is clear to you pls mark it as resolve and provide the rating as well as feedback so that we can improve ourselves.
In case there is still some confusion pls let me know, I will surely try to help you out.
Thanks :slight_smile:
Happy Coding !!