How to load cascade?

Hi there.

Im trying to load cascade for my rescue people problem but i cant load the recomended method to detect faces. I tried this:

face_cascade_name = ‘RoboticsAcademy/exercises/static/exercises/rescue_people/haarcascade_frontalface_default.xml’
face_cascade = cv.CascadeClassifier()
#-- 1. Load the cascades

if not face_cascade.load(cv.samples.findFile(face_cascade_name)):
print(‘–(!)Error loading face cascade’)

You are calling cv.CascadeClassifier without any configuration file!. Just use that method to set the particular classifier configuration file for the detector. Similar to OpenCV: cv::CascadeClassifier Class Reference

I dont understand, doesnt that file work?

You are calling cv.CascadeClassifier() without any parameter!.. Just read the documentation in the link I provided, you should provide a configuration file to that method call.

Ok now i understand, it seems that this route ‘RoboticsAcademy/exercises/static/exercises/rescue_people/haarcascade_frontalface_default.xml’ is not longer supported.

Is there any alternative inside RoboticsAcademy??

/RoboticsAcademy/exercises/static/exercises/rescue_people_newmanager/haarcascade_frontalface_default.xml is a valid configuration file. Use it in the cv.CascadeClassifier call.

Now it seems to be working, thanks, i will come back if any problem emerges