2783c27e0027cbae9a3d97a04d33a7ef843fcd72,scripts/fsmedia.py,Alignments,load,#Alignments#,93

Before Change



        except Exception as err:
            print("{} not read!".format(self.location))
            print(str(err))
            data = dict()

        if skip_faces:

After Change


    def load(self):
         Override  parent loader to handle skip existing on extract 
        data = dict()
        if not self.is_extract:
            data = super().load()
            return data

        skip_existing = bool(hasattr(self.args, "skip_existing")
                             and self.args.skip_existing)
        skip_faces = bool(hasattr(self.args, "skip_faces")
                          and self.args.skip_faces)

        if not skip_existing and not skip_faces:
            return data

        if not self.have_alignments_file and (skip_existing or skip_faces):
            print("Skip Existing/Skip Faces selected, but no alignments file "
                  "found!")
            return data

        try:
            with open(self.file, self.serializer.roptions) as align:
                data = self.serializer.unmarshal(align.read())
        except IOError as err:
            print("Error: {} not read: {}".format(self.file, err.strerror))
            exit(1)

        if skip_faces:
            // Remove items from algnments that have no faces so they will
            // be re-detected
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: deepfakes/faceswap
Commit Name: 2783c27e0027cbae9a3d97a04d33a7ef843fcd72
Time: 2018-11-07
Author: 36920800+torzdf@users.noreply.github.com
File Name: scripts/fsmedia.py
Class Name: Alignments
Method Name: load


Project Name: shubhomoydas/ad_examples
Commit Name: 1a760c485685ae7232482e427c19d121ff9312ce
Time: 2018-09-07
Author: smd.shubhomoydas@gmail.com
File Name: python/timeseries/activity_model.py
Class Name:
Method Name:


Project Name: pysb/pysb
Commit Name: d501a8319de317ef7540f4977f9a4fe129539697
Time: 2012-06-12
Author: jmuhlich@bitflood.org
File Name: setup.py
Class Name:
Method Name: main