      @staticmethod
      def load_one_image(filename):
          """ load requested image """
          logger.trace("Loading image: '%s'", filename)
          return cv2.imread(filename)  # pylint: disable=no-member
  
  
  class PostProcess():
      """ Optional post processing tasks """
      def __init__(self, arguments):
 
</s> remove     @staticmethod
    def load_one_image(filename):
 </s> add     def load_one_image(self, filename): </s> remove     def get_detector(name):
 </s> add     def get_detector(name, disable_logging=False):
 </s> remove         return PluginLoader._import("extract.detect", name)
 </s> add         return PluginLoader._import("extract.detect", name, disable_logging)
 </s> remove     def __init__(self, mask_type, output_size, predicted_available):
        super().__init__(mask_type, output_size, predicted_available)
 </s> add     def __init__(self, mask_type, output_size, predicted_available, config=None):
        super().__init__(mask_type, output_size, predicted_available, config) </s> remove     def get_aligner(name):
 </s> add     def get_aligner(name, disable_logging=False):

        if self.is_video:
            if filename.isdigit():
                frame_no = filename
            else:
                frame_no = os.path.splitext(filename)[0][filename.rfind("_") + 1:]
                logger.trace("Extracted frame_no %s from filename '%s'", frame_no, filename)
            retval = self.load_one_video_frame(int(frame_no))
        else:
            retval = cv2.imread(filename)  # pylint: disable=no-member
        return retval

    def load_one_video_frame(self, frame_no):
        """ Load a single frame from a video file """
        logger.trace("Loading video frame: %s", frame_no)
        cap = cv2.VideoCapture(self.args.input_dir)  # pylint: disable=no-member
        cap.set(cv2.CAP_PROP_POS_FRAMES, frame_no - 1)  # pylint: disable=no-member
        ret, frame = cap.read()
        if not ret:
            logger.error("Unable to read from %s from video %s", frame_no, self.args.input_dir)
            exit(1)
        cap.release()
        return frame
      @staticmethod
      def load_one_image(filename):
          """ load requested image """
          logger.trace("Loading image: '%s'", filename)
        if self.is_video:
            if filename.isdigit():
                frame_no = filename
            else:
                frame_no = os.path.splitext(filename)[0][filename.rfind("_") + 1:]
                logger.trace("Extracted frame_no %s from filename '%s'", frame_no, filename)
            retval = self.load_one_video_frame(int(frame_no))
        else:
            retval = cv2.imread(filename)  # pylint: disable=no-member
        return retval

    def load_one_video_frame(self, frame_no):
        """ Load a single frame from a video file """
        logger.trace("Loading video frame: %s", frame_no)
        cap = cv2.VideoCapture(self.args.input_dir)  # pylint: disable=no-member
        cap.set(cv2.CAP_PROP_POS_FRAMES, frame_no - 1)  # pylint: disable=no-member
        ret, frame = cap.read()
        if not ret:
            logger.error("Unable to read from %s from video %s", frame_no, self.args.input_dir)
            exit(1)
        cap.release()
        return frame
  
  
  class PostProcess():
      """ Optional post processing tasks """
      def __init__(self, arguments):
keep keep keep keep replace keep keep keep keep keep
 Convert settings tool (#737)

* Initial prediction pipeline and display

* Patch faces from convert pipeline. Load configs

* Add tkinter canvas for image display

* Radio buttons to config gui. Standardise config gui. Remove dssim loss from realface

* Add action frame

* Live update cli options

* Live update config changes

* Quicker frame loading. Refresh faces button callback

* remove debug code

* Add saving and reloading config buttons

* Reduce lag with threading

* Busy indicator + geometry updates

* Fix options canvas resizing

* Add global config saving and resetting

* tools to own tab

* Rename tool to 'preview'

* geometry tweak

* pep8 fixes 
scripts/fsmedia.py