Hello! i have a problem with my code. when i run it (vs code) i have this error faces= face_cascade.detectMultiScale(gray_img, scaleFactor=1.05,minNeighbors=5)
cv2.error: OpenCV(4.5.1) C:\Users\appveyor\AppData\Local\Temp\1\pip-req-build-wvn_it83\opencv\modules\objdetect\src\cascadedetect.cpp:1689: error: (-215:Assertion failed) !empty() in function ‘cv::CascadeClassifier::detectMultiScale’. Can somebody tell me what i do wrong?
face_cascade model seem empty. check path to model
If you read it from file then first try /full/path/to/file/with/model
because it may run code in different folder then you expect and it may not find file with model.
A post was split to a new topic: CascadeClassifier is empty