                  new_image, 1.5, gaussain_blur, -0.5, 0, new_image)
  
          outimage = None
          if self.seamless_clone:
              unitMask = numpy.clip( image_mask * 365, 0, 255 ).astype(numpy.uint8)
              print(unitMask.shape)
              print(new_image.shape)
              print(base_image.shape)
              maxregion = numpy.argwhere(unitMask==255)
  
              if maxregion.size > 0:
                miny,minx = maxregion.min(axis=0)[:2]
                maxy,maxx = maxregion.max(axis=0)[:2]
                lenx = maxx - minx;
 
</s> remove               miny,minx = maxregion.min(axis=0)[:2]
              maxy,maxx = maxregion.max(axis=0)[:2]
              lenx = maxx - minx;
              leny = maxy - miny;
              masky = int(minx+(lenx//2))
              maskx = int(miny+(leny//2))
              outimage = cv2.seamlessClone(new_image.astype(numpy.uint8),base_image.astype(numpy.uint8),unitMask,(masky,maskx) , cv2.NORMAL_CLONE )
              return outimage
 </s> add                 miny, minx = maxregion.min(axis=0)[:2]
                maxy, maxx = maxregion.max(axis=0)[:2]
                lenx = maxx - minx
                leny = maxy - miny
                masky = int(minx + (lenx // 2))
                maskx = int(miny + (leny // 2))
                outimage = cv2.seamlessClone(new_image.astype(numpy.uint8),
                                             base_image.astype(numpy.uint8),
                                             unitMask,
                                             (masky, maskx),
                                             cv2.NORMAL_CLONE)
                return outimage
 </s> remove             new_face = numpy.clip( new_face * 255, 0, 255 ).astype( image.dtype )
 </s> add             new_face = numpy.clip(new_face * 255, 0, 255).astype(image.dtype)
 </s> remove             if "128" in self.trainer: # TODO: Another hack to switch between 64 and 128
 </s> add             if "128" in self.trainer:  # TODO: Another hack to switch between 64 and 128
 </s> remove             new_face = numpy.clip((new_face[0] + 1) * 255 / 2, 0, 255).astype( image.dtype )
 </s> add             new_face = numpy.clip((new_face[0] + 1) * 255 / 2, 0, 255).astype(image.dtype)
 </s> remove                 image_mask = cv2.dilate(image_mask,dilation_kernel,iterations = 1)
 </s> add                 image_mask = cv2.dilate(image_mask, dilation_kernel, iterations=1)

            unitMask = numpy.clip(image_mask * 365, 0, 255).astype(numpy.uint8)
            logger.info(unitMask.shape)
            logger.info(new_image.shape)
            logger.info(base_image.shape)
            maxregion = numpy.argwhere(unitMask == 255)

                  new_image, 1.5, gaussain_blur, -0.5, 0, new_image)
  
          outimage = None
          if self.seamless_clone:
            unitMask = numpy.clip(image_mask * 365, 0, 255).astype(numpy.uint8)
            logger.info(unitMask.shape)
            logger.info(new_image.shape)
            logger.info(base_image.shape)
            maxregion = numpy.argwhere(unitMask == 255)
            unitMask = numpy.clip(image_mask * 365, 0, 255).astype(numpy.uint8)
            logger.info(unitMask.shape)
            logger.info(new_image.shape)
            logger.info(base_image.shape)
            maxregion = numpy.argwhere(unitMask == 255)
            unitMask = numpy.clip(image_mask * 365, 0, 255).astype(numpy.uint8)
            logger.info(unitMask.shape)
            logger.info(new_image.shape)
            logger.info(base_image.shape)
            maxregion = numpy.argwhere(unitMask == 255)
            unitMask = numpy.clip(image_mask * 365, 0, 255).astype(numpy.uint8)
            logger.info(unitMask.shape)
            logger.info(new_image.shape)
            logger.info(base_image.shape)
            maxregion = numpy.argwhere(unitMask == 255)
            unitMask = numpy.clip(image_mask * 365, 0, 255).astype(numpy.uint8)
            logger.info(unitMask.shape)
            logger.info(new_image.shape)
            logger.info(base_image.shape)
            maxregion = numpy.argwhere(unitMask == 255)
  
              if maxregion.size > 0:
                miny,minx = maxregion.min(axis=0)[:2]
                maxy,maxx = maxregion.max(axis=0)[:2]
                lenx = maxx - minx;
keep keep keep keep replace replace replace replace 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