              for q_name in self._queues.keys():
                  queue_manager.del_queue(q_name)
              logger.debug("Detection Complete")
          else:
              logger.debug("Switching to align phase")
              self.phase = "align"
  
      # <<< INTERNAL METHODS >>> #
      @property
      def _output_queue(self):
          """ Return the correct output queue depending on the current phase """
 
</s> remove         qname = "extract_align_out" if self.final_pass else "extract_align_in"
 </s> add         qname_dict = dict(detect="extract_align_in",
                          align="extract_mask_in",
                          mask="extract_mask_out")
        qname = "extract_mask_out" if self.final_pass else qname_dict[self.phase] </s> remove         retval = self._is_parallel or self.phase == "align"
 </s> add         retval = self._is_parallel or self.phase == "mask" </s> remove         image = self._convert_color(input_image)
 </s> add         image = self._convert_color(input_image[..., :3]) </s> remove     def _set__mask_class(self):
        """ Returns the correct mask class from :mod:`lib`.model.masks` as defined in the
        :attr:`mask_type` parameter. """
        mask_type = self._training_opts.get("mask_type", None)
        if mask_type:
            logger.debug("Mask type: '%s'", mask_type)
            _mask_class = getattr(masks, mask_type)
        else:
            _mask_class = None
        logger.debug("Mask class: %s", _mask_class)
        return _mask_class

 </s> add  </s> remove             logger.trace("Batch has no mask")
            retval = dict(targets=batch)
 </s> add             masks = [np.ones((size_list_of_batches[-1].shape[:-1] + (1,)), dtype='float32')]
        retval = dict(targets=targets, masks=masks)
            self.phase = "align" if self.phase == "detect" else "mask"
            logger.debug("Switching to %s phase", self.phase)
              for q_name in self._queues.keys():
                  queue_manager.del_queue(q_name)
              logger.debug("Detection Complete")
          else:
            self.phase = "align" if self.phase == "detect" else "mask"
            logger.debug("Switching to %s phase", self.phase)
            self.phase = "align" if self.phase == "detect" else "mask"
            logger.debug("Switching to %s phase", self.phase)
  
      # <<< INTERNAL METHODS >>> #
      @property
      def _output_queue(self):
          """ Return the correct output queue depending on the current phase """
keep keep keep keep replace replace keep keep keep keep keep
 Smart Mask Exposure for Extraction & Training (#831)

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