  import cv2
  
  class Extract(object):
      def extract(self, image, face, size):
          return cv2.resize(face.image, size) 
</s> remove     def __init__(self,
                model_dir="models",
                swap_model=False,
                use_aligner=False):
        face_A = '/decoder_A.h5' if not swap_model else '/decoder_B.h5'
        face_B = '/decoder_B.h5' if not swap_model else '/decoder_A.h5'

        encoder.load_weights(model_dir + "/encoder.h5")
        decoder_A.load_weights(model_dir + face_A)
        decoder_B.load_weights(model_dir + face_B)

        self.autoencoder = autoencoder_B

    def convert_one_image(self,image, 
                        use_smooth_mask=True,
                        use_avg_color_adjust=True):
        assert image.shape == (256, 256, 3)
 </s> add     def __init__(self, autoencoder):
        self.autoencoder = autoencoder
         
        self.use_smooth_mask=True
        self.use_avg_color_adjust=True

    def convert_one_image( self, original, face_detected ):
        #assert image.shape == (256, 256, 3)
        image = cv2.resize(face_detected.image, (256, 256)) </s> remove             print('Failed to extract from image: {}. Reason: {}'.format(filename, e))
 </s> add             print('Failed to convert image: {}. Reason: {}'.format(filename, e))
  import cv2
  
  class Extract(object):
      def extract(self, image, face, size):

keep keep keep keep replace
 Adding new plugins (Extract_Align & Convert_Masked) 
plugins/Extract_Crop.py