1

I want to find the accuracy of running OpenCV's Cascade Classifier's on MIT CBCL Face database. Specifically, I want to find the accuracy of this and this XML.

When I run the following code, no face is detected on the MIT dataset:

total_faces=0
for each_image in dirs:
   img = cv2.imread(base_path+"/"+each_image)
   img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)

   faces = face_cascade.detectMultiScale(img)
   total_faces += len(faces)

I have even tried to rescale the image using img = cv2.resize(img, (20, 20)) as the window-size in the XML is 20*20 but to no avail.

Please suggest what be done. Thanks!

Dilpreet Kaur
  • 465
  • 2
  • 4
  • 12

0 Answers0