9ebc0abc8e85a2fa722aaaf75f8c8793e95ea12f,tools/sort.py,Sort,sort_face,#Sort#,167

Before 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...")

After Change


        logger.info("Sorting by identity similarity...")

        // 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)):
            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]
Italian Trulli
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: ilastik/ilastik
Commit Name: 31987e99d495f8eafc83fa5294be44a746c51e19
Time: 2018-04-25
Author: carstenhaubold@googlemail.com
File Name: lazyflow/classifiers/pytorchLazyflowClassifier.py
Class Name: PyTorchLazyflowClassifier
Method Name: predict_probabilities_pixelwise


Project Name: ilastik/ilastik
Commit Name: eee44cb44984b803a0c4a0e6a2b41b48b200989e
Time: 2018-11-26
Author: carstenhaubold@googlemail.com
File Name: lazyflow/classifiers/pytorchLazyflowClassifier.py
Class Name: PyTorchLazyflowClassifier
Method Name: predict_probabilities_pixelwise