          elif self.passes == 3 and self.phase == 'detect':
              retval = [self._detector]
          elif self.passes == 3 and self.phase == 'align':
              retval = [self._aligner]
          logger.trace("Active plugins: %s", retval)
          return retval
  
      def _add_queues(self):
          """ Add the required processing queues to Queue Manager """
 
</s> remove         else:
 </s> add         elif self.passes == 3 and self.phase == 'align': </s> remove             retval = [self._detector, self._aligner]
        elif self.passes == 2 and not self.final_pass:
 </s> add             retval = [self._detector, self._aligner, self._masker]
        elif self.passes == 3 and self.phase == 'detect': </s> remove         for task in ("extract_detect_in", "extract_align_in", "extract_align_out"):
 </s> add         tasks = ["extract_detect_in", "extract_align_in", "extract_mask_in", "extract_mask_out"]
        for task in tasks: </s> remove         retval = self._is_parallel or self.phase == "align"
 </s> add         retval = self._is_parallel or self.phase == "mask"
        elif self.passes == 3 and self.phase == 'mask':
            retval = [self._masker]
        else:
            retval = [None]
          elif self.passes == 3 and self.phase == 'detect':
              retval = [self._detector]
          elif self.passes == 3 and self.phase == 'align':
              retval = [self._aligner]
        elif self.passes == 3 and self.phase == 'mask':
            retval = [self._masker]
        else:
            retval = [None]
          logger.trace("Active plugins: %s", retval)
          return retval
  
      def _add_queues(self):
          """ Add the required processing queues to Queue Manager """
keep keep keep add keep keep keep keep keep
 Smart Mask Exposure for Extraction & Training (#831)

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