          >>>         extractor.input_queue.put({"filename": "path/to/image/file",
          >>>                                    "image": np.array(image),
          >>>                                    "detected_faces": [<DetectedFace objects]})
          """
          retval = 1 if self._is_parallel else 2
          logger.trace(retval)
          return retval
  
      @property
      def final_pass(self):
 
</s> remove         retval = self._is_parallel or self.phase == "align"
 </s> add         retval = self._is_parallel or self.phase == "mask" </s> remove         if self._is_parallel or self.phase == "detect":
            qname = "extract_detect_in"
        else:
            qname = "extract_align_in"
 </s> add         qname_dict = dict(detect="extract_detect_in",
                          align="extract_align_in",
                          mask="extract_mask_in")
        qname = "extract_detect_in" if self._is_parallel else qname_dict[self.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             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) </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':
        retval = 1 if self._is_parallel else 3
          >>>         extractor.input_queue.put({"filename": "path/to/image/file",
          >>>                                    "image": np.array(image),
          >>>                                    "detected_faces": [<DetectedFace objects]})
          """
        retval = 1 if self._is_parallel else 3
          logger.trace(retval)
          return retval
  
      @property
      def final_pass(self):
keep keep keep keep replace keep keep keep keep keep
 Smart Mask Exposure for Extraction & Training (#831)

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