          IS_ADMIN = os.getuid() == 0
      except AttributeError:
          IS_ADMIN = ctypes.windll.shell32.IsUserAnAdmin() != 0
      if IS_ADMIN:
          INFO("Running as Root/Admin")
      else:
          WARNING("Running without root/admin privileges")
  
  def Check_System():
      global OS_Version
 
</s> remove         WARNING("Running without root/admin privileges")
 </s> add         out_warning("Running without root/admin privileges")
 </s> remove def Check_Permission():
    import ctypes, os
 </s> add def check_permission():
    """ Check for Admin permissions """
    import ctypes </s> remove def Check_System():
    global OS_Version
    INFO("The tool provides tips for installation\nand installs required python packages")
    INFO("Setup in %s %s" % (OS_Version[0], OS_Version[1]))
    if not OS_Version[0] in ["Windows", "Linux", "Darwin"]:
        ERROR("Your system %s is not supported!" % OS_Version[0])
 </s> add def check_system():
    """ Check the system """
    global OS_VERSION
    out_info("The tool provides tips for installation\n"
             "and installs required python packages")
    out_info("Setup in %s %s" % (OS_VERSION[0], OS_VERSION[1]))
    if not OS_VERSION[0] in ["Windows", "Linux", "Darwin"]:
        out_error("Your system %s is not supported!" % OS_VERSION[0]) </s> remove OS_Version = (platform.system(), platform.release())
Py_Version = (platform.python_version(), platform.architecture()[0])
Is_MacOS = (platform.system() == 'Darwin')
 </s> add OS_VERSION = (platform.system(), platform.release())
PY_VERSION = (platform.python_version(), platform.architecture()[0])
IS_MACOS = (platform.system() == 'Darwin') </s> remove             retval = filename, final_faces
        except Exception as err:
            if self.args.verbose:
                print("Failed to extract from image: "
                      "{}. Reason: {}".format(filename, err))
            raise
        return retval
 </s> add         if processed != 0 and self.args.skip_existing:
            print("Skipping {} previously extracted frames".format(processed))
        if processed != 0 and self.args.skip_faces:
            print("Skipping {} frames with detected faces".format(processed))

        to_process = self.images.images_found - processed
        if to_process == 0:
            print("No frames to process. Exiting")
            queue_manager.terminate_queues()
            exit(0)
        return to_process

    def run_detection(self, to_process):
        """ Run detection only """
        self.plugins.launch_detector()
        detected_faces = dict()
        for detected in tqdm(self.plugins.detect_faces(extract_pass="detect"),
                             total=to_process,
                             file=sys.stdout,
                             desc="Detecting faces"):
            exception = detected.get("exception", False)
            if exception:
                break

            del detected["image"]
            filename = detected["filename"]

            detected_faces[filename] = detected
        out_info("Running as Root/Admin")
          IS_ADMIN = os.getuid() == 0
      except AttributeError:
          IS_ADMIN = ctypes.windll.shell32.IsUserAnAdmin() != 0
      if IS_ADMIN:
        out_info("Running as Root/Admin")
      else:
          WARNING("Running without root/admin privileges")
  
  def Check_System():
      global OS_Version
keep keep keep keep replace keep keep keep keep keep
 Extraction - Speed improvements (#522) (#523)

* Extraction - Speed improvements (#522)

* Initial Plugin restructure

* Detectors to plugins. Detector speed improvements

* Re-implement dlib aligner, remove models, FAN to TF. Parallel processing

* Update manual, update convert, implement parallel/serial switching

* linting + fix cuda check (setup.py). requirements update keras 2.2.4

* Add extract size option. Fix dlib hog init

* GUI: Increase tooltip width

* Update alignment tool to support new DetectedFace

* Add skip existing faces option

* Fix sort tool to new plugin structure

* remove old align plugin

* fix convert -skip faces bug

* Fix convert skipping no faces frames

* Convert - draw onto transparent layer

* Fix blur threshold bug

* fix skip_faces convert bug

* Fix training 
setup.py