          if git_model_id is None:
              logger.debug("No git_model_id specified. Returning None")
              return None
          plugin_path = os.path.join(*self.__module__.split(".")[:-1])
          if os.path.basename(plugin_path) in ("detect", "align"):
              base_path = os.path.dirname(os.path.realpath(sys.argv[0]))
              cache_path = os.path.join(base_path, plugin_path, ".cache")
          else:
              cache_path = os.path.join(os.path.dirname(__file__), ".cache")
          model = GetModel(model_filename, cache_path, git_model_id)
 
</s> remove         cache_path = os.path.join(root_path, "plugins", "extract", ".cache")
 </s> add         cache_path = os.path.join(root_path, "plugins", "extract", "recognition", ".cache") </s> remove         cache_path = os.path.join(root_path, "plugins", "extract", ".cache")
 </s> add         cache_path = os.path.join(root_path, "plugins", "extract", "recognition", ".cache") </s> remove         if self.preview_feed is None:
            self.set_preview_feed()
 </s> add  </s> remove             self.aligned["padding"] = padding
 </s> add             self.aligned["padding"] = self._padding_from_coverage(size, coverage_ratio) </s> remove         retval = [samples[0:num_images]] if samples is not None else [self.samples[0:num_images]]
        if self.use_mask:
            retval.extend(tgt[0:num_images] for tgt in images)
        else:
            retval.extend(images[0:num_images])
 </s> add         masks = masks if masks is not None else self.masks
        samples = samples if samples is not None else self.samples
        retval = [samples[0:num_images], images[0:num_images], masks[0:num_images]]
        if os.path.basename(plugin_path) in ("detect", "align", "mask", "recognition"):
          if git_model_id is None:
              logger.debug("No git_model_id specified. Returning None")
              return None
          plugin_path = os.path.join(*self.__module__.split(".")[:-1])
        if os.path.basename(plugin_path) in ("detect", "align", "mask", "recognition"):
              base_path = os.path.dirname(os.path.realpath(sys.argv[0]))
              cache_path = os.path.join(base_path, plugin_path, ".cache")
          else:
              cache_path = os.path.join(os.path.dirname(__file__), ".cache")
          model = GetModel(model_filename, cache_path, git_model_id)
keep keep keep keep replace keep keep keep keep keep
 Smart Mask Exposure for Extraction & Training (#831)

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