                           desc="Loading",
                           file=sys.stdout)]
          logger.info("Sorting...")
  
          img_list = sorted(img_list, key=operator.itemgetter(1), reverse=True)
  
          return img_list
  
      def sort_face(self):
          """ Sort by face similarity """
 
</s> remove         input_dir = self.args.input_dir

        logger.info("Sorting by blur...")
        img_list = [[img, self.estimate_blur(img)]
                    for img in
                    tqdm(self.find_images(input_dir),
                         desc="Loading",
                         file=sys.stdout)]
        logger.info("Sorting...")
 </s> add         logger.info("Sorting by estimated image blur...")
        filename_list, image_list = self._get_images() </s> remove         img_list = []
        for img in tqdm(self.find_images(input_dir),
                        desc="Loading",
                        file=sys.stdout):
            landmarks = self.get_landmarks(img)
            img_list.append(
                [img, self.calc_landmarks_face_yaw(np.array(landmarks))])

        logger.info("Sorting by face-yaw...")
        img_list = sorted(img_list, key=operator.itemgetter(1), reverse=True)
 </s> add         logger.info("Estimating yaw...")
        yaws = [self.calc_landmarks_face_yaw(mark) for mark in landmarks] </s> remove         """ Sort by face similarity """
        input_dir = self.args.input_dir
 </s> add         """ Sort by identity similarity """
        logger.info("Sorting by identity similarity...")
        filename_list, image_list = self._get_images()
        logger.info("Estimating blur...")
        blurs = [self.estimate_blur(img) for img in image_list]
                           desc="Loading",
                           file=sys.stdout)]
          logger.info("Sorting...")
  
        logger.info("Estimating blur...")
        blurs = [self.estimate_blur(img) for img in image_list]
  
          return img_list
  
      def sort_face(self):
          """ Sort by face similarity """
keep keep keep keep replace keep keep keep keep keep
 ENHANCEMENT: Sort image multi-threading and code clarity (#912)

* Use multi-threaded loading

* fast reload

* remove landmark stub

* saves

* correct face sort

* pep8 
tools/sort.py