          self._loader = FacesLoader(self._args.input_dir)  # TODO This should be set in init
          filenames = []
          preds = []
          for filename, image, metadata in tqdm(self._loader.load(),
                                                desc="Classifying Faces...",
                                                total=self._loader.count,
                                                leave=False):
              if not metadata:
                  msg = ("The images to be sorted do not contain alignment data. Images must have "
                         "been generated by Faceswap's Extract process.\nIf you are sorting an "
 
</s> remove                                               desc="Classifying Faces...",
 </s> add                                               desc="Classifying Faces", </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         matched_list = list(zip(filename_list, blurs))
        img_list = sorted(matched_list, key=operator.itemgetter(1), reverse=True)
        return img_list
 </s> add         return sorted(blurs, key=lambda x: x[1], reverse=True) </s> remove         logger.info("Calculating histograms...")
        histograms = [cv2.calcHist([img], [0], None, [256], [0, 256]) for img in image_list]
        img_list = list(zip(filename_list, histograms))
 </s> add         # TODO We have metadata here, so we can mask the face for hist sorting
        img_list = [(filename, cv2.calcHist([image], [0], None, [256], [0, 256]))
                    for filename, image, _ in tqdm(self._loader.load(),
                                                   desc="Calculating histograms",
                                                   total=self._loader.count,
                                                   leave=False)]
                                              desc="Classifying Faces",
          self._loader = FacesLoader(self._args.input_dir)  # TODO This should be set in init
          filenames = []
          preds = []
          for filename, image, metadata in tqdm(self._loader.load(),
                                              desc="Classifying Faces",
                                                total=self._loader.count,
                                                leave=False):
              if not metadata:
                  msg = ("The images to be sorted do not contain alignment data. Images must have "
                         "been generated by Faceswap's Extract process.\nIf you are sorting an "
keep keep keep keep replace keep keep keep keep keep
 tools.sort
  - Add sort by size
  - Centralize some of the image loading routines 
tools/sort/sort.py