                              help="Average color adjust. (Adjust converter only)")
          return parser
      
      def process(self):
          # Original model goes with Adjust or Masked converter
          # does the LowMem one work with only one? 
          # seems to work with both in testing - although Adjust with LowMem 
          # looks a real mess - you can see that it is "working"
          model_name = self.arguments.trainer
          conv_name = self.arguments.converter
          
          model = PluginLoader.get_model(model_name)(self.arguments.model_dir)
          if not model.load(self.arguments.swap_model):
 
</s> remove         trainer = trainer if trainer != "Lowmem" else "LowMem"
 </s> add         trainer = "LowMem" if trainer.lower() == "lowmem" else trainer </s> remove                 self.preview_buffer[name] = image
 </s> add                 with self.lock:
                    self.preview_buffer[name] = image </s> remove         self.encoding = face_recognition.face_encodings(image)[0] # Note: we take only first face, so the reference file should only contain one face. We could also keep all faces found and filter against multiple faces
 </s> add         self.encoding = face_recognition.face_encodings(image)[0] # Note: we take only first face, so the reference file should only contain one face.
 </s> remove         
 </s> add     def add_optional_arguments(self, parser):
        parser.add_argument('-D', '--detector',
                            type=str,
                            choices=("hog", "cnn"), # case sensitive because this is used to load a plugin.
                            default="hog",
                            help="Detector to use. 'cnn' detects much more angles but will be much more resource intensive and may fail on large files.")

        parser.add_argument('-f', '--filter',
                            type=str,
                            dest="filter",
                            default="filter.jpg",
                            help="Reference image for the person you want to process. Should be a front portrait"
                            )

        parser.add_argument('-j', '--processes',
                            type=int,
                            help="Number of processes to use.")
        return parser
 </s> remove         encodings = face_recognition.face_encodings(detected_face.image)[0] # we could use detected landmarks, but I did not manage to do so
        score = face_recognition.face_distance([self.encoding], encodings)
        print(score)
        return score <= self.threshold

 </s> add         encodings = face_recognition.face_encodings(detected_face.image) # we could use detected landmarks, but I did not manage to do so. TODO The copy/paste below should help
        if encodings is not None and len(encodings) > 0:
            score = face_recognition.face_distance([self.encoding], encodings[0])
            print(score)
            return score <= self.threshold
        else:
            print("No face encodings found")
            return False

        # Original & LowMem models go with Adjust or Masked converter
                              help="Average color adjust. (Adjust converter only)")
          return parser
      
      def process(self):
        # Original & LowMem models go with Adjust or Masked converter
        # Original & LowMem models go with Adjust or Masked converter
        # Original & LowMem models go with Adjust or Masked converter
        # Original & LowMem models go with Adjust or Masked converter
          model_name = self.arguments.trainer
          conv_name = self.arguments.converter
          
          model = PluginLoader.get_model(model_name)(self.arguments.model_dir)
          if not model.load(self.arguments.swap_model):
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Misc updates on master before GAN. Added multithreading + mmod face detector (#109)

* Preparing GAN plugin

* Adding multithreading for extract

* Adding support for mmod human face detector

* Adding face filter argument

* Added process number argument to multiprocessing extractor.

Fixed progressbar for multiprocessing.

* Added tiff as image type.
compression artefacts hurt my feelings.

* Cleanup 
scripts/convert.py