          try:
              from pip._internal import main as pipmain
          except:
              from pip import main as pipmain
          for m in Missing_Packages:
              msg = "Installing {}".format(m)
              INFO(msg)
              # hide info/warning and fix cache hang
              pipargs = ["install", "-qq", "--no-cache-dir"]
              # install as user to solve perm restriction
              if not IS_ADMIN and not IS_VIRTUALENV:
                  pipargs.append("--user")
 
</s> remove def Install_Missing_Dep():
    global Missing_Packages
    if len(Missing_Packages):
        INFO("""Installing Required Python Packages. This may take some time...""")
 </s> add def install_missing_dep():
    """ Install missing dependencies """
    global MISSING_PACKAGES
    if MISSING_PACKAGES:
        out_info("Installing Required Python Packages. "
                 "This may take some time...") </s> remove             if m.startswith("dlib") and COMPILE_DLIB_WITH_AVX_CUDA:
                pipargs.extend(["--install-option=--yes", "--install-option=USE_AVX_INSTRUCTIONS"])
            pipargs.append(m)
            # pip install -qq (--user) (--install-options) m
 </s> add             if pkg.startswith("dlib") and COMPILE_DLIB_WITH_AVX_CUDA:
                pipargs.extend(["--install-option=--yes",
                                "--install-option=USE_AVX_INSTRUCTIONS"])
            pipargs.append(pkg)
            # pip install -qq (--user) (--install-options) pkg </s> remove         try: # for pip >= 10
            from pip._internal.utils.misc import get_installed_distributions, get_installed_version
        except ImportError: # for pip <= 9.0.3
            from pip.utils import get_installed_distributions, get_installed_version
        global Installed_Packages
        Installed_Packages = {pkg.project_name:pkg.version for pkg in get_installed_distributions()}
        INFO("Installed PIP: " + get_installed_version("pip"))
 </s> add         try:  # for pip >= 10
            from pip._internal.utils.misc import (get_installed_distributions,
                                                  get_installed_version)
        except ImportError:  # for pip <= 9.0.3
            from pip.utils import (get_installed_distributions,
                                   get_installed_version)
        global INSTALLED_PACKAGES
        INSTALLED_PACKAGES = {pkg.project_name: pkg.version
                              for pkg in get_installed_distributions()}
        out_info("Installed PIP: " + get_installed_version("pip")) </s> remove import lib.training_data
from time import time

 </s> add import dlib
from lib.faces_detect import DetectedFace
from lib.training_data import TrainingDataGenerator
        for pkg in MISSING_PACKAGES:
            msg = "Installing {}".format(pkg)
            out_info(msg)
          try:
              from pip._internal import main as pipmain
          except:
              from pip import main as pipmain
        for pkg in MISSING_PACKAGES:
            msg = "Installing {}".format(pkg)
            out_info(msg)
        for pkg in MISSING_PACKAGES:
            msg = "Installing {}".format(pkg)
            out_info(msg)
        for pkg in MISSING_PACKAGES:
            msg = "Installing {}".format(pkg)
            out_info(msg)
              # hide info/warning and fix cache hang
              pipargs = ["install", "-qq", "--no-cache-dir"]
              # install as user to solve perm restriction
              if not IS_ADMIN and not IS_VIRTUALENV:
                  pipargs.append("--user")
keep keep keep keep replace replace 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