              elif self.erosion_kernel_size < 0:
                  dilation_kernel = abs(self.erosion_kernel)
                  image_mask = cv2.dilate(image_mask,dilation_kernel,iterations = 1)
  
          if self.blur_size!=0:
              image_mask = cv2.blur(image_mask,(self.blur_size,self.blur_size))
  
          return image_mask
 
</s> remove                 image_mask = cv2.dilate(image_mask,dilation_kernel,iterations = 1)
 </s> add                 image_mask = cv2.dilate(image_mask, dilation_kernel, iterations=1)
 </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             hull = cv2.convexHull( numpy.array( landmarks ).reshape((-1,2)).astype(int) ).flatten().reshape( (-1,2) )
            cv2.fillConvexPoly( hull_mask,hull,(1,1,1) )
 </s> add             hull = cv2.convexHull(
                numpy.array(landmarks).reshape((-1, 2)).astype(int)).flatten().reshape((-1, 2))
            cv2.fillConvexPoly(hull_mask, hull, (1, 1, 1))
 </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         image_mask = self.get_image_mask( image, new_face, face_detected.landmarks_as_xy(), mat, image_size )
 </s> add         image_mask = self.get_image_mask(image,
                                         new_face,
                                         face_detected.landmarks_as_xy,
                                         mat,
                                         image_size)

        if self.blur_size != 0:
            image_mask = cv2.blur(image_mask, (self.blur_size, self.blur_size))

              elif self.erosion_kernel_size < 0:
                  dilation_kernel = abs(self.erosion_kernel)
                  image_mask = cv2.dilate(image_mask,dilation_kernel,iterations = 1)
  
        if self.blur_size != 0:
            image_mask = cv2.blur(image_mask, (self.blur_size, self.blur_size))
        if self.blur_size != 0:
            image_mask = cv2.blur(image_mask, (self.blur_size, self.blur_size))
  
          return image_mask
keep keep keep keep replace replace 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