      def sort_face(self):
          """ Sort by face similarity """
          input_dir = self.args.input_dir
  
          logger.info("Sorting by face similarity...")
  
          images = np.array(self.find_images(input_dir))
          preds = np.array([self.vgg_face.predict(read_image(img, raise_error=True))
                            for img in tqdm(images, desc="loading", file=sys.stdout)])
          logger.info("Sorting. Depending on ths size of your dataset, this may take a few "
 
</s> remove         images = np.array(self.find_images(input_dir))
        preds = np.array([self.vgg_face.predict(read_image(img, raise_error=True))
                          for img in tqdm(images, desc="loading", file=sys.stdout)])
        logger.info("Sorting. Depending on ths size of your dataset, this may take a few "
                    "minutes...")
 </s> add         logger.info("Sorting by ward linkage...") </s> remove         img_list = images[indices]
 </s> add         img_list = np.array(filename_list)[indices] </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() </s> remove         """ Sort by histogram of face similarity """
        input_dir = self.args.input_dir

 </s> add         """ Sort by image histogram similarity """ </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]
        logger.info("Calculating face identifiers...")
        preds = np.array([self.vgg_face.predict(img)
                          for img in tqdm(image_list, desc="Calculating...", file=sys.stdout)])
      def sort_face(self):
          """ Sort by face similarity """
          input_dir = self.args.input_dir
  
        logger.info("Calculating face identifiers...")
        preds = np.array([self.vgg_face.predict(img)
                          for img in tqdm(image_list, desc="Calculating...", file=sys.stdout)])
  
          images = np.array(self.find_images(input_dir))
          preds = np.array([self.vgg_face.predict(read_image(img, raise_error=True))
                            for img in tqdm(images, desc="loading", file=sys.stdout)])
          logger.info("Sorting. Depending on ths size of your dataset, this may take a few "
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