          logger.info("Estimating blur...")
          blurs = [self.estimate_blur(img) for img in image_list]
  
          logger.info("Sorting...")
          matched_list = list(zip(filename_list, blurs))
          img_list = sorted(matched_list, key=operator.itemgetter(1), reverse=True)
          return img_list
  
      def sort_face(self):
          """ Sort by identity similarity """
          logger.info("Sorting by identity similarity...")
          self._loader = FacesLoader(self._args.input_dir)  # TODO This should be set in init
 
</s> remove         filename_list, image_list = self._get_images()

        logger.info("Estimating blur...")
        blurs = [self.estimate_blur(img) for img in image_list]
 </s> add  </s> remove         self._loader = FacesLoader(self._args.input_dir)  # TODO This should be set in init
 </s> add  </s> remove         self._loader = FacesLoader(self._args.input_dir)  # TODO This should be set in init
 </s> add  </s> remove         filename_list, image_list = self._get_images()
        distance = cv2.HISTCMP_BHATTACHARYYA
 </s> add 
        return sorted(blurs, key=lambda x: x[1], reverse=True)
          logger.info("Estimating blur...")
          blurs = [self.estimate_blur(img) for img in image_list]
  
          logger.info("Sorting...")
        return sorted(blurs, key=lambda x: x[1], reverse=True)
        return sorted(blurs, key=lambda x: x[1], reverse=True)
        return sorted(blurs, key=lambda x: x[1], reverse=True)
  
      def sort_face(self):
          """ Sort by identity similarity """
          logger.info("Sorting by identity similarity...")
          self._loader = FacesLoader(self._args.input_dir)  # TODO This should be set in init
keep keep keep keep replace replace replace keep keep keep keep keep
 tools.sort
  - Add sort by size
  - Centralize some of the image loading routines 
tools/sort/sort.py