Comments (24)
@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.
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.
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.
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.
@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.
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.
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.
did you create a folder named output
?
from faceswap.
@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.
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.
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.
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
tofloyd_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.
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.
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.
@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.
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.
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.
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.
Messy issue. Reopen for a specific question if needed
from faceswap.
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.
@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.
@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.
@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.
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)
- Potential Issue in CI Workflow Affecting Code Coverage Accuracy HOT 1
- Error when open GUI after install HOT 1
- Bounding boxes coordinates HOT 1
- DeprecationWarning: 'locale.getdefaultlocale' is deprecated and slated for removal in Python 3.15. Use setlocale(), getencoding() and getlocale() instead HOT 1
- DeprecationWarning: pkg_resources is deprecated as an API. HOT 1
- There are model on project? HOT 2
- あ
- GUI crash when running on Apple Silicon macbook HOT 5
- Is my PC good for face swapping? HOT 1
- [Question] How isolated is the installer HOT 2
- Images found: 439 Faces detected: 0 HOT 1
- TypeError: unsupported operand type(s) for |: 'type' and 'type' HOT 8
- install error HOT 1
- Offline Installer? HOT 1
- windows installer: wrong pillow version installed HOT 2
- -LF option doesn't get carried to the internal tools HOT 1
- L
- inpaint error HOT 1
- just installed new graphic card and it stopped working HOT 1
- exception after few hours of training with villain HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from faceswap.