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

+1 vote

I am trying to use harrcasecade model to detect my face but I am getting this below error.

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'

How can I solve this error?

Apr 20, 2020 in Machine Learning by akhtar
• 38,210 points
8,223 views

1 answer to this question.

0 votes

Hi@akhtar,

This looks as if you don't load the classifier successfully from the file. Make sure you have harrcasecade file in your folder and read that file first and then try to train your model.

Hope this will work.

answered Apr 20, 2020 by MD
• 95,300 points
thanks a lot.

Related Questions In Machine Learning

+1 vote
1 answer

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-8nhf9w2t/grpcio/

Hi@akhtar, You may get this error because of ...READ MORE

answered May 16, 2020 in Machine Learning by MD
• 95,300 points
17,120 views
0 votes
1 answer

ERROR: PyAudio-0.2.11-cp39-cp39-win32.whl is not a supported wheel on this platform.

Hi@akhtar, You should download the version that is ...READ MORE

answered Sep 6, 2020 in Machine Learning by MD
• 95,300 points
2,279 views
0 votes
1 answer
0 votes
1 answer

What are the options for deploying models in production with R?

Well, I could say that the answer ...READ MORE

answered Apr 12, 2018 in Data Analytics by DataKing99
• 8,240 points
863 views
0 votes
1 answer

Use different distance formula other than euclidean distance in k means

K-means is based on variance minimization. The sum-of-variance formula ...READ MORE

answered Jun 21, 2018 in Data Analytics by Sahiti
• 6,380 points
784 views
0 votes
1 answer

OpenCV Error: Assertion failed (size.width>0 && size.height>0)

Hi@akhtar, You are getting this error, because your ...READ MORE

answered Apr 20, 2020 in Machine Learning by MD
• 95,300 points
7,985 views