309470af087c64cb91de6ec6decbd50f43becf90,lib/cli.py,DirectoryProcessor,load_filter,#DirectoryProcessor#,172

Before Change



    def load_filter(self):
        filter_file = self.arguments.filter
        if Path(filter_file).exists():
            print("Loading reference image for filtering")
            return FaceFilter(filter_file)

    // for now, we limit this class responsability to the read of files. images and faces are processed outside this class
    def process(self):
        // implement your image processing!
        raise NotImplementedError()

After Change


        nfilter_files = self.arguments.nfilter
        if not isinstance(self.arguments.nfilter, list):
            nfilter_files = [self.arguments.nfilter]
        nfilter_files = list(filter(lambda fn: Path(fn).exists(), nfilter_files))

        filter_files = self.arguments.filter
        if not isinstance(self.arguments.filter, list):
            filter_files = [self.arguments.filter]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: deepfakes/faceswap
Commit Name: 309470af087c64cb91de6ec6decbd50f43becf90
Time: 2018-03-10
Author: hyyrynen.lasse@gmail.com
File Name: lib/cli.py
Class Name: DirectoryProcessor
Method Name: load_filter


Project Name: pantsbuild/pants
Commit Name: 32479c73b83a9a875a28d1adce327573b39af37e
Time: 2014-04-30
Author: benjy@foursquare.com
File Name: src/python/pants/commands/goal.py
Class Name: Goal
Method Name: setup_parser


Project Name: SeanNaren/deepspeech.pytorch
Commit Name: 906771bf319aa1c5c680638d566b352c63cf6ab2
Time: 2017-02-16
Author: seannaren@hotmail.com
File Name: data/utils.py
Class Name:
Method Name: create_manifest