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...")
indices = self.vgg_face.sorted_similarity(preds, method="ward")
After Change
// TODO This should be set in init
self._loader = ImagesLoader(self.args.input_dir)
filenames = []
preds = np.empty((self._loader.count, 512), dtype="float32")
for idx, (filename, image) in enumerate(tqdm(self._loader.load(),
desc="Classifying Faces...",
total=self._loader.count)):