Giter VIP home page Giter VIP logo

Comments (19)

Clorr avatar Clorr commented on April 28, 2024

can you try removing the ==1.4.0 in the requirements-gpu.txt file?

from faceswap.

Clorr avatar Clorr commented on April 28, 2024

In a comment on the link you provide, it says that tensorflow-gpu works only with python 3.5.x . Maybe it is for the 1.4.0 and if you try a newer lib it will work with python 3.6.x. It is likely something like that. If you manage to solve this with a newer version, please paste here the version number you finally used.

from faceswap.

Clorr avatar Clorr commented on April 28, 2024

There is also an official doc here: https://www.tensorflow.org/versions/r0.12/get_started/os_setup#pip_installation_on_windows

from faceswap.

studiomtn avatar studiomtn commented on April 28, 2024

I tried your method to remove the ==1.4.0. No success.

I then tried the other method in the official doc link you provided with this result:
c:>pip install --upgrade https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-0.12.1-cp35-cp35m-win_amd64.whl
tensorflow_gpu-0.12.1-cp35-cp35m-win_amd64.whl is not a supported wheel on this platform.

I am really scratching my head over this issue. I run a Intel i7 7700K CPU and NVIDIA GTX 1080

from faceswap.

Clorr avatar Clorr commented on April 28, 2024

Did you try install python version 3.5?

from faceswap.

studiomtn avatar studiomtn commented on April 28, 2024

I uninstalled 3.6 and installed 3.5.

This is the result after running the requirements-gpu.txt command:
(faceswap) C:\faceswap>pip install -r requirements-gpu.txt
Could not import runpy module
ModuleNotFoundError: No module named 'runpy'

from faceswap.

Clorr avatar Clorr commented on April 28, 2024

Very strange, there is no runpy module imported in the project. Maybe a sub dependency. I'll check that today if I can reproduce...

from faceswap.

Clorr avatar Clorr commented on April 28, 2024

As I see runpy is a part of python itself, so there seems to be a problem with your installation. The most useful resource I found is that one: https://stackoverflow.com/questions/44463879/could-not-import-runpy-module

Alternatively you can check reddit and get the install procedure from there. Maybe you will have more luck with it

from faceswap.

studiomtn avatar studiomtn commented on April 28, 2024

I uninstalled Python 3.5 and reinstalled. Got past the runpy error and the tensorflow gpu error but now ran into other errors:

Failed building wheel for dlib
Failed building wheel for scikit-image

-- The BOOST_ROOT and/or BOOST_LIBRARYDIR environment variables are not set. You need to set these
-- variables so we know where boost is installed. So set these variables to something like this:
-- BOOST_ROOT=C:\local\boost_1_57_0
-- BOOST_LIBRARYDIR=C:\local\boost_1_57_0\stage\lib
-- The best way to set enviornment variables in Windows is to go to the start menu's search box,
-- type environment, and open the Environment Variables dialog. That lets you add more variables.
-- Add these variables to either user or system variables, it doesn't matter.
-- You might have to log out and log back in before the environment changes take effect.

CMake Error at C:/Users/Mi/AppData/Local/Temp/pip-build-fw5bfa97/dlib/dlib/cmake_utils/add_python_module:149 (message):
Boost python library not found.
Call Stack (most recent call first):
CMakeLists.txt:9 (include)
-- Configuring incomplete, errors occurred!
See also "C:/Users/Mi/AppData/Local/Temp/pip-build-fw5bfa97/dlib/tools/python/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Mi/AppData/Local/Temp/pip-build-fw5bfa97/dlib/tools/python/build/CMakeFiles/CMakeError.log".
error: cmake configuration failed!

-- Found CUDA: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0 (found suitable version "8.0", minimum required is "7.5")
CMake Warning at C:/Users/Mi/AppData/Local/Temp/pip-build-fw5bfa97/dlib/dlib/CMakeLists.txt:535 (message):
You have CUDA installed, but we can't use it unless you put visual studio
in 64bit mode.
-- Disabling CUDA support for dlib. DLIB WILL NOT USE CUDA
-- C++11 activated.

I am pretty much giving up at this point... I cant get past install. sigh*

from faceswap.

