              is_final = self.extractor.final_pass
              detected_faces = dict()
              self.extractor.launch()
              self.check_thread_error()
              for idx, faces in enumerate(tqdm(self.extractor.detected_faces(),
                                               total=to_process,
                                               file=sys.stdout,
                                               desc="Running pass {} of {}: {}".format(
                                                   phase + 1,
                                                   self.extractor.passes,
                                                   self.extractor.phase.title()))):
                  self.check_thread_error()
                  exception = faces.get("exception", False)
                  if exception:
                      break
                  filename = faces["filename"]
 
</s> remove                     self.output_processing(faces, align_eyes, size, filename)
 </s> add                     self.output_processing(faces, size, filename) </s> remove             detected_face.load_aligned(src_img, self.size, align_eyes=False)
 </s> add             detected_face.load_aligned(src_img, self.size) </s> remove 
        (l_start, l_end) = FACIAL_LANDMARKS_IDXS["left_eye"]
        (r_start, r_end) = FACIAL_LANDMARKS_IDXS["right_eye"]
        (m_start, m_end) = FACIAL_LANDMARKS_IDXS["mouth"]
        (n_start, n_end) = FACIAL_LANDMARKS_IDXS["nose"]
        (lb_start, lb_end) = FACIAL_LANDMARKS_IDXS["left_eyebrow"]
        (rb_start, rb_end) = FACIAL_LANDMARKS_IDXS["right_eyebrow"]
        (c_start, c_end) = FACIAL_LANDMARKS_IDXS["chin"]

        l_eye_points = aligned_landmarks_68[l_start:l_end].tolist()
        l_brow_points = aligned_landmarks_68[lb_start:lb_end].tolist()
        r_eye_points = aligned_landmarks_68[r_start:r_end].tolist()
        r_brow_points = aligned_landmarks_68[rb_start:rb_end].tolist()
        nose_points = aligned_landmarks_68[n_start:n_end].tolist()
        chin_points = aligned_landmarks_68[c_start:c_end].tolist()
        mouth_points = aligned_landmarks_68[m_start:m_end].tolist()
        l_eye_points = l_eye_points + l_brow_points
        r_eye_points = r_eye_points + r_brow_points
        mouth_points = mouth_points + nose_points + chin_points

        l_eye_hull = cv2.convexHull(np.array(l_eye_points).reshape(
            (-1, 2)).astype(int)).flatten().reshape((-1, 2))
        r_eye_hull = cv2.convexHull(np.array(r_eye_points).reshape(
            (-1, 2)).astype(int)).flatten().reshape((-1, 2))
        mouth_hull = cv2.convexHull(np.array(mouth_points).reshape(
            (-1, 2)).astype(int)).flatten().reshape((-1, 2))
 </s> add         l_eye_points = aligned_landmarks_68[42:48].tolist()
        l_brow_points = aligned_landmarks_68[22:27].tolist()
        r_eye_points = aligned_landmarks_68[36:42].tolist()
        r_brow_points = aligned_landmarks_68[17:22].tolist()
        nose_points = aligned_landmarks_68[27:36].tolist()
        chin_points = aligned_landmarks_68[8:11].tolist()
        mouth_points = aligned_landmarks_68[48:68].tolist()
        # TODO remove excessive reshapes and flattens

        l_eye = np.array(l_eye_points + l_brow_points).reshape((-1, 2)).astype(int).flatten()
        r_eye = np.array(r_eye_points + r_brow_points).reshape((-1, 2)).astype(int).flatten()
        mouth = np.array(mouth_points + nose_points + chin_points)
        mouth = mouth.reshape((-1, 2)).astype(int).flatten()
        l_eye_hull = cv2.convexHull(l_eye.reshape((-1, 2)))  # pylint: disable=no-member
        r_eye_hull = cv2.convexHull(r_eye.reshape((-1, 2)))  # pylint: disable=no-member
        mouth_hull = cv2.convexHull(mouth.reshape((-1, 2)))  # pylint: disable=no-member
 </s> remove             face.load_aligned(image, size=size, align_eyes=align_eyes)
 </s> add             face.load_aligned(image, size=size) </s> remove     def align_face(self, faces, align_eyes, size, filename):
 </s> add     def align_face(self, faces, size, filename):
            desc = "Running pass {} of {}: {}".format(phase + 1,
                                                      self.extractor.passes,
                                                      self.extractor.phase.title())
            status_bar = tqdm(self.extractor.detected_faces(),
                              total=to_process,
                              file=sys.stdout,
                              desc=desc)
            for idx, faces in enumerate(status_bar):
              is_final = self.extractor.final_pass
              detected_faces = dict()
              self.extractor.launch()
              self.check_thread_error()
            desc = "Running pass {} of {}: {}".format(phase + 1,
                                                      self.extractor.passes,
                                                      self.extractor.phase.title())
            status_bar = tqdm(self.extractor.detected_faces(),
                              total=to_process,
                              file=sys.stdout,
                              desc=desc)
            for idx, faces in enumerate(status_bar):
            desc = "Running pass {} of {}: {}".format(phase + 1,
                                                      self.extractor.passes,
                                                      self.extractor.phase.title())
            status_bar = tqdm(self.extractor.detected_faces(),
                              total=to_process,
                              file=sys.stdout,
                              desc=desc)
            for idx, faces in enumerate(status_bar):
            desc = "Running pass {} of {}: {}".format(phase + 1,
                                                      self.extractor.passes,
                                                      self.extractor.phase.title())
            status_bar = tqdm(self.extractor.detected_faces(),
                              total=to_process,
                              file=sys.stdout,
                              desc=desc)
            for idx, faces in enumerate(status_bar):
            desc = "Running pass {} of {}: {}".format(phase + 1,
                                                      self.extractor.passes,
                                                      self.extractor.phase.title())
            status_bar = tqdm(self.extractor.detected_faces(),
                              total=to_process,
                              file=sys.stdout,
                              desc=desc)
            for idx, faces in enumerate(status_bar):
            desc = "Running pass {} of {}: {}".format(phase + 1,
                                                      self.extractor.passes,
                                                      self.extractor.phase.title())
            status_bar = tqdm(self.extractor.detected_faces(),
                              total=to_process,
                              file=sys.stdout,
                              desc=desc)
            for idx, faces in enumerate(status_bar):
            desc = "Running pass {} of {}: {}".format(phase + 1,
                                                      self.extractor.passes,
                                                      self.extractor.phase.title())
            status_bar = tqdm(self.extractor.detected_faces(),
                              total=to_process,
                              file=sys.stdout,
                              desc=desc)
            for idx, faces in enumerate(status_bar):
            desc = "Running pass {} of {}: {}".format(phase + 1,
                                                      self.extractor.passes,
                                                      self.extractor.phase.title())
            status_bar = tqdm(self.extractor.detected_faces(),
                              total=to_process,
                              file=sys.stdout,
                              desc=desc)
            for idx, faces in enumerate(status_bar):
                  self.check_thread_error()
                  exception = faces.get("exception", False)
                  if exception:
                      break
                  filename = faces["filename"]
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
 Align eyes deprecation (#851)

* align eyes removal

* add align_eyes tool 
scripts/extract.py