              return [self._args.input_dir]  # Not batch mode or a single file
  
          retval = [os.path.join(self._args.input_dir, fname)
                    for fname in os.listdir(self._args.input_dir)
                    if os.path.isdir(os.path.join(self._args.input_dir, fname))
                    or os.path.splitext(fname)[-1].lower() in _video_extensions]
          logger.debug("Input locations: %s", retval)
          return retval
  
      def _validate_batchmode(self):
          """ Validate the command line arguments.
 
</s> remove             mask=os.path.join(gui_cache, ".preview_trigger"),
            refresh=os.path.join(gui_cache, ".preview_mask_toggle"))
 </s> add             mask=os.path.join(gui_cache, ".preview_mask_toggle"),
            refresh=os.path.join(gui_cache, ".preview_trigger")) </s> remove from lib.utils import get_folder, _video_extensions
 </s> add from lib.utils import get_folder, _image_extensions, _video_extensions
                  if (os.path.isdir(os.path.join(self._args.input_dir, fname))  # folder images
                      and any(os.path.splitext(iname)[-1].lower() in _image_extensions
                              for iname in os.listdir(os.path.join(self._args.input_dir, fname))))
                  or os.path.splitext(fname)[-1].lower() in _video_extensions]  # video

              return [self._args.input_dir]  # Not batch mode or a single file
  
          retval = [os.path.join(self._args.input_dir, fname)
                    for fname in os.listdir(self._args.input_dir)
                  if (os.path.isdir(os.path.join(self._args.input_dir, fname))  # folder images
                      and any(os.path.splitext(iname)[-1].lower() in _image_extensions
                              for iname in os.listdir(os.path.join(self._args.input_dir, fname))))
                  or os.path.splitext(fname)[-1].lower() in _video_extensions]  # video

                  if (os.path.isdir(os.path.join(self._args.input_dir, fname))  # folder images
                      and any(os.path.splitext(iname)[-1].lower() in _image_extensions
                              for iname in os.listdir(os.path.join(self._args.input_dir, fname))))
                  or os.path.splitext(fname)[-1].lower() in _video_extensions]  # video

          logger.debug("Input locations: %s", retval)
          return retval
  
      def _validate_batchmode(self):
          """ Validate the command line arguments.
keep keep keep keep replace replace keep keep keep keep keep
 Bugfixes:
  - Extract - batch mode. Exclude folders with no images
  - Train. Trigger the correct preview/mask update from gui trigger 
scripts/extract.py