              Should be called from :mod:`~plugins.extract.pipeline`
          """
          logger.debug("initialize %s: (args: %s, kwargs: %s)",
                       self.__class__.__name__, args, kwargs)
          p_type = "Detector" if self._plugin_type == "detect" else "Aligner"
          logger.info("Initializing %s %s...", self.name, p_type)
          self.queue_size = 1
          self._add_queues(kwargs["in_queue"], kwargs["out_queue"], ["predict", "post"])
          self._compile_threads()
          self.init_model()
          logger.info("Initialized %s %s with batchsize of %s", self.name, p_type, self.batchsize)
 
</s> remove         logger.info("Initialized %s %s with batchsize of %s", self.name, p_type, self.batchsize)
 </s> add         logger.info("Initialized %s (%s) with batchsize of %s",
                    self.name, self._plugin_type, self.batchsize) </s> remove     def __init__(self, image=None, x=None, w=None, y=None, h=None, landmarks_xy=None):
        logger.trace("Initializing %s: (image: %s, x: %s, w: %s, y: %s, h:%s, landmarks_xy: %s)",
 </s> add     def __init__(self, image=None, x=None, w=None, y=None, h=None,
                 landmarks_xy=None, filename=None):
        logger.trace("Initializing %s: (image: %s, x: %s, w: %s, y: %s, h:%s, "
                     "landmarks_xy: %s, filename: %s)", </s> remove             logger.debug("Switching to align phase")
            self.phase = "align"
 </s> add             self.phase = "align" if self.phase == "detect" else "mask"
            logger.debug("Switching to %s phase", self.phase) </s> remove             elif self.mask_input is not None and self.config.get("penalized_mask_loss", False):
 </s> add             elif self.config["penalized_mask_loss"]: </s> remove     def __init__(self, detector, aligner,
                 configfile=None, multiprocess=False, rotate_images=None, min_size=20,
                 normalize_method=None):
        logger.debug("Initializing %s: (detector: %s, aligner: %s, configfile: %s, "
                     "multiprocess: %s, rotate_images: %s, min_size: %s, "
                     "normalize_method: %s)", self.__class__.__name__, detector, aligner,
                     configfile, multiprocess, rotate_images, min_size, normalize_method)
 </s> add     def __init__(self, detector, aligner, masker, configfile=None,
                 multiprocess=False, rotate_images=None, min_size=20,
                 normalize_method=None, input_size=256, output_size=256, coverage_ratio=1.):
        logger.debug("Initializing %s: (detector: %s, aligner: %s, masker: %s, "
                     "configfile: %s, multiprocess: %s, rotate_images: %s, min_size: %s, "
                     "normalize_method: %s, input_size: %s, output_size: %s, coverage_ratio: %s)",
                     self.__class__.__name__, detector, aligner, masker, configfile,
                     multiprocess, rotate_images, min_size, normalize_method, input_size,
                     output_size, coverage_ratio)
        logger.info("Initializing %s in %s phase...", self.name, self._plugin_type)
              Should be called from :mod:`~plugins.extract.pipeline`
          """
          logger.debug("initialize %s: (args: %s, kwargs: %s)",
                       self.__class__.__name__, args, kwargs)
        logger.info("Initializing %s in %s phase...", self.name, self._plugin_type)
        logger.info("Initializing %s in %s phase...", self.name, self._plugin_type)
          self.queue_size = 1
          self._add_queues(kwargs["in_queue"], kwargs["out_queue"], ["predict", "post"])
          self._compile_threads()
          self.init_model()
          logger.info("Initialized %s %s with batchsize of %s", self.name, p_type, self.batchsize)
keep keep keep keep replace replace keep keep keep keep keep
 Smart Mask Exposure for Extraction & Training (#831)

Smart Masks - Initial Commit 
plugins/extract/_base.py