          self._config = config
          self._model_input_size = model_input_size
          self._model_output_shapes = model_output_shapes
          self._training_opts = training_opts
          self._mask_class = self._set__mask_class()
          self._landmarks = self._training_opts.get("landmarks", None)
          self._nearest_landmarks = {}
  
          # Batchsize and processing class are set when this class is called by a batcher
          # from lib.training_data
 
</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         self.training_opts["mask_type"] = self.config.get("mask_type", None)
 </s> add  </s> remove         retval = bool(opts.get("mask_type", None) or opts["warp_to_landmarks"])
 </s> add         retval = opts["warp_to_landmarks"] </s> remove         self.mask = None
 </s> add         self.masks = None
          self._config = config
          self._model_input_size = model_input_size
          self._model_output_shapes = model_output_shapes
          self._training_opts = training_opts

          self._landmarks = self._training_opts.get("landmarks", None)
          self._nearest_landmarks = {}
  
          # Batchsize and processing class are set when this class is called by a batcher
          # from lib.training_data
keep keep keep keep replace keep keep keep keep keep
 Smart Mask Exposure for Extraction & Training (#831)

Smart Masks - Initial Commit 
lib/training_data.py