                                                int(face[2]), int(face[3]))
                                 for face in detected_faces]
  
      @staticmethod
      def tighten_bounding_box(faces, landmarks):
          """ Tighten the bounding box for Face Alignment.
  
              Face Alignment was built to expect a DLIB bounding
              box and sometimes can't calculate landmarks on edge
              cases. Tightening up the bounding box along the
              longest edge improves it's chances and helps remove
 
</s> remove             box and sometimes can't calculate landmarks on edge
            cases. Tightening up the bounding box along the
            longest edge improves it's chances and helps remove
            'jitter' """
 </s> add             box and calculates center and scale based on that.
            Resize the bounding box around features to present
            a better box to Face Alignment. Helps its chances
            on edge cases and helps remove 'jitter' """ </s> remove         if len(faces) == 0:
 </s> add         no_faces = len(faces)
        if no_faces == 0: </s> remove         detected_faces = self.tighten_bounding_box(detected_faces, points)
 </s> add         detected_faces = self.recalculate_bounding_box(detected_faces, points) </s> remove             len_x, len_y = face[2] - face[0], face[3] - face[1]
            raw = 1 if len_x > len_y else 0 if len_x < len_y else -1
            bounding = list()

            for i in range(4):
                if i % 2 == raw:
                    bounding.append(int(face[i]))
                else:
                    # Reduce bounding box by 75% around landmarks
                    remove = (boundary[i] - face[i]) / 4
                    bounding.append(int(boundary[i] - remove))
 </s> add             pad_x = (boundary[2] - boundary[0]) * 0.5
            pad_y = (boundary[3] - boundary[1]) * 0.5 </s> remove         for frame in self.alignments.alignments.keys():
 </s> add         for frame in tqdm(self.alignments.alignments.keys(),
                          total=len(self.alignments.count)):
    def recalculate_bounding_box(faces, landmarks):
        """ Recalculate the bounding box for Face Alignment.
                                                int(face[2]), int(face[3]))
                                 for face in detected_faces]
  
      @staticmethod
    def recalculate_bounding_box(faces, landmarks):
        """ Recalculate the bounding box for Face Alignment.
    def recalculate_bounding_box(faces, landmarks):
        """ Recalculate the bounding box for Face Alignment.
  
              Face Alignment was built to expect a DLIB bounding
              box and sometimes can't calculate landmarks on edge
              cases. Tightening up the bounding box along the
              longest edge improves it's chances and helps remove
keep keep keep keep replace replace keep keep keep keep keep
 Alignments tool: Extract non-upsized. MTCNN Detector changes (#508)

* Manual alignments: Add progress bars to check task

* Alignments Tool: Extract faces that haven't been upscaled

* MTCNN Update. Center on landmarks 
lib/face_alignment/detectors.py