                  "h": face.h,
                  "landmarksXY": face.landmarksAsXY()
              }
              rvals.append(f)
          return filename, rvals
 
</s> remove             return self.handleImage(filename)
 </s> add             image = cv2.imread(filename)
            return filename, self.handleImage(image) </s> remove     def handleImage(self, filename):
 </s> add     def handleImage(self, image): </s> remove         image = cv2.imread(filename)
 </s> add  </s> remove                          self.faces_detected[os.path.basename(filename)] = self.handleImage(filename)[1]
 </s> add                         image = cv2.imread(filename)
                        self.faces_detected[os.path.basename(filename)] = self.handleImage(self, image)
        return rvals
                  "h": face.h,
                  "landmarksXY": face.landmarksAsXY()
              }
              rvals.append(f)
        return rvals
keep keep keep keep replace
 Refactoring scripts/extract.py (#216)

Refactored extract to have handleImage take in a image instead of a filename. This will be useful for writing future extensions for extract where you may not have a file on disk but you do have a image in memory. For example extracting faces from a video. 
scripts/extract.py