              if not images[side]:
                  logger.error("Error: '%s' contains no images", image_dir)
                  exit(1)
  
          logger.info("Model A Directory: %s", self.args.input_a)
          logger.info("Model B Directory: %s", self.args.input_b)
          logger.debug("Got image paths: %s", [(key, str(len(val)) + " images")
                                               for key, val in images.items()])
          return images
  
      def process(self):
 
</s> remove             image_dir = getattr(self.args, "input_{}".format(side))
 </s> add             image_dir = getattr(self._args, "input_{}".format(side)) </s> remove         """ Call the training process object """
 </s> add         """ The entry point for triggering the Training Process.

        Should only be called from  :class:`lib.cli.ScriptExecutor`
        """ </s> remove                 preds[key] = val[self.model.largest_face_index]
 </s> add                 preds[key] = val[self._model.largest_face_index] </s> remove                      {key: val for key, val in training_opts.items() if key != "landmarks"},
                     bool(training_opts.get("landmarks", None)), config)
 </s> add                      {key: val
                      for key, val in training_opts.items() if key not in ("landmarks", "masks")},
                     {key: len(val)
                      for key, val in training_opts.get("landmarks", dict()).items()},
                     {key: len(val) for key, val in training_opts.get("masks", dict()).items()},
                     config) </s> remove         legacy_update = self.update_legacy_config()
 </s> add 
        logger.info("Model A Directory: %s", self._args.input_a)
        logger.info("Model B Directory: %s", self._args.input_b)
              if not images[side]:
                  logger.error("Error: '%s' contains no images", image_dir)
                  exit(1)
  
        logger.info("Model A Directory: %s", self._args.input_a)
        logger.info("Model B Directory: %s", self._args.input_b)
        logger.info("Model A Directory: %s", self._args.input_a)
        logger.info("Model B Directory: %s", self._args.input_b)
          logger.debug("Got image paths: %s", [(key, str(len(val)) + " images")
                                               for key, val in images.items()])
          return images
  
      def process(self):
keep keep keep keep replace replace keep keep keep keep keep
 Smart Masks - Training Implementation (#914)

* Smart Masks - Training

- Reinstate smart mask training code
- Reinstate mask_type back to model.config
- change 'replicate_input_mask to 'learn_mask'
- Add learn mask option
- Add mask loading from alignments to plugins.train.trainer
- Add mask_blur and mask threshold options
- _base.py - Pass mask options through training_opts dict
- plugins.train.model - check for mask_type not None for learn_mask and penalized_mask_loss
- Limit alignments loading to just those faces that appear in the training folder
- Raise error if not all training images have an alignment, and alignment file is required
- lib.training_data - Mask generation code
- lib.faces_detect - cv2 dimension stripping bugfix
- Remove cv2 linting code

* Update mask helptext in cli.py

* Fix Warp to Landmarks
Remove SHA1 hashing from training data

* Update mask training config

* Capture missing masks at training init

* lib.image.read_image_batch - Return filenames with batch for ordering

* scripts.train - Documentation

* plugins.train.trainer - documentation

* Ensure backward compatibility.
Fix convert for new predicted masks

* Update removed masks to components for legacy models. 
scripts/train.py