9ebc0abc8e85a2fa722aaaf75f8c8793e95ea12f,tools/sort.py,Sort,sort_face,#Sort#,167
Before Change
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...")
indices = self.vgg_face.sorted_similarity(preds, method="ward")
img_list = np.array(filename_list)[indices]
After Change
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)):
filenames.append(filename)
preds[idx] = self.vgg_face.predict(image)
logger.info("Sorting by ward linkage...")
indices = self.vgg_face.sorted_similarity(preds, method="ward")
img_list = np.array(filenames)[indices]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: deepfakes/faceswap
Commit Name: 9ebc0abc8e85a2fa722aaaf75f8c8793e95ea12f
Time: 2019-12-15
Author: 36920800+torzdf@users.noreply.github.com
File Name: tools/sort.py
Class Name: Sort
Method Name: sort_face
Project Name: IndicoDataSolutions/finetune
Commit Name: 206742a88c53942e8a8826b25a7c562f150e581c
Time: 2019-06-20
Author: matthew.bayer@indico.io
File Name: finetune/target_models/deployment_model.py
Class Name: DeploymentModel
Method Name: _inference
Project Name: IndicoDataSolutions/finetune
Commit Name: 3f860ba6ee647b7edf07317c8053390c205ee72e
Time: 2019-06-20
Author: matthew.bayer@indico.io
File Name: finetune/target_models/deployment_model.py
Class Name: DeploymentModel
Method Name: _inference