          if erosion_kernel_size is not None:
              if erosion_kernel_size > 0:
                  self.erosion_kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(erosion_kernel_size,erosion_kernel_size))
              elif erosion_kernel_size < 0:
                  self.erosion_kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(abs(erosion_kernel_size),abs(erosion_kernel_size)))
          self.blur_size = blur_size
          self.seamless_clone = seamless_clone
          self.sharpen_image = sharpen_image
          self.match_histogram = match_histogram
          self.mask_type = mask_type.lower() # Choose in 'FaceHullAndRect','FaceHull','Rect'
 
</s> remove                 self.erosion_kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(erosion_kernel_size,erosion_kernel_size))
 </s> add                 self.erosion_kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE,
                                                                (erosion_kernel_size,
                                                                 erosion_kernel_size))
 </s> remove         self.mask_type = mask_type.lower() # Choose in 'FaceHullAndRect','FaceHull','Rect'
 </s> add         self.mask_type = mask_type.lower()  # Choose in 'FaceHullAndRect', 'FaceHull', 'Rect'
 </s> remove                 image_mask = cv2.erode(image_mask,self.erosion_kernel,iterations = 1)
 </s> add                 image_mask = cv2.erode(image_mask, self.erosion_kernel, iterations=1)
 </s> remove     def __init__(self, encoder, trainer, blur_size=2, seamless_clone=False, mask_type="facehullandrect", erosion_kernel_size=None, match_histogram=False, sharpen_image=None, draw_transparent=False, **kwargs):
 </s> add     def __init__(self, encoder, trainer,
                 blur_size=2, seamless_clone=False, mask_type="facehullandrect",
                 erosion_kernel_size=None, match_histogram=False, sharpen_image=None,
                 draw_transparent=False, **kwargs):
 </s> remove     def patch_image( self, image, face_detected, size ):
 </s> add     def patch_image(self, image, face_detected, size):

                self.erosion_kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE,
                                                                (abs(erosion_kernel_size),
                                                                 abs(erosion_kernel_size)))

          if erosion_kernel_size is not None:
              if erosion_kernel_size > 0:
                  self.erosion_kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE,(erosion_kernel_size,erosion_kernel_size))
              elif erosion_kernel_size < 0:
                self.erosion_kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE,
                                                                (abs(erosion_kernel_size),
                                                                 abs(erosion_kernel_size)))
          self.blur_size = blur_size
          self.seamless_clone = seamless_clone
          self.sharpen_image = sharpen_image
          self.match_histogram = match_histogram
          self.mask_type = mask_type.lower() # Choose in 'FaceHullAndRect','FaceHull','Rect'
keep keep keep keep replace keep keep keep keep keep
 Logging (#541)

* Convert prints to logger. Further logging improvements. Tidy  up

* Fix system verbosity. Allow SystemExit

* Fix reload extract bug

* Child Traceback handling

* Safer shutdown procedure

* Add shutdown event to queue manager

* landmarks_as_xy > property. GUI notes + linting. Aligner bugfix

* fix FaceFilter. Enable nFilter when no Filter is supplied

* Fix blurry face filter

* Continue on IO error. Better error handling

* Explicitly print stack trace tocrash log

* Windows Multiprocessing bugfix

* Add git info and conda version to crash log

* Windows/Anaconda mp bugfix

* Logging fixes for training 
plugins/convert/Convert_Masked.py