Clorr avatar Clorr commented on April 28, 2024

You are missing the Boost dependency. You can have a look at the Dockerfile to see how to install it, but I think you won't have apt-get on windows.

Otherwise look on reddit /r/deepfakes someone posted a tutorial on how to set up things. The repo here uses the same things except you don't need pytorch.

I can't give you the link, I'm at work and the reddit is somewhat NSFW...

from faceswap.

studiomtn avatar studiomtn commented on April 28, 2024

What chat service do you use? Maybe we can chat in real time. Probably be easier.
tried doing this install:
https://www.reddit.com/r/deepfakes/comments/7n00f2/really_high_level_tutorial/?st=jc7c0ezj&sh=72a48965

but ran into errors.

I tried this tutorial and successfully ran the training but CPU only was working and not the GPU.
https://www.reddit.com/r/deepfakes/comments/7nq173/v2_tutorial_intelbased_python_easy_to_follow/?st=jc7c72gv&sh=5632e386

just fyi im not an avid windows/pc user. (mac user) I just have a custom built PC with mac os installed as dual boot. im new to this cmd prompt stuff.

from faceswap.

Clorr avatar Clorr commented on April 28, 2024

Ok, happy to know you managed to run something ;-)

On my side I don't do training since my mac is quite old, so I'm afraid I won't be of much help on how to setup the gpu thing

from faceswap.

Clorr avatar Clorr commented on April 28, 2024

Now that thing works, did you try installing the tensorflow-gpu ? AFAIK there is no particular thing to do to run the with the GPU, so I assume it all depends on having the good lib...

from faceswap.

studiomtn avatar studiomtn commented on April 28, 2024

Yes I was just saying that I am more accustomed to Mac but I am mostly trying to do this in Windows since most people use it. If I can get some Windows help that would be great. I don't remember what happened when I tried to install the tensorflow-gpu after I got the CPU version running. I'm pretty sure I got some error. I'll have to go back and go through the process and recreate again.
I really rather do this with GPU. I don't have patience waiting a week to train something. As being a professional video editor and cameraman I already wait for rendering. lol

from faceswap.

Clorr avatar Clorr commented on April 28, 2024

That's the way it goes for everyone, even developers ;-)

Good luck!

Note that you shouldn't have to reinstall everything, just pip install the requirements, it should skip what is already installed, and just do what it misses

from faceswap.

studiomtn avatar studiomtn commented on April 28, 2024

Finally got some progress. Started from the beginning using this Github: https://github.com/joshua-wu/deepfakes_faceswap

GPU working. Training working. I am currently waiting for the trump/cage training to finish. Although I do not know what the process is after that since there is no further instructions after that was provided in joshua-wu's github. I am not even sure how I would tackle this with other data besides the provided trump/cage photos. Can your code be implemented into this also?

from faceswap.

Clorr avatar Clorr commented on April 28, 2024

The joshua-wu repo is the first repo and it has the original code and it misses many improvments. This repo was created because the joshua-wu one is not really active. If you make it run, you should be able to make this one runningas the requirements are almost the same.

For instructions, the Readme on the homepage shoudl give you an overview of how things go. also the reddit page may help you. Anyhow the goal is to convert images/video, anf it goes like this:

Get a video => transform into images => convert images with a model => transform back to a video

For the video <=> images transformation, you'll need ffmpeg
For the model, you will have to do as for Trump and Cage:

Gather photos of your source (the person in the video) and of your target (the person you want to see in video) => extract faces from photos => train the model

Note that for your source photos, you can take the images you have from the video you want to convert

from faceswap.

studiomtn avatar studiomtn commented on April 28, 2024

SOLVED

Clean install of Python 3.5
Then Installed individually:
pip install pathlib==1.0.1
pip install scandir==1.6
pip install h5py==2.7.1
pip install Keras==2.1.2
pip install opencv-python==3.3.0.10
pip install tensorflow-gpu==1.4.0

(Windows 10)

from faceswap.

Clorr avatar Clorr commented on April 28, 2024

Important note!

Now that I have a windows machine to run this, I also encountered the problem. The reason why this happens is due to the install of the 32 bit version of Python! Please ensure you have installed the 64 bit version!

from faceswap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.