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 "
"minutes...")
After Change
logger.info("Sorting by identity similarity...")
filename_list, image_list = self._get_images()
logger.info("Calculating face identifiers...")
preds = np.array([self.vgg_face.predict(img)
for img in tqdm(image_list, desc="Calculating...", file=sys.stdout)])
logger.info("Sorting by ward linkage...")