          """ Update smoothed landmarks back to alignments """
          for idx, frame in tqdm(self.mappings.items(), desc="Updating"):
              landmarks_update = landmarks[:, :, idx].astype(int)
              landmarks_xy = landmarks_update.reshape(68, 2).tolist()
              self.alignments.alignments[frame][0]["landmarksXY"] = landmarks_xy
 
</s> remove         extracted = self.extracted_faces
        size = extracted.size

        faces = extracted.get_faces_for_frame(frame)

        landmarks_xy = [alignment["landmarksXY"] for alignment in alignments]
        landmarks = [
            {"landmarksXY": aligned}
            for aligned
            in extracted.get_aligned_landmarks_for_frame(frame, landmarks_xy)]

        return FacesDisplay(faces, landmarks, size, self.interface)
 </s> add         faces = self.extracted_faces.get_faces_in_frame(frame)
        landmarks = [{"landmarksXY": face.aligned_landmarks}
                     for face in self.extracted_faces.faces]
        return FacesDisplay(faces,
                            landmarks,
                            self.extracted_faces.size,
                            self.interface) </s> remove class Rotate():
    """ Rotate landmarks and bounding boxes on legacy alignments
 </s> add class Legacy():
    """ Update legacy alignments:

        - Add frame dimensions
        - Rotate landmarks and bounding boxes on legacy alignments </s> remove class Rotate():
    """ Rotating landmarks and bounding boxes on legacy alignments
 </s> add class Legacy():
    """ Update legacy alignments:

        - Add frame dimensions
        - Rotate landmarks and bounding boxes on legacy alignments </s> remove         alignments = self.alignments.get_alignments_for_frame(frame)
 </s> add         alignments = self.alignments.get_faces_in_frame(frame) </s> remove     def adjust_avg_color(self,img_old,img_new):
        w,h,c = img_new.shape
        for i in range(img_new.shape[-1]):
            old_avg = img_old[:, :, i].mean()
            new_avg = img_new[:, :, i].mean()
 </s> add     @staticmethod
    def adjust_avg_color(old_face, new_face):
        """ Perform average color adjustment """
        for i in range(new_face.shape[-1]):
            old_avg = old_face[:, :, i].mean()
            new_avg = new_face[:, :, i].mean()
            self.alignments.data[frame][0]["landmarksXY"] = landmarks_xy
          """ Update smoothed landmarks back to alignments """
          for idx, frame in tqdm(self.mappings.items(), desc="Updating"):
              landmarks_update = landmarks[:, :, idx].astype(int)
              landmarks_xy = landmarks_update.reshape(68, 2).tolist()
            self.alignments.data[frame][0]["landmarksXY"] = landmarks_xy
keep keep keep keep replace
 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 
tools/lib_alignments/jobs.py