title: FDDB evaluation code
body: <p>I'm studying opencv and dlib, for a face detector to use on a university project, and I'm really new at this whole thing of machine learning and computer vision. How can I use the evaluation code from <a href="http://vis-www.cs.umass.edu/fddb/results.html" rel="nofollow noreferrer">FDDB</a> to evaluate my code for face detection? I'm using dlib's CNN method for detecting faces from images.</p>
  
  <pre><code>import cv2
  import dlib
  
  image = cv2.imread('..\\pessoas\\beatles.jpg')
  
  detector = dlib.cnn_face_detection_model_v1("..\\mmods\\mmod_human_face_detector.dat")
  detectedFaces = detector(image)
  
  for face in detectedFaces:
      l, t, r, b, c = (int(face.rect.left()), int(face.rect.top()), int(face.rect.right()), int(face.rect.bottom()),
                   face.confidence)
      cv2.rectangle(image, (l, t), (r, b), (255, 0, 0), 2)
  
  cv2.imshow("CNN Detector", image)
  cv2.waitKey(0)
  cv2.destroyAllWindows()
  </code></pre>
  
  <p>As you can see the code is pretty simple, but I have to calculate precision, recall, and F1-score to plot the ROC curves and I'm don't know yet how to do it, the readme on the project's <a href="https://github.com/npinto/fddb-evaluation" rel="nofollow noreferrer">github</a> doesn't help.</p>