          for idx, face in enumerate(faces["detected_faces"]):
              if self.export_face:
                  save_queue.put((filename,
                                  output_file,
                                  resized_faces[idx],
                                  idx))
  
              final_faces.append(face.to_alignment())
          self.alignments.data[os.path.basename(filename)] = final_faces
  
 
</s> remove         resized_faces = faces["resized_faces"]
 </s> add  </s> remove                 cv2.imwrite(filename, image)
 </s> add                 cv2.imwrite(filename, image)  # pylint: disable=no-member </s> remove         for idx, face in enumerate(output_item["detected_faces"]):
            resized_face = output_item["resized_faces"][idx]
            dims = resized_face.shape[:2]
            size = dims[0]
            t_mat = output_item["t_mats"][idx]

            aligned_landmarks = extractor.transform_points(
                face.landmarksXY,
                t_mat, size, 48)
 </s> add         for face in output_item["detected_faces"]:
            aligned_landmarks = face.aligned_landmarks
            resized_face = face.aligned_face
            size = face.aligned["size"] </s> remove 
    def get_aligned_landmarks_for_frame(self, frame, landmarks_xy,
                                        update=False):
        """ Return the transposed landmarks for the selected face """
        if self.current_frame != frame or update:
            self.get_faces(frame)
        aligned_landmarks = list()
        if not self.matrices:
            return aligned_landmarks
        for idx, landmarks in enumerate(landmarks_xy):
            matrix = self.matrices[idx]
            aligned_landmarks.append(
                self.extractor.transform_points(landmarks,
                                                matrix,
                                                self.size,
                                                self.padding))
        return aligned_landmarks
 </s> add  </s> remove         faces = self.extracted_faces.get_faces_for_frame(frame)
 </s> add         faces = self.extracted_faces.get_faces_in_frame(frame)
                                face.aligned_face,
          for idx, face in enumerate(faces["detected_faces"]):
              if self.export_face:
                  save_queue.put((filename,
                                  output_file,
                                face.aligned_face,
                                  idx))
  
              final_faces.append(face.to_alignment())
          self.alignments.data[os.path.basename(filename)] = final_faces
  
keep keep keep keep replace keep keep keep keep keep
 Fix convert-adjust (#531)

* Add dimensions to alignments + refactor

* Add frame_dims + funcs to DetectFaces. Add alignments lib

* Convert Adjust working

* Refactor and tidy up 
scripts/extract.py