              pts = np.vsplit(face_landmarks[idx], 2)
              boundary = (np.amin(pts[0]), np.amin(pts[1]),
                          np.amax(pts[0]), np.amax(pts[1]))
  
              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))
  
              retval.append(bounding)
          return retval
 
</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         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         if len(faces) == 0:
 </s> add         no_faces = len(faces)
        if no_faces == 0: </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' """
            pad_x = (boundary[2] - boundary[0]) * 0.5
            pad_y = (boundary[3] - boundary[1]) * 0.5
              pts = np.vsplit(face_landmarks[idx], 2)
              boundary = (np.amin(pts[0]), np.amin(pts[1]),
                          np.amax(pts[0]), np.amax(pts[1]))
  
            pad_x = (boundary[2] - boundary[0]) * 0.5
            pad_y = (boundary[3] - boundary[1]) * 0.5
            pad_x = (boundary[2] - boundary[0]) * 0.5
            pad_y = (boundary[3] - boundary[1]) * 0.5
            pad_x = (boundary[2] - boundary[0]) * 0.5
            pad_y = (boundary[3] - boundary[1]) * 0.5
            pad_x = (boundary[2] - boundary[0]) * 0.5
            pad_y = (boundary[3] - boundary[1]) * 0.5
            pad_x = (boundary[2] - boundary[0]) * 0.5
            pad_y = (boundary[3] - boundary[1]) * 0.5
            pad_x = (boundary[2] - boundary[0]) * 0.5
            pad_y = (boundary[3] - boundary[1]) * 0.5
            pad_x = (boundary[2] - boundary[0]) * 0.5
            pad_y = (boundary[3] - boundary[1]) * 0.5
            pad_x = (boundary[2] - boundary[0]) * 0.5
            pad_y = (boundary[3] - boundary[1]) * 0.5
            pad_x = (boundary[2] - boundary[0]) * 0.5
            pad_y = (boundary[3] - boundary[1]) * 0.5
            pad_x = (boundary[2] - boundary[0]) * 0.5
            pad_y = (boundary[3] - boundary[1]) * 0.5
            pad_x = (boundary[2] - boundary[0]) * 0.5
            pad_y = (boundary[3] - boundary[1]) * 0.5
  
              retval.append(bounding)
          return retval
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace 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