  
      def get_first_rect(self, img):
          rects = self.get_rects(img)
          if len(rects) > 0:
              return rects[0]
          else:
              return None
  
      def get_landmarks(self, img, rect):
          return np.matrix([[p.x, p.y] for p in self.predictor(img, rect).parts()])
 
</s> remove         rects = self.detector(img)
 </s> add         rects = self.detector(img, 1)
 </s> remove     def __init__(self, pred):
        self.detector = dlib.get_frontal_face_detector()
 </s> add     def __init__(self, pred, detect):
        self.detector = dlib.cnn_face_detection_model_v1(detect)
 </s> remove aligner = Aligner("shape_predictor_68_face_landmarks.dat")
 </s> add aligner = Aligner("shape_predictor_68_face_landmarks.dat","mmod_human_face_detector.dat")
            return rects[0].rect

  
      def get_first_rect(self, img):
          rects = self.get_rects(img)
          if len(rects) > 0:
            return rects[0].rect
          else:
              return None
  
      def get_landmarks(self, img, rect):
          return np.matrix([[p.x, p.y] for p in self.predictor(img, rect).parts()])
keep keep keep keep replace keep keep keep keep keep
 Different aligner setup

Using cnn_face_detection_model_v1 as per
https://www.reddit.com/r/deepfakes/comments/7kfva4/face_alignment_with_d
lib/

Note this gives good result on trump/cage, but not on the group photos
I tried 
lib/aligner.py