              pipargs.append(m)
              # pip install -qq (--user) (--install-options) m
              pipmain(pipargs)
  
  def Update_TF_Dep():
      global CUDA_Version
      Required_Packages[0] = "tensorflow-gpu"
      if CUDA_Version.startswith("8.0"):
          Required_Packages[0] += "==1.4.0"
      elif not CUDA_Version.startswith("9.0"):
              WARNING("Tensorflow has no official prebuild for CUDA 9.1 currently.\r\n"
                      "To continue, You have to build and install your own tensorflow-gpu.\r\n"
                      "Help: https://www.tensorflow.org/install/install_sources")
              custom_tf = input("Location of custom tensorflow-gpu wheel (leave blank to manually install): ")
              if not custom_tf:
                  del Required_Packages[0]
                  return
              if os.path.isfile(custom_tf):
                  Required_Packages[0] = custom_tf
              else:
                  ERROR("{} not found".format(custom_tf))
  
  
  def Tips_1_1():
      INFO("""1. Install Docker
  https://www.docker.com/community-edition
 
</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 def Tips_1_1():
    INFO("""1. Install Docker
 </s> add def tips_1_1():
    """ Output Tips """
    out_info("""1. Install Docker </s> remove def Tips_2_1():
    INFO("""Tensorflow has no official prebuilts for CUDA 9.1 currently.
 </s> add def tips_2_1():
    """ Output Tips """
    out_info("""Tensorflow has no official prebuilts for CUDA 9.1 currently. </s> remove     if i == "" or i == "N" or i == "n":
        ERROR('Please install system dependencies to continue')

def Check_Missing_Dep():
    global Missing_Packages, Installed_Packages, ENABLE_CUDA, Is_MacOS
    if ENABLE_CUDA and Is_MacOS:
        Required_Packages.extend(MacOS_Required_Packages)
    Missing_Packages = []
    for pkg in Required_Packages:
 </s> add     if i in ("", "N", "n"):
        out_error('Please install system dependencies to continue')


def check_missing_dep():
    """ Check for missing dependencies """
    global MISSING_PACKAGES, INSTALLED_PACKAGES, ENABLE_CUDA, IS_MACOS
    if ENABLE_CUDA and IS_MACOS:
        REQUIRED_PACKAGES.extend(MACOS_REQUIRED_PACKAGES)
    MISSING_PACKAGES = []
    for pkg in REQUIRED_PACKAGES: </s> remove         for m in Missing_Packages:
            msg = "Installing {}".format(m)
            INFO(msg)
 </s> add         for pkg in MISSING_PACKAGES:
            msg = "Installing {}".format(pkg)
            out_info(msg)
def update_tf_dep():
    """ Update Tensorflow Dependency """
    global CUDA_VERSION
    REQUIRED_PACKAGES[0] = "tensorflow-gpu"
    if CUDA_VERSION.startswith("8.0"):
        REQUIRED_PACKAGES[0] += "==1.4.0"
    elif not CUDA_VERSION.startswith("9.0"):
        out_warning("Tensorflow has currently no official prebuild for CUDA "
                    "versions above 9.0.\r\nTo continue, You have to build "
                    "and install your own tensorflow-gpu.\r\n"
                    "Help: "
                    "https://www.tensorflow.org/install/install_sources")
        custom_tf = input("Location of custom tensorflow-gpu wheel (leave "
                          "blank to manually install): ")
        if not custom_tf:
            del REQUIRED_PACKAGES[0]
            return
        if os.path.isfile(custom_tf):
            REQUIRED_PACKAGES[0] = custom_tf
        else:
            out_error("{} not found".format(custom_tf))
              pipargs.append(m)
              # pip install -qq (--user) (--install-options) m
              pipmain(pipargs)
  
def update_tf_dep():
    """ Update Tensorflow Dependency """
    global CUDA_VERSION
    REQUIRED_PACKAGES[0] = "tensorflow-gpu"
    if CUDA_VERSION.startswith("8.0"):
        REQUIRED_PACKAGES[0] += "==1.4.0"
    elif not CUDA_VERSION.startswith("9.0"):
        out_warning("Tensorflow has currently no official prebuild for CUDA "
                    "versions above 9.0.\r\nTo continue, You have to build "
                    "and install your own tensorflow-gpu.\r\n"
                    "Help: "
                    "https://www.tensorflow.org/install/install_sources")
        custom_tf = input("Location of custom tensorflow-gpu wheel (leave "
                          "blank to manually install): ")
        if not custom_tf:
            del REQUIRED_PACKAGES[0]
            return
        if os.path.isfile(custom_tf):
            REQUIRED_PACKAGES[0] = custom_tf
        else:
            out_error("{} not found".format(custom_tf))
def update_tf_dep():
    """ Update Tensorflow Dependency """
    global CUDA_VERSION
    REQUIRED_PACKAGES[0] = "tensorflow-gpu"
    if CUDA_VERSION.startswith("8.0"):
        REQUIRED_PACKAGES[0] += "==1.4.0"
    elif not CUDA_VERSION.startswith("9.0"):
        out_warning("Tensorflow has currently no official prebuild for CUDA "
                    "versions above 9.0.\r\nTo continue, You have to build "
                    "and install your own tensorflow-gpu.\r\n"
                    "Help: "
                    "https://www.tensorflow.org/install/install_sources")
        custom_tf = input("Location of custom tensorflow-gpu wheel (leave "
                          "blank to manually install): ")
        if not custom_tf:
            del REQUIRED_PACKAGES[0]
            return
        if os.path.isfile(custom_tf):
            REQUIRED_PACKAGES[0] = custom_tf
        else:
            out_error("{} not found".format(custom_tf))
def update_tf_dep():
    """ Update Tensorflow Dependency """
    global CUDA_VERSION
    REQUIRED_PACKAGES[0] = "tensorflow-gpu"
    if CUDA_VERSION.startswith("8.0"):
        REQUIRED_PACKAGES[0] += "==1.4.0"
    elif not CUDA_VERSION.startswith("9.0"):
        out_warning("Tensorflow has currently no official prebuild for CUDA "
                    "versions above 9.0.\r\nTo continue, You have to build "
                    "and install your own tensorflow-gpu.\r\n"
                    "Help: "
                    "https://www.tensorflow.org/install/install_sources")
        custom_tf = input("Location of custom tensorflow-gpu wheel (leave "
                          "blank to manually install): ")
        if not custom_tf:
            del REQUIRED_PACKAGES[0]
            return
        if os.path.isfile(custom_tf):
            REQUIRED_PACKAGES[0] = custom_tf
        else:
            out_error("{} not found".format(custom_tf))
def update_tf_dep():
    """ Update Tensorflow Dependency """
    global CUDA_VERSION
    REQUIRED_PACKAGES[0] = "tensorflow-gpu"
    if CUDA_VERSION.startswith("8.0"):
        REQUIRED_PACKAGES[0] += "==1.4.0"
    elif not CUDA_VERSION.startswith("9.0"):
        out_warning("Tensorflow has currently no official prebuild for CUDA "
                    "versions above 9.0.\r\nTo continue, You have to build "
                    "and install your own tensorflow-gpu.\r\n"
                    "Help: "
                    "https://www.tensorflow.org/install/install_sources")
        custom_tf = input("Location of custom tensorflow-gpu wheel (leave "
                          "blank to manually install): ")
        if not custom_tf:
            del REQUIRED_PACKAGES[0]
            return
        if os.path.isfile(custom_tf):
            REQUIRED_PACKAGES[0] = custom_tf
        else:
            out_error("{} not found".format(custom_tf))
def update_tf_dep():
    """ Update Tensorflow Dependency """
    global CUDA_VERSION
    REQUIRED_PACKAGES[0] = "tensorflow-gpu"
    if CUDA_VERSION.startswith("8.0"):
        REQUIRED_PACKAGES[0] += "==1.4.0"
    elif not CUDA_VERSION.startswith("9.0"):
        out_warning("Tensorflow has currently no official prebuild for CUDA "
                    "versions above 9.0.\r\nTo continue, You have to build "
                    "and install your own tensorflow-gpu.\r\n"
                    "Help: "
                    "https://www.tensorflow.org/install/install_sources")
        custom_tf = input("Location of custom tensorflow-gpu wheel (leave "
                          "blank to manually install): ")
        if not custom_tf:
            del REQUIRED_PACKAGES[0]
            return
        if os.path.isfile(custom_tf):
            REQUIRED_PACKAGES[0] = custom_tf
        else:
            out_error("{} not found".format(custom_tf))
def update_tf_dep():
    """ Update Tensorflow Dependency """
    global CUDA_VERSION
    REQUIRED_PACKAGES[0] = "tensorflow-gpu"
    if CUDA_VERSION.startswith("8.0"):
        REQUIRED_PACKAGES[0] += "==1.4.0"
    elif not CUDA_VERSION.startswith("9.0"):
        out_warning("Tensorflow has currently no official prebuild for CUDA "
                    "versions above 9.0.\r\nTo continue, You have to build "
                    "and install your own tensorflow-gpu.\r\n"
                    "Help: "
                    "https://www.tensorflow.org/install/install_sources")
        custom_tf = input("Location of custom tensorflow-gpu wheel (leave "
                          "blank to manually install): ")
        if not custom_tf:
            del REQUIRED_PACKAGES[0]
            return
        if os.path.isfile(custom_tf):
            REQUIRED_PACKAGES[0] = custom_tf
        else:
            out_error("{} not found".format(custom_tf))
def update_tf_dep():
    """ Update Tensorflow Dependency """
    global CUDA_VERSION
    REQUIRED_PACKAGES[0] = "tensorflow-gpu"
    if CUDA_VERSION.startswith("8.0"):
        REQUIRED_PACKAGES[0] += "==1.4.0"
    elif not CUDA_VERSION.startswith("9.0"):
        out_warning("Tensorflow has currently no official prebuild for CUDA "
                    "versions above 9.0.\r\nTo continue, You have to build "
                    "and install your own tensorflow-gpu.\r\n"
                    "Help: "
                    "https://www.tensorflow.org/install/install_sources")
        custom_tf = input("Location of custom tensorflow-gpu wheel (leave "
                          "blank to manually install): ")
        if not custom_tf:
            del REQUIRED_PACKAGES[0]
            return
        if os.path.isfile(custom_tf):
            REQUIRED_PACKAGES[0] = custom_tf
        else:
            out_error("{} not found".format(custom_tf))
def update_tf_dep():
    """ Update Tensorflow Dependency """
    global CUDA_VERSION
    REQUIRED_PACKAGES[0] = "tensorflow-gpu"
    if CUDA_VERSION.startswith("8.0"):
        REQUIRED_PACKAGES[0] += "==1.4.0"
    elif not CUDA_VERSION.startswith("9.0"):
        out_warning("Tensorflow has currently no official prebuild for CUDA "
                    "versions above 9.0.\r\nTo continue, You have to build "
                    "and install your own tensorflow-gpu.\r\n"
                    "Help: "
                    "https://www.tensorflow.org/install/install_sources")
        custom_tf = input("Location of custom tensorflow-gpu wheel (leave "
                          "blank to manually install): ")
        if not custom_tf:
            del REQUIRED_PACKAGES[0]
            return
        if os.path.isfile(custom_tf):
            REQUIRED_PACKAGES[0] = custom_tf
        else:
            out_error("{} not found".format(custom_tf))
def update_tf_dep():
    """ Update Tensorflow Dependency """
    global CUDA_VERSION
    REQUIRED_PACKAGES[0] = "tensorflow-gpu"
    if CUDA_VERSION.startswith("8.0"):
        REQUIRED_PACKAGES[0] += "==1.4.0"
    elif not CUDA_VERSION.startswith("9.0"):
        out_warning("Tensorflow has currently no official prebuild for CUDA "
                    "versions above 9.0.\r\nTo continue, You have to build "
                    "and install your own tensorflow-gpu.\r\n"
                    "Help: "
                    "https://www.tensorflow.org/install/install_sources")
        custom_tf = input("Location of custom tensorflow-gpu wheel (leave "
                          "blank to manually install): ")
        if not custom_tf:
            del REQUIRED_PACKAGES[0]
            return
        if os.path.isfile(custom_tf):
            REQUIRED_PACKAGES[0] = custom_tf
        else:
            out_error("{} not found".format(custom_tf))
def update_tf_dep():
    """ Update Tensorflow Dependency """
    global CUDA_VERSION
    REQUIRED_PACKAGES[0] = "tensorflow-gpu"
    if CUDA_VERSION.startswith("8.0"):
        REQUIRED_PACKAGES[0] += "==1.4.0"
    elif not CUDA_VERSION.startswith("9.0"):
        out_warning("Tensorflow has currently no official prebuild for CUDA "
                    "versions above 9.0.\r\nTo continue, You have to build "
                    "and install your own tensorflow-gpu.\r\n"
                    "Help: "
                    "https://www.tensorflow.org/install/install_sources")
        custom_tf = input("Location of custom tensorflow-gpu wheel (leave "
                          "blank to manually install): ")
        if not custom_tf:
            del REQUIRED_PACKAGES[0]
            return
        if os.path.isfile(custom_tf):
            REQUIRED_PACKAGES[0] = custom_tf
        else:
            out_error("{} not found".format(custom_tf))
def update_tf_dep():
    """ Update Tensorflow Dependency """
    global CUDA_VERSION
    REQUIRED_PACKAGES[0] = "tensorflow-gpu"
    if CUDA_VERSION.startswith("8.0"):
        REQUIRED_PACKAGES[0] += "==1.4.0"
    elif not CUDA_VERSION.startswith("9.0"):
        out_warning("Tensorflow has currently no official prebuild for CUDA "
                    "versions above 9.0.\r\nTo continue, You have to build "
                    "and install your own tensorflow-gpu.\r\n"
                    "Help: "
                    "https://www.tensorflow.org/install/install_sources")
        custom_tf = input("Location of custom tensorflow-gpu wheel (leave "
                          "blank to manually install): ")
        if not custom_tf:
            del REQUIRED_PACKAGES[0]
            return
        if os.path.isfile(custom_tf):
            REQUIRED_PACKAGES[0] = custom_tf
        else:
            out_error("{} not found".format(custom_tf))
def update_tf_dep():
    """ Update Tensorflow Dependency """
    global CUDA_VERSION
    REQUIRED_PACKAGES[0] = "tensorflow-gpu"
    if CUDA_VERSION.startswith("8.0"):
        REQUIRED_PACKAGES[0] += "==1.4.0"
    elif not CUDA_VERSION.startswith("9.0"):
        out_warning("Tensorflow has currently no official prebuild for CUDA "
                    "versions above 9.0.\r\nTo continue, You have to build "
                    "and install your own tensorflow-gpu.\r\n"
                    "Help: "
                    "https://www.tensorflow.org/install/install_sources")
        custom_tf = input("Location of custom tensorflow-gpu wheel (leave "
                          "blank to manually install): ")
        if not custom_tf:
            del REQUIRED_PACKAGES[0]
            return
        if os.path.isfile(custom_tf):
            REQUIRED_PACKAGES[0] = custom_tf
        else:
            out_error("{} not found".format(custom_tf))
def update_tf_dep():
    """ Update Tensorflow Dependency """
    global CUDA_VERSION
    REQUIRED_PACKAGES[0] = "tensorflow-gpu"
    if CUDA_VERSION.startswith("8.0"):
        REQUIRED_PACKAGES[0] += "==1.4.0"
    elif not CUDA_VERSION.startswith("9.0"):
        out_warning("Tensorflow has currently no official prebuild for CUDA "
                    "versions above 9.0.\r\nTo continue, You have to build "
                    "and install your own tensorflow-gpu.\r\n"
                    "Help: "
                    "https://www.tensorflow.org/install/install_sources")
        custom_tf = input("Location of custom tensorflow-gpu wheel (leave "
                          "blank to manually install): ")
        if not custom_tf:
            del REQUIRED_PACKAGES[0]
            return
        if os.path.isfile(custom_tf):
            REQUIRED_PACKAGES[0] = custom_tf
        else:
            out_error("{} not found".format(custom_tf))
def update_tf_dep():
    """ Update Tensorflow Dependency """
    global CUDA_VERSION
    REQUIRED_PACKAGES[0] = "tensorflow-gpu"
    if CUDA_VERSION.startswith("8.0"):
        REQUIRED_PACKAGES[0] += "==1.4.0"
    elif not CUDA_VERSION.startswith("9.0"):
        out_warning("Tensorflow has currently no official prebuild for CUDA "
                    "versions above 9.0.\r\nTo continue, You have to build "
                    "and install your own tensorflow-gpu.\r\n"
                    "Help: "
                    "https://www.tensorflow.org/install/install_sources")
        custom_tf = input("Location of custom tensorflow-gpu wheel (leave "
                          "blank to manually install): ")
        if not custom_tf:
            del REQUIRED_PACKAGES[0]
            return
        if os.path.isfile(custom_tf):
            REQUIRED_PACKAGES[0] = custom_tf
        else:
            out_error("{} not found".format(custom_tf))
def update_tf_dep():
    """ Update Tensorflow Dependency """
    global CUDA_VERSION
    REQUIRED_PACKAGES[0] = "tensorflow-gpu"
    if CUDA_VERSION.startswith("8.0"):
        REQUIRED_PACKAGES[0] += "==1.4.0"
    elif not CUDA_VERSION.startswith("9.0"):
        out_warning("Tensorflow has currently no official prebuild for CUDA "
                    "versions above 9.0.\r\nTo continue, You have to build "
                    "and install your own tensorflow-gpu.\r\n"
                    "Help: "
                    "https://www.tensorflow.org/install/install_sources")
        custom_tf = input("Location of custom tensorflow-gpu wheel (leave "
                          "blank to manually install): ")
        if not custom_tf:
            del REQUIRED_PACKAGES[0]
            return
        if os.path.isfile(custom_tf):
            REQUIRED_PACKAGES[0] = custom_tf
        else:
            out_error("{} not found".format(custom_tf))
def update_tf_dep():
    """ Update Tensorflow Dependency """
    global CUDA_VERSION
    REQUIRED_PACKAGES[0] = "tensorflow-gpu"
    if CUDA_VERSION.startswith("8.0"):
        REQUIRED_PACKAGES[0] += "==1.4.0"
    elif not CUDA_VERSION.startswith("9.0"):
        out_warning("Tensorflow has currently no official prebuild for CUDA "
                    "versions above 9.0.\r\nTo continue, You have to build "
                    "and install your own tensorflow-gpu.\r\n"
                    "Help: "
                    "https://www.tensorflow.org/install/install_sources")
        custom_tf = input("Location of custom tensorflow-gpu wheel (leave "
                          "blank to manually install): ")
        if not custom_tf:
            del REQUIRED_PACKAGES[0]
            return
        if os.path.isfile(custom_tf):
            REQUIRED_PACKAGES[0] = custom_tf
        else:
            out_error("{} not found".format(custom_tf))
def update_tf_dep():
    """ Update Tensorflow Dependency """
    global CUDA_VERSION
    REQUIRED_PACKAGES[0] = "tensorflow-gpu"
    if CUDA_VERSION.startswith("8.0"):
        REQUIRED_PACKAGES[0] += "==1.4.0"
    elif not CUDA_VERSION.startswith("9.0"):
        out_warning("Tensorflow has currently no official prebuild for CUDA "
                    "versions above 9.0.\r\nTo continue, You have to build "
                    "and install your own tensorflow-gpu.\r\n"
                    "Help: "
                    "https://www.tensorflow.org/install/install_sources")
        custom_tf = input("Location of custom tensorflow-gpu wheel (leave "
                          "blank to manually install): ")
        if not custom_tf:
            del REQUIRED_PACKAGES[0]
            return
        if os.path.isfile(custom_tf):
            REQUIRED_PACKAGES[0] = custom_tf
        else:
            out_error("{} not found".format(custom_tf))
  
  
  def Tips_1_1():
      INFO("""1. Install Docker
  https://www.docker.com/community-edition
keep keep keep keep replace replace replace replace replace replace replace replace replace replace 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