Giter VIP home page Giter VIP logo

Comments (24)

lukaville avatar lukaville commented on April 28, 2024 1

@ruah1984 you can start job using --mode jupyter flag and open terminal in jupyter web interface. So you can inspect directories using command line utils (ls, cd, etc.), or you can use built-in jupyter file manager and check that this directory exists.

from faceswap.

Ganonmaster avatar Ganonmaster commented on April 28, 2024

Hi, visonpon. Could you please fill out the issue template or otherwise expand on your problem description? You have given us very little information to go on.

If you could, would you be so kind as to provide us with information about the command that you are running that results in this error and perhaps some information on the operating system you are using?

from faceswap.

visonpon avatar visonpon commented on April 28, 2024

yeah.
@Ganonmaster
the command : sudo CUDA_VISIBLE_DEVICES=1 python3 faceswap.py train
running log message:

Using Theano backend.
usage : faceswap.py [-h]{extract,train,convert}....
positional arguments:
{extract,train,convert}
extract
train
convert
optional arguments:
-h, --help

Then it return to the dir that i run the command, and there is no other error message.
i have installed the tf1.3, python3.5, keras2.2 and my os is ubuntu14.04

from faceswap.

Ganonmaster avatar Ganonmaster commented on April 28, 2024

Hi, you seem to have not specified input, output and/or model directories. Could you try specifying any of those options and see what the command does then? Also note that these directories must exist for the script to work.

Also note that I'm assuming you have made changes to the script to use the Theano backend. The default is the Tensorflow backend. If you could share your experiences with this backend, we'd be very grateful.

from faceswap.

visonpon avatar visonpon commented on April 28, 2024

@Ganonmaster
as how to use Theano , i follow this link https://github.com/keras-team/keras/issues/3794 and do as ch3ll0v3k said:
$ nano ~/.keras/keras.json
{
"image_dim_ordering": "th",
"epsilon": 1e-07,
"floatx": "float32",
"backend": "theano"
}

btw, i have set the input_A, input_B and models' dir, otherwise there should be warning that: input dir not found. but i didn't receive this warning.

from faceswap.

Ganonmaster avatar Ganonmaster commented on April 28, 2024

There is no such warning at this time. I have made a issue for creating it, but if you wish to implement it yourself, you are free to submit a pull request.

from faceswap.

ruah1984 avatar ruah1984 commented on April 28, 2024

HI @lukaville , same error message found when using cloud base GPU
as below

