Giter VIP home page Giter VIP logo

Comments (13)

Ganonmaster avatar Ganonmaster commented on April 28, 2024 1

In theory an installation like that works, but for development, you ideally you want it in some kind of separate environment. Virtualenv or something, so it does not conflict with any local packages you may already have installed.

Packaging is not necessary immediatelly, but I can imagine having prebuilt executables of a command line version is already a great improvement. It allows other devs to setup simple frontends that interface with the command-line tool. Having a pre-built command-line tool is a great step towards coupling it with both web and native frontends.

from faceswap.

Yutsa avatar Yutsa commented on April 28, 2024 1

When I tried running the convert.py script I had the following error :

Failed to extract from image: /home/edouard/Téléchargements/faceswap-data/source-images/lawrence/107.jpg. Reason: Unable to open contrib/shape_predictor_68_face_landmarks.dat

I had to look into the code to know what to do.

I guess we'll need a way to get this file without having to download it separatly if we want to make it user friendly. Or say explictily how and where to download it if it is missing when executing the script.

from faceswap.

Ganonmaster avatar Ganonmaster commented on April 28, 2024

I would see separate GPU and CPU versions for each target OS.

What I wonder, is how the process would look for the end user. Seeing as the training portion takes the most time, you could initially start by providing the basic "image processor" to the user, and have more advanced users share their models in ready made archives. I'm unfamiliar with the format, so I'm not sure if that opens it up to some kind of security issue. However, I feel like that could be an easy way of simplifying the process for non-technical people. Your video/picture + a pre-made swappable model = easy result.

from faceswap.

cercata avatar cercata commented on April 28, 2024

It's quite easy making the installation on windows x64, for CPU based processing:

Until some GUI is added, I don't think it's worth packaging it ...

from faceswap.

Ganonmaster avatar Ganonmaster commented on April 28, 2024

Basic command line usage is almost ready. Can probably look into cooking up pre-built packages once that's done. I might look into some CI stuff to make semi-automated builds, but that might be goals to shoot for after christmas or start of 2018.

from faceswap.

Ganonmaster avatar Ganonmaster commented on April 28, 2024

@Yutsa I merged your PR with the error message. We can most likely also improve the behavior for handling non-existent input/output directories with some "folder does not exist, create it? y/n" dialogues.

from faceswap.

Yutsa avatar Yutsa commented on April 28, 2024

I am working on using one main script that calls the other.

The idea is to get commands like this ./faceswap.py train, ./faceswap.py extract, ./faceswap.py convert.

I don't know if this is what you want though.

from faceswap.

Ganonmaster avatar Ganonmaster commented on April 28, 2024

Yes, you can achieve this easily using the subparser feature that comes as part of argparse. I was going to do this myself, but I may not have time today.

from faceswap.

Ganonmaster avatar Ganonmaster commented on April 28, 2024

I'm currently looking into creating an initial self-contained build of the command-line tool in its current state. PyInstaller seems like a good option, although I fear it might result in very large binaries.

Would be nice to release it on January 1st if possible!

from faceswap.

Yutsa avatar Yutsa commented on April 28, 2024

Shouldn't we provide to Dockerfiles ? One for GPU and the other for CPU ?

Ideally we should upload both images on Docker Hub, that way a user would only have to install docker and run the docker run -it --rm -v [sourceFolder]:/srv -it user/faceswap:tag bash

I also thought maybe we could add a function to create the video from the swapped pictures after convert maybe ?

Ideally if we could from the same tool cut the video into frames, cut faces, train, replace faces and assemble the video back it would be the best for a user.

from faceswap.

Ganonmaster avatar Ganonmaster commented on April 28, 2024

In order to use Docker with a GPU, you'd need to split it up further between OpenCL and CUDA. To use Nvidia CUDA with docker, the only possible way is nvidia-docker, which is only supported on Linux. In addition, the same is true for Docker with OpenCL. As far as I know, OpenCL support in Docker involves manually giving your docker container access to your host's GPU driver.

So, assuming that Linux users are per definition more tech-savvy than Windows or macOS users and considering that Dockerized GPU support is limited to Linux for the time being, I strongly believe that the usage of Docker does not help non-technical users at all. Yes, it's nice if you're savvy with Docker and containers, but is that really even a desirable method of distribution for people who have very limited command line knowledge?

I do not think Docker GPU support is going to help in getting this project usable for non-technical users. A Docker Hub image would be nice, but it would be limited to a CPU version, because getting it working on a GPU (CUDA or OpenCL) would still be a pain.

Still, I would encourage you to research and play around with this, and provide pull requests if you manage to get it working.

from faceswap.

Yutsa avatar Yutsa commented on April 28, 2024

Yeah I was actually looking at nvidia-docker, it looks complicated to have a Docker container with GPU.

I guess we'll have to wait for this to be better supported.

from faceswap.

gdunstone avatar gdunstone commented on April 28, 2024

for dependencies a useful command is:
pip3 install -r requirements{-gpu}.txt

we can also create 2x pypi packages.

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.