      global keras_model
      
      (h, w, ch) = input_image.shape
  
      input_scale = scale_to / (w if w > h else h)
      input_image = cv2.resize (input_image, ( int(w*input_scale), int(h*input_scale) ), interpolation=cv2.INTER_LINEAR)
      input_image_bgr = input_image[:,:,::-1].copy() #cv2 and numpy inputs differs in rgb-bgr order, this affects chance of dlib face detection
      input_images = [input_image, input_image_bgr]
   
      detected_faces = []
      for current_detector, input_image in ((current_detector, input_image) for current_detector in dlib_detectors for input_image in input_images):
          detected_faces = current_detector(input_image, 0)
          if len(detected_faces) != 0:
              break
 
</s> remove     for current_detector, input_image in ((current_detector, input_image) for current_detector in dlib_detectors for input_image in input_images):
        detected_faces = current_detector(input_image, 0)
        if len(detected_faces) != 0:
            break
 </s> add     
    if input_is_predetected_face:
        input_scale = 1.0
        detected_faces = [ dlib.rectangle(0, 0, w, h) ]
    else:
        input_scale = scale_to / (w if w > h else h)
        input_image = cv2.resize (input_image, ( int(w*input_scale), int(h*input_scale) ), interpolation=cv2.INTER_LINEAR)
        input_image_bgr = input_image[:,:,::-1].copy() #cv2 and numpy inputs differs in rgb-bgr order, this affects chance of dlib face detection
        input_images = [input_image, input_image_bgr]
        for current_detector, input_image in ((current_detector, input_image) for current_detector in dlib_detectors for input_image in input_images):
            detected_faces = current_detector(input_image, 0)
            if len(detected_faces) != 0:
                break            </s> remove def extract(input_image, detector, verbose, all_faces=True, scale_to=2048):
 </s> add def extract(input_image, detector, verbose, all_faces=True, input_is_predetected_face=False, scale_to=2048): </s> remove             d = FaceLandmarksExtractor.extract(cv2.imread(x), 'cnn', True)
 </s> add             d = FaceLandmarksExtractor.extract(cv2.imread(x), 'cnn', True, input_is_predetected_face=True) </s> remove             d = FaceLandmarksExtractor.extract(cv2.imread(x), 'cnn', True)
 </s> add             d = FaceLandmarksExtractor.extract(cv2.imread(x), 'cnn', True, input_is_predetected_face=True) </s> remove                 d = FaceLandmarksExtractor.extract(cv2.imread(x), 'cnn', True)
 </s> add                 d = FaceLandmarksExtractor.extract(cv2.imread(x), 'cnn', True, input_is_predetected_face=True)
      global keras_model
      
      (h, w, ch) = input_image.shape
  





      detected_faces = []
      for current_detector, input_image in ((current_detector, input_image) for current_detector in dlib_detectors for input_image in input_images):
          detected_faces = current_detector(input_image, 0)
          if len(detected_faces) != 0:
              break
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
 sorttool - fixes, and added --sort-by face-yaw (#312) 
lib/FaceLandmarksExtractor/FaceLandmarksExtractor.py