          return False
  
  def Check_PIP():
      try:
          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"))
          return True
      except ImportError:
          ERROR("Import pip failed. Please Install python3-pip and try again")
          return False
  
 
</s> remove         ERROR("Import pip failed. Please Install python3-pip and try again")
 </s> add         out_error("Import pip failed. Please Install python3-pip "
                  "and try again") </s> remove def Check_PIP():
 </s> add     out_error("Please run this script with Python3 64bit and try again.")
    return False


def check_pip():
    """ Check installed pip version """ </s> remove     else:
        ERROR("Please run this script with Python3 64bit and try again.")
        return False
 </s> add  </s> remove def Check_CUDA():
    global CUDA_Version
    a=os.popen("ldconfig -p | grep -P -o \"libcudart.so.\d.\d\" | head -n 1")
    libcudart = a.read()
 </s> add def check_cuda():
    """ Check CUDA Version """
    global CUDA_VERSION
    chk = os.popen("ldconfig -p | grep -P -o \"libcudart.so.\d+.\d+\" | "
                   "head -n 1")
    libcudart = chk.read() </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...")
        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"))
          return False
  
  def Check_PIP():
      try:
        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"))
        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"))
        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"))
        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"))
        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"))
        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"))
        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"))
          return True
      except ImportError:
          ERROR("Import pip failed. Please Install python3-pip and try again")
          return False
  
keep keep keep keep replace replace replace replace 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