          # Or another vram measurement technique will need to be implemented to for when TF has
          # already performed allocation. For now we force CPU detectors.
  
          # self.align_faces(detector, aligner, multiprocess)
          self.align_faces("cv2-dnn", "cv2-dnn", multiprocess)
  
          self.get_filter_encodings()
          self.threshold = threshold
          logger.debug("Initialized %s", self.__class__.__name__)
  
 
</s> remove         mask_idx = [idx for idx, name in enumerate(output_network.output_names)
                    if name.startswith("mask")]
        if mask_idx:
            # Add the final mask shape as input
            mask_shape = output_network.output_shapes[mask_idx[0]]
            inputs.append(Input(shape=mask_shape[1:], name="mask_in"))
 </s> add         if self.config["replicate_input_mask"] or self.config["penalized_mask_loss"]:
            # penalized mask doesn't have a mask ouput, so we can't use output shapes
            # mask should always be last output..this needs to be a rule
            mask_shape = output_network.output_shapes[-1]
            inputs.append(Input(shape=(mask_shape[1:-1] + (1,)), name="mask_in")) </s> remove             padding = int(size * self._extract_ratio) // 2
 </s> add  </s> remove             the format (`batchsize`, `height`, `width`, `1`). **NB:** This item will only exist \
            in the ``dict`` if the :attr:`mask_type` is not ``None``
 </s> add             the format (`batchsize`, `height`, `width`, `1`). </s> remove         self._mask_class = self._set__mask_class()
 </s> add 
        self.align_faces("cv2-dnn", "cv2-dnn", "none", multiprocess)

          # Or another vram measurement technique will need to be implemented to for when TF has
          # already performed allocation. For now we force CPU detectors.
  
          # self.align_faces(detector, aligner, multiprocess)
        self.align_faces("cv2-dnn", "cv2-dnn", "none", multiprocess)
  
          self.get_filter_encodings()
          self.threshold = threshold
          logger.debug("Initialized %s", self.__class__.__name__)
  
keep keep keep keep replace keep keep keep keep keep
 Smart Mask Exposure for Extraction & Training (#831)

Smart Masks - Initial Commit 
lib/face_filter.py