2017-12-31 04:42:30,364 INFO - Unable to open file (unable to open file: name = '/output/encoder.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
2017-12-31 04:42:30,603 INFO - usage: faceswap.py [-h] {extract,train,convert} ...
2017-12-31 04:42:30,603 INFO -
2017-12-31 04:42:30,604 INFO - positional arguments:
2017-12-31 04:42:30,604 INFO - {extract,train,convert}
2017-12-31 04:42:30,604 INFO - extract Extract the faces from a pictures.
2017-12-31 04:42:30,604 INFO - train This command trains the model for the two faces A and
2017-12-31 04:42:30,604 INFO - B.

can't figure what's go wrong

from faceswap.

Clorr avatar Clorr commented on April 28, 2024

did you create a folder named output ?

from faceswap.

lukaville avatar lukaville commented on April 28, 2024

@Clorr, looks like @ruah1984 uses Floydhub, where output folder should be pre-created automatically and writable https://docs.floydhub.com/guides/data/storing_output/

from faceswap.

Clorr avatar Clorr commented on April 28, 2024

Ah ok. I think the printing of the help message after termination is a reported issue (#43)

Beside that, I can't help for now. What's the command line that is used here?

from faceswap.

ruah1984 avatar ruah1984 commented on April 28, 2024

hi @Clorr this is the command line i use,

floyd run --gpu --env tensorflow-1.4:py2 --data ruah1984/datasets/faces_a:/faces_a --data ruah1984/datasets/faces_b:/faces_b 'python faceswap.py train -A /faces_a -B /faces_b -v -m /output/models'

the input dateset store inside floydhub
ruah1984/datasets/faces_a
ruah1984/datasets/faces_b

as other mention in the reddit, i have create an output folder but same issue as well

from faceswap.

Clorr avatar Clorr commented on April 28, 2024

I'm not into floyd for now, so that was a guess from your error message. I checked this page that gives pretty handy instructions. Did you follow everything? (there is a mention of a "models" folder also...)

  • Install floyd-cli: pip install -U floyd-cli
  • Login: floyd login
  • Then inside faceswap project directory run: floyd init faceswap
  • Outside project directory create directories with training data for face A and B and run inside each directory:
floyd data init faces_a # in the first directory
floyd data upload
floyd data init faces_b # in the second directory
floyd data upload
  • Inside faceswap directory create empty models folder. If the folder contains models it may not work because there is a size limit for code directory.
  • Copy requirements-gpu.txt to floyd_requirements.txt
  • Remove "lib" from .floydignore file
  • Finally, run the training :) floyd run --gpu --env tensorflow-1.4:py2 --data faces_a:/faces_a --data faces_b:/faces_b "python faceswap.py train -A /faces_a -B /faces_b -v -m /output/models"

from faceswap.

ruah1984 avatar ruah1984 commented on April 28, 2024

all process have been follow,
the latest one is create an output folder inside the faceswap directory
--faceswap1\output\models

You can refer below link
https://www.floydhub.com/ruah1984/projects/quick-start-trial-and-error/10

Data set is here
https://www.floydhub.com/ruah1984/datasets/faces_b
https://www.floydhub.com/ruah1984/datasets/faces_a

all above is public, you can view it from the link

from faceswap.

Clorr avatar Clorr commented on April 28, 2024

Ok @ruah1984 . That will help someone who may know more than me on that...

One question though, there is a quote at the end of your command line, is that a copy/paste bug, or do you use it in your run?

from faceswap.

ruah1984 avatar ruah1984 commented on April 28, 2024

@Clorr here is the command line i use in cmd
floyd run --gpu --env tensorflow-1.4:py2 --data faces_a:/faces_a --data faces_b:/faces_b "python faceswap.py train -A /faces_a -B /faces_b -v -m /output/models

in floydhub, the command will show
floyd run --gpu --env tensorflow-1.4:py2 --data ruah1984/datasets/faces_a:/faces_a --data ruah1984/datasets/faces_b:/faces_b 'python faceswap.py train -A /faces_a -B /faces_b -v -m /output/models'

from faceswap.

Clorr avatar Clorr commented on April 28, 2024

oh ok, the quote is closing the one before python... , so it seems fine. As @lukaville suggested, you should check with the --mode jupyter flag to have more visibility on what is going on...

from faceswap.

Clorr avatar Clorr commented on April 28, 2024

What I understand from your issue, is that it tries to load an encoder.h5 from the /output/models folder and does not find it. But what is not clear for me is if you have to upload this file before launching the training or not. In desperate case, try uploading the 3 .h5 files in /output/models folder

from faceswap.

lukaville avatar lukaville commented on April 28, 2024

Hmm, I just realized that probably "Unable to open file" error may be irrelevant to the real issue because even when everything is OK and script creates models for the first time this message still printed.

@ruah1984 check that there are images in /faces_a and /faces_b directories. I've just had the same issue with the same output and it happens when there are no image files in input directories root. Probably we have to print more clear message in this case :)

from faceswap.

Clorr avatar Clorr commented on April 28, 2024

Messy issue. Reopen for a specific question if needed

from faceswap.

ruah1984 avatar ruah1984 commented on April 28, 2024

just for your information, the issue only happen if we are using floyd cloud. what i am thinking, it possible the dataset cannot mount to the project for training. It never occur when i using my personal laptop.

this issue can consider close, i not sure other members also facing the same issue or not.

from faceswap.

kumaranvpl avatar kumaranvpl commented on April 28, 2024

@ruah1984 @Clorr @lukaville This issue exists for me too. But I am running it in my laptop. And I have all needed files and folders already created

from faceswap.

ruah1984 avatar ruah1984 commented on April 28, 2024

@kumaranvpl , are you using the floydhub??
You can check the forum here if it happen in floydhub
https://forum.floydhub.com/t/data-mounting-problem-cannot-mount-data/591/2.

from faceswap.

kumaranvpl avatar kumaranvpl commented on April 28, 2024

@ruah1984 Nope. I am not using floydhub. I am running it locally. Following is my output

(venv) kumaran@kumaran:~/Projects/faceswap$ python faceswap.py train -A data/trump -B data/obama -m models/obama_trump/ -p
/home/kumaran/Projects/faceswap/venv/lib/python3.6/site-packages/h5py/init.py:36: FutureWarning: Conversion of the second argument of issubdtype from float to np.floating is deprecated. In future, it will be treated as np.float64 == np.dtype(float).type.
from ._conv import register_converters as _register_converters
Using TensorFlow backend.
/home/kumaran/Projects/faceswap/venv/lib/python3.6/importlib/_bootstrap.py:219: RuntimeWarning: compiletime version 3.5 of module 'tensorflow.python.framework.fast_tensor_util' does not match runtime version 3.6
return f(*args, **kwds)
Model A Directory: /home/kumaran/Projects/faceswap/data/trump
Model B Directory: /home/kumaran/Projects/faceswap/data/obama
Training data directory: /home/kumaran/Projects/faceswap/models/obama_trump
Not loading existing training data.
Unable to open file (unable to open file: name = '/home/kumaran/Projects/faceswap/models/obama_trump/encoder.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
Starting, this may take a while...
usage: faceswap.py [-h] {extract,train,convert} ...

positional arguments:
{extract,train,convert}
extract Extract the faces from a pictures.
train This command trains the model for the two faces A and
B.
convert Convert a source image to a new one with the face
swapped.

optional arguments:
-h, --help show this help message and exit
(venv) kumaran@kumaran:~/Projects/faceswap$

from faceswap.

ruah1984 avatar ruah1984 commented on April 28, 2024

not sure is the input and output problem or not. i have this problem previously,but after i put all input and output folder to C:\Users\xxx , it not happen any more.

here is how i run python faceswap
python faceswap.py train -A ~/faceswap/data/faceB -B ~/faceswap/data/faceA -m ~/faceswap/models/ -p.

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.