      def load_aligned(self, image, size=256, align_eyes=False, dtype=None):
          """ No need to load aligned information for all uses of this
              class, so only call this to load the information for easy
              reference to aligned properties for this face """
          logger.trace("Loading aligned face: (size: %s, align_eyes: %s, dtype: %s)",
                       size, align_eyes, dtype)
          padding = int(size * self.extract_ratio) // 2
          self.aligned["size"] = size
          self.aligned["padding"] = padding
          self.aligned["align_eyes"] = align_eyes
          self.aligned["matrix"] = get_align_mat(self, size, align_eyes)
          if image is None:
              self.aligned["face"] = None
          else:
              face = AlignerExtract().transform(
                  image,
                  self.aligned["matrix"],
                  size,
 
</s> remove         root = get_config().root
 </s> add  </s> remove             timeout = get_config().tk_vars["traintimeout"].get()
 </s> add             timeout = self.config.tk_vars["traintimeout"].get() </s> remove         self.statusbar = get_config().statusbar
 </s> add         self.config = get_config()
        self.statusbar = self.config.statusbar </s> remove         dst = str(get_folder("{}_snapshot_{}_iters".format(self.model_dir, iterations)))
 </s> add         snapshot_dir = "{}_snapshot_{}_iters".format(self.model_dir, iterations)

        if os.path.isdir(snapshot_dir):
            logger.debug("Removing previously existing snapshot folder: '%s'", snapshot_dir)
            rmtree(snapshot_dir)

        dst = str(get_folder(snapshot_dir))
        # Don't reload an already aligned face:
        if self.aligned:
            logger.trace("Skipping alignment calculation for already aligned face")
      def load_aligned(self, image, size=256, align_eyes=False, dtype=None):
          """ No need to load aligned information for all uses of this
              class, so only call this to load the information for easy
              reference to aligned properties for this face """
        # Don't reload an already aligned face:
        if self.aligned:
            logger.trace("Skipping alignment calculation for already aligned face")
        # Don't reload an already aligned face:
        if self.aligned:
            logger.trace("Skipping alignment calculation for already aligned face")
        # Don't reload an already aligned face:
        if self.aligned:
            logger.trace("Skipping alignment calculation for already aligned face")
        # Don't reload an already aligned face:
        if self.aligned:
            logger.trace("Skipping alignment calculation for already aligned face")
        # Don't reload an already aligned face:
        if self.aligned:
            logger.trace("Skipping alignment calculation for already aligned face")
        # Don't reload an already aligned face:
        if self.aligned:
            logger.trace("Skipping alignment calculation for already aligned face")
        # Don't reload an already aligned face:
        if self.aligned:
            logger.trace("Skipping alignment calculation for already aligned face")
        # Don't reload an already aligned face:
        if self.aligned:
            logger.trace("Skipping alignment calculation for already aligned face")
        # Don't reload an already aligned face:
        if self.aligned:
            logger.trace("Skipping alignment calculation for already aligned face")
          else:
              face = AlignerExtract().transform(
                  image,
                  self.aligned["matrix"],
                  size,
keep keep keep keep replace replace replace replace replace replace replace replace replace keep keep keep keep keep
 Bugfixes

- Fix filter/nfilter for convert
- Remove existing snapshot folder before creating if it pre-exists
- Don't initialize training session until after first save. "Nonetype" session fix 
lib/faces_detect.py