              pad_y = (boundary[3] - boundary[1]) * 0.5
  
              retval.append(bounding)
          return retval
  
 
</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         face_landmarks = np.hsplit(landmarks, len(faces))
        for idx, face in enumerate(faces):
 </s> add         face_landmarks = np.hsplit(landmarks, no_faces)
        for idx in range(no_faces): </s> remove             boundary = (np.amin(pts[0]), np.amin(pts[1]),
                        np.amax(pts[0]), np.amax(pts[1]))
 </s> add             boundary = [np.amin(pts[0]), np.amin(pts[1]),
                        np.amax(pts[0]), np.amax(pts[1])] </s> remove         if len(faces) == 0:
 </s> add         no_faces = len(faces)
        if no_faces == 0: </s> remove         for item in self.items:
 </s> add         for item in tqdm(self.items, total=len(self.items)):
            bounding = [boundary[0] - pad_x, boundary[1] - pad_y,
                        boundary[2] + pad_x, boundary[3] + pad_y]
            
              pad_y = (boundary[3] - boundary[1]) * 0.5
  
            bounding = [boundary[0] - pad_x, boundary[1] - pad_y,
                        boundary[2] + pad_x, boundary[3] + pad_y]
            
              retval.append(bounding)
          return retval
  
keep add 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