          """ Output faces to save thread """
          final_faces = list()
          for idx, detected_face in enumerate(faces["detected_faces"]):
              output_file = detected_face["file_location"]
              extension = Path(filename).suffix
              out_filename = "{}_{}{}".format(str(output_file), str(idx), extension)
  
              face = detected_face["face"]
              resized_face = face.aligned_face
  
 
</s> remove             resized_face = face.aligned_face

 </s> add             resized_face = face.feed_face </s> remove     def align_face(self, faces, size, filename):
        """ Align the detected face and add the destination file path """
        final_faces = list()
        image = faces["image"]
        detected_faces = faces["detected_faces"]
        for face in detected_faces:
            face.load_aligned(image, size=size)
            final_faces.append({"file_location": self.output_dir / Path(filename).stem,
                                "face": face})
        faces["detected_faces"] = final_faces

 </s> add  </s> remove         self.align_face(faces, size, filename)
 </s> add         final_faces = list()
        for detected_face in faces["detected_faces"]:
            filename = self.output_dir / Path(detected_face.filename).stem
            final_faces.append({"file_location": filename,
                                "face": detected_face})
        faces["detected_faces"] = final_faces </s> remove             aligned_landmarks = face.aligned_landmarks
 </s> add             aligned_landmarks = face.feed_landmarks </s> remove         feed_faces = np.stack([detected_face.feed_face for detected_face in detected_faces])
 </s> add         feed_faces = np.stack([detected_face.feed_face / 255. for detected_face in detected_faces])
            extension = '.png'
          """ Output faces to save thread """
          final_faces = list()
          for idx, detected_face in enumerate(faces["detected_faces"]):
              output_file = detected_face["file_location"]
            extension = '.png'
              out_filename = "{}_{}{}".format(str(output_file), str(idx), extension)
  
              face = detected_face["face"]
              resized_face = face.aligned_face
  
keep keep keep keep replace keep keep keep keep keep
 Smart Mask Exposure for Extraction & Training (#831)

Smart Masks - Initial Commit 
scripts/extract.py