  
      def handleImage(self, filename):
          count = 0
  
          image = cv2.imread(filename)
          faces = self.get_faces(image)
          rvals = []
          for idx, face in faces:
              count = idx
  
 
</s> remove     def handleImage(self, filename):
 </s> add     def handleImage(self, image): </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) </s> remove             return self.handleImage(filename)
 </s> add             image = cv2.imread(filename)
            return filename, self.handleImage(image) </s> remove         return filename, rvals
 </s> add         return rvals
  
      def handleImage(self, filename):
          count = 0
  

          faces = self.get_faces(image)
          rvals = []
          for idx, face in faces:
              count = idx
  
keep keep keep keep replace keep keep keep keep keep
 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