                  model.save_weights()
              except KeyboardInterrupt:
                  print('Saving model weights has been cancelled!')
              exit(0)
  
      preview_buffer = {}
  
      def show(self, image, name=''):
          try:
              if self.arguments.preview:
 
</s> remove                 self.preview_buffer[name] = image
 </s> add                 with self.lock:
                    self.preview_buffer[name] = image </s> remove         for filename in self.read_directory():
 </s> add         for filename in tqdm(self.read_directory()): </s> remove             skip = self.check_skip(filename)

            if not skip: # process as normal
 </s> add             if not self.check_skipframe(filename): # process as normal </s> remove                     for name, image in self.preview_buffer.items():
                        cv2.imshow(name, image)
 </s> add                     with self.lock:
                        for name, image in self.preview_buffer.items():
                            cv2.imshow(name, image) </s> remove         extractor = PluginLoader.get_extractor(extractor_name)()
 </s> add         self.extractor = PluginLoader.get_extractor(extractor_name)()
        self.faces_detected = 0
        processes = self.arguments.processes
        if processes != 1:
            files = list(self.read_directory())
            for _ in tqdm(pool_process(self.processFiles, files, processes=processes), total = len(files)):
                self.faces_detected +=1
        else:
            try:
                for filename in tqdm(self.read_directory()):
                    self.handleImage(filename)

            except Exception as e:
                print('Failed to extract from image: {}. Reason: {}'.format(filename, e))
        except Exception as e:
            print(e)
            exit(1)
    
                  model.save_weights()
              except KeyboardInterrupt:
                  print('Saving model weights has been cancelled!')
              exit(0)
        except Exception as e:
            print(e)
            exit(1)
    
      preview_buffer = {}
  
      def show(self, image, name=''):
          try:
              if self.arguments.preview:
keep keep keep keep 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/train.py