Giter VIP home page Giter VIP logo

faceswap-playground's People

Contributors

bryanlyon avatar clorr avatar deepfakes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

faceswap-playground's Issues

Software licensing. GPL, Apache 2/3, CC-0 ?

Expected behavior

Under what license is this software being released? Apache 2 or 3 would work, so would GPL - but having no license makes this a bit difficult.

Actual behavior

The software has no license file, is available publicly and is being improved by people.

Other relevant information

Please license the project under something, so I can use this and expand upon it.

Keep getting errors while converting images

OpenCV Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in cv::resize, file C:\projects\opencv-python\opencv\modules\imgproc\src\imgwarp.cpp, line 3483
Failed to extract from image: C:\Users\Elliot\Envs\faceswap\face-swap\data\trump\112270915.jpg. Reason: C:\projects\opencv-python\opencv\modules\imgproc\src\imgwarp.cpp:3483: error: (-215) ssize.width > 0 && ssize.height > 0 in function cv::resize

Out of memory error

My configuration

OS: ubuntu 17.10
CUDA: 8.0
Tensorflow: 1.4
Nvidia GPU model: GM108M [GeForce 920MX]

While training it results in OOM(out of memory) error.
I tried to reduce my ENCODER_DIM and Encoder conv network to 512. But that is not helping either.
Reducing batch size also doesn't helps.
My gpu has 2gb ram. After system usage it has around 1gb ram available always.
I am using 1000 images for faceA and another 1000 images for faceB
These are my changes


def Encoder():
    input_ = Input(shape=IMAGE_SHAPE)
    x = input_
    x = conv(64)(x)
    x = conv(128)(x)
    x = conv(256)(x)
    x = conv(512)(x)
    x = Dense(ENCODER_DIM)(Flatten()(x))
    x = Dense(4 * 4 * 512)(x)
    x = Reshape((4, 4, 512))(x)
    x = upscale(512)(x)
    return Model(input_, x)

Any suggestions?

How do I adapt an existing model?

From what I can tell, the scripts don't currently support re-using an existing model. Is that true? Any tips on how to add that feature?

Results aren't showing up in the preview window

I'm currently running the training stage with the test data:

(faceswap-cpu) martin@martin-H97-D3H:~/Downloads/faceswap/faceswap$ ./faceswap.py train -A test_data/data/trump/ -B test_data/data/cage/ -m test_models/ -p
Model A Directory: /home/martin/Downloads/faceswap/faceswap/test_data/data/trump
Model B Directory: /home/martin/Downloads/faceswap/faceswap/test_data/data/cage
Training data directory: /home/martin/Downloads/faceswap/faceswap/test_models
Loading data, this may take a while...
Using live preview
Loading Model from Model_Original plugin...
/home/martin/.virtualenvs/faceswap-cpu/lib/python3.5/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.
Failed loading existing training data.
Unable to open file (unable to open file: name = '/home/martin/Downloads/faceswap/faceswap/test_models/encoder.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
Loading Trainer from Model_Original plugin...
Starting. Press "Enter" to stop training and save model
2018-02-05 15:43:34.950140: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
saved model weights loss_A: 0.20709, loss_B: 0.20315
[15:53:02] [#00011] loss_A: 0.17902, loss_B: 0.19046

and the preview window is showing, but where I expect the conversions to be are blank:

selection_001

Any ideas?

opencv error. where should I put the picture?

OpenCV Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in cv::resize, file C:\projects\opencv-python\opencv\modules\imgproc\src\resize.cpp, line 4044
Failed to extract from image: input\a.jpg. Reason: C:\projects\opencv-python\opencv\modules\imgproc\src\resize.cpp:4044: error: (-215) ssize.width > 0 && ssize.height > 0 in function cv::resize

I put an image in: input\a.jpg
here is my source dir:

2017/12/29  23:10    <DIR>          .
2017/12/29  23:10    <DIR>          ..
2017/12/29  08:52                19 .dockerignore
2017/12/29  08:52    <DIR>          .github
2017/12/29  08:52                67 .gitignore
2017/12/29  08:52    <DIR>          contrib
2017/12/29  21:35    <DIR>          data
2017/12/29  08:52               600 Dockerfile
2017/12/29  08:52               734 faceswap.py
2017/12/29  21:43    <DIR>          input
2017/12/29  08:52             5,740 INSTALL.md
2017/12/29  21:44    <DIR>          lib
2017/12/29  21:35    <DIR>          models
2017/12/29  22:33    <DIR>          output
2017/12/29  08:52             5,432 README.md
2017/12/29  08:52               134 requirements-gpu.txt
2017/12/29  08:52               130 requirements.txt
2017/12/29  21:43    <DIR>          scripts
2017/12/29  08:52             5,885 USAGE.md

[del]

FakeApp uses GPU and extract more angles with less artefacts.

Can you make same with faceswap?

Original vs GAN

There is not much explanation in the documentation that I can find.

In what situations should we be using -t Original and what situations would it be preferred to use -t GAN? Are there things one is better than the other at?

Welcome new collabs !

Hi,

If you are @mentionned here, it means you have been proposed to be a new collaborator on faceswap-playground

Github/faceswap is split into 3 projects:

  • faceswap-playground for user help and usage improvments
  • faceswap is the main code repo
  • faceswap-model is to discuss more technical points about the faces generation

Being a collaborator on a repo means you can do mostly anything in it, so use with care!

Regular users and first time contributors will be welcomed in faceswap-playground so that they can freely help newcomers, and discuss/propose on faceswap usage. Of course, it is about command line usage, but also about new solutions for a user-friendlier way of releasing faceswap.

Another important part is about sharing models and content. On this part, you can freely propose ways of sharing content (FTPs, Torrents...). However, note that you must NEVER EVER share genuine/copyrighted content here!

Have fun, and don't hesitate to discuss here between collabs!

convert.py script failing: Reason: basic_filebuf::underflow error reading the file: iostream error

Hello guys,

I'm trying to run the convert.py script and I'm not 100% sure on how it works. I did the following steps 👍

  • Gatherd pictures from two person.

  • Extracted their faces

  • Trained the model using the train.py script

  • Executed the following python convert.py -i ~/Téléchargements/faceswap-data/source-images/lawrence/ -o ~/Téléchargements/faceswap-data/result/

The input directory I used contained full picture (not cropped) of person A. Is it how I should use it ?

I got the following error :

Failed to extract from image: /home/edouard/Téléchargements/faceswap-data/source-images/lawrence/109.jpg. Reason: basic_filebuf::underflow error reading the file: iostream error

How to install ?

Note: Installation requires a bit of knowledge. Project is a work in progress, and people able to help are welcomed to.

Without Docker

  • First install Python and Pip (Google is your friend).
  • Install requirements. You can do so with pip3 --no-cache-dir install -r ./requirements.txt (pip3 for Python3 users, otherwise use pip)
  • If it doesn't work or if you miss dependencies. You can look at the Dockerfile that may help you find out which dependecy is missing

With Docker

  • Go to the code folder
  • Run docker build -t deepfakes .
  • Once finished, you can start docker run --rm --name deepfakes -v [path_to_your_folder]:/srv -it deepfakes bash
  • Once it starts, you will have a prompt, and be able to run the commands

Note: This is for a CPU run.
If you want to use GPU, install outside Docker, and use requirements-gpu.txt
If you want to use Docker with GPU support, it is possible, but only for advanced users, so I assume you are advanced enough to find out how ;-)

How do I start ? What to do with sample data ?

From 0 to hero in 30s

(I assume you have installed everything)
Copy the sample data in the same folder as the code
Create an output folder
Run convert_trump_cage.py and Voila!

Main usage

The purpose of the project is to convert photos with a different face.
It is done by running convert_photos.py which will take your photos from original folder, modify it with the model in models, and put then in modified folder

The standard models convert faces into Nicolas Cage generated faces. If you want to create your own models, here is an overview of how to do.

Gather photos of a first person. Put them in src folder. Run extract.py. You will see faces in the extract folder. Then do it for a second person.

Put those in data/trump (person to be converted) and data/cage (person to apply on photo). Run train.py. It will put the new models in the models folder.

Once done, you can convert your photos as stated above.

Note: folder structure is subject to change. Please have a look at the code if you have trouble.

Converted faceswap looks really different from training preview (Beginner)

New to deep learning and programming in general (couple months of basic programming knowledge), so my perspective is limited and I'm learning as I go. But I'm trying to understand what's going on in this case:

I have a fairly well trained model (16-20+ hours on a 980ti with 5.2 compute capability), from the preview window the results are visually satisfactory I think: https://i.imgur.com/uYoHRS6.png . Maybe the images are cropped too closely to the face? I used the extract script from this project without modifying anything.

But when I run faceswap convert, the image that is created is noticeably lower quality: https://i.imgur.com/1FcgV9V.png

Furthermore, I'm also curious about why the converted area in the image is seemingly so small, as I roughly highlighted here: https://i.imgur.com/6uhzcQ9.png

My knowledge is very limited, but I imagine this is not a simple issue if it isn't already fixed. I'm not asking for a tutorial, but maybe some pointers in the right direction, about what affects the size of the converted area on a detected face, which parameters to play with, etc.

Share your experience!

Please provide feedback so that later coming user can find how you did and what result you obtained

Can't get faceswap to use my GPU (Windows 10)

I installed everything as instructed (using requirements-gpu.txt) and I am able to successfully extract my images, but only using my CPU and not my GPU. I know this because the windows task manager shows that powershell is using 50% of my CPU but 0% of my GPU. Any idea how to get faceswap to use my GPU?

pip freeze output:

bleach==1.5.0
click==6.7
decorator==4.2.1
dlib==19.9.0
enum34==1.1.6
face-recognition==1.2.1
face-recognition-models==0.3.0
h5py==2.7.1
html5lib==0.9999999
Keras==2.1.2
Markdown==2.6.11
networkx==2.1
numpy==1.14.0
opencv-python==3.3.0.10
pathlib==1.0.1
Pillow==5.0.0
protobuf==3.5.1
PyWavelets==0.5.2
PyYAML==3.12
scandir==1.6
scikit-image==0.13.1
scipy==1.0.0
six==1.11.0
tensorflow-gpu==1.4.0
tensorflow-tensorboard==0.4.0
tqdm==4.19.5
Werkzeug==0.14.1

check_skip?

Hi!

After the latest commits I get this:

Failed to convert image: /daten/test/fs-data/Source/2fake/529.png. Reason: 'ConvertImage' object has no attribute 'check_skip'

Ubuntu 16.04
Python 3.5.2

All requirements installed and the same conversion worked 2 days ago.

python3 ./faceswap.py convert -i ../fs-data/Source/2fake/ -o ../fs-data/Output/faked/ -m ../fs-data/Models/A-S -s -sm

Trying to run faceswap.py to extract faces, receiving 'No module named *' errors

I'm trying to run the python faceswap.py command.

No matter what I do, I am returned with an error that says 'ModuleNotFoundError: No module named 'tqdm'.

I had been receiving different errors. First it said No moduel named 'lib'. I noticed in my Faceswap directory that the directory was Lib, so I changed its case (unsure if this would have any effect) to lib. That error then went away, oddly enough. But now I receive this error and am unsure how to proceed.

I'm Windows 7 x64, running Python 3.6

Problem "Resource exhausted: OOM when allocating tensor"

From @yappica on December 28, 2017 22:27

Hi, I tested the train in using CPU, all work fin. There was the preview window. And it saved the train date in the models.
But when I changed to train on GPU, there was no preview window. It finished the train in 2 minute. Also there was no train date in the models directory.
I don't know what happened, maybe the video card I used.
I use a GTX 660 support CUDA 3.0.
Any help for it? Thank you.

Those are screenshot when using GPU for train.
Resource exhausted: OOM when allocating tensor with shape[3, 3, 128, 256]

  • Operating system and version: Windows10
  • Python version: 3.6.4
  • Faceswap version: the least
  • Faceswap method: GPU with GTX660 installed cuda toolkit 8.0

Copied from original issue: deepfakes/faceswap#40

Illegal hardware instruction

Archlinux 4.15.2
Python 3.6.4
Faceswap commit 20753a6

When running any command with "python faceswap.py" it fails to run and errors out "illegal hardware instruction" and fails to launch. All deps have been installed via pip.
Found this in dmesg.
python[24460] trap invalid opcode ip:7fb4d67981ad sp:7ffd16de66c0 error:0 in dlib.cpython-36m-x86_64-linux-gnu.so[7fb4d6309000+5c5000]

CNN extractor problem

With CNN extractor I'm getting more faces angles but the zoom and alignement are not consistent.

This hand-made image is an example of some different extractions I get (forget the white background and focus on the faces):

image

In a video of a frontal face I can get the first type of extraction for X frames but then suddenly I start to get zoomed in frames. Many of them are also not properly aligned and look like the images 4 and 5.

Is this good for training? Should I just use the hog extractor for now?

Adding Rotation with Bounding to increase Likelihood of Face Being Found

FIRST: love the work, awesome job!
SECOND A SUGGESTION:
Currently the angle of a face often messes with the face detection of dlib
is it possible to add a condition such that if a face is not found, rotate the image by a certain degree within a bounded box ( so as not to cut out the image ) and running through the dlib face detection? It might take longer to extract and convert, but at least it will be automatic. If a face is found during the process, run it through the model ( or extraction process ) then re-rotate and output the extracted or converted face. To increase efficiency, maybe remember the last degree of rotation used since movement between frames might not change as much.

about convert

112270915

461642204

when i cmd "python faceswap.py convert -i ~/faceswap/photo/trump/ -o ~/faceswap/output/ -m ~/faceswap/models/" , the imgs has "mosaic"

without swapped cage

What should I do?

thank you

Please Help With This Error

Mac OS High Sierra
Mac: 10.13.2
Python 3.6.3 :: Anaconda custom (64-bit)
Using CPU
Processor: 2.2 GHz Intel Core i7
Memory: 16 GB 1600 MHz DDR3

Main Issue: IndexError

This is for training the faces

I've been using this guide as a reference:

[Outdated link removed]

But got stuck on the part where it says

"python faceswap.py train -A src_faces -B jessica_faces -m model -p".

The Error:

MY NAME-MacBook-Pro-2:faceswap MY NAME$ python faceswap.py train -A vid_faces -B Celeb_faces -m model -p
Model A Directory: /Volumes/My Passport/DeepFakes/faceswap/Vid_faces
Model B Directory: /Volumes/My Passport/DeepFakes/faceswap/Celeb_faces
Training data directory: /Volumes/My Passport/DeepFakes/faceswap/model
Loading data, this may take a while...
Using live preview
Loading Model from Model_Original plugin...
/Users/MY NAME/anaconda3/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.
loaded model weights
Loading Trainer from Model_Original plugin...
Starting. Press "Enter" to stop training and save model
Exception in thread Thread-2:
Traceback (most recent call last):
File “/Users/MY NAME/anaconda3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/Volumes/My Passport/DeepFakes/faceswap/lib/utils.py", line 42, in run
for item in self.generator:
File "/Volumes/My Passport/DeepFakes/faceswap/lib/training_data.py", line 43, in minibatch
rtn = numpy.float32([read_image(data[j]) for j in range(i,i+size)])
File "/Volumes/My Passport/DeepFakes/faceswap/lib/training_data.py", line 43, in
rtn = numpy.float32([read_image(data[j]) for j in range(i,i+size)])
IndexError: list index out of range

encoder.h5

After the model training, we got three models,I want to know the function of encoder.h5。can anyone tell me?Thanks

Green dots on GAN's preview images

I just started training with GAN -not GAN-128- from @Clorr's repo. Got this issue. Will it be gone with more training or is it a bug?

Expected behavior

See the pictures on preview windows without green dots on them.

Actual behavior

Masked preview window:
a

Other relevant information

  • Operating system and version: Windows 10
  • Python version: 3.6.3
  • Faceswap version: 3688c55
  • Faceswap method: GPU

Error when launching train

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$

Failed loading existing training data

I ran the extract and trained for a while, but when I go to convert the images, I end up getting this error:
Failed loading existing training data.
You are trying to load a weight file containing 6 layers into a model with 7 layers.
Model Not Found! A valid model must be provided to continue!

This is what I used to train:
faceswap.py train -A data/extracted -B data/trump -bs 64 -t LowMem -w -s 1 -p -m data/model
This is what I used for convert:
faceswap.py convert -i data/okb -o modeltest -m data/model

Am I doing something wrong? I tested this with the trump/cage data and it worked fine with no error.

Suggestions please to improve!

image

This is what I am getting after training my models for around 32 hours!
Also how can I remove this blur square/rectangle frame?

'all_images' referenced before assignment and could not broadcast

I just get to the training using python train.py command and I got:
Traceback (most recent call last): File "train.py", line 26, in <module> images_A = load_images( images_A ) / 255.0 File "C:\Users\remi_\faceswap\utils.py", line 16, in load_images return all_images UnboundLocalError: local variable 'all_images' referenced before assignment
Adding "all_images = 0" before the loop I then got this error
Traceback (most recent call last): File "train.py", line 27, in <module> images_B = load_images( images_B ) / 255.0 File "C:\Users\ramo_\faceswap\utils.py", line 17, in load_images all_images[i] = image ValueError: could not broadcast input array from shape (795,793,3) into shape (630,626,3)

Ubuntu 14 install error

Any ideas? Thanks:)
(faceswap_env) paperspace@psy21ytam:~/Desktop/SOFTWARE/faceswap-master$ python faceswap.py -hTraceback (most recent call last):
File "faceswap.py", line 10, in
from scripts.extract import ExtractTrainingData
File "/home/paperspace/Desktop/SOFTWARE/faceswap-master/scripts/extract.py", line 4, in
from lib.cli import DirectoryProcessor
File "/home/paperspace/Desktop/SOFTWARE/faceswap-master/lib/cli.py", line 7, in
from lib.FaceFilter import FaceFilter
File "/home/paperspace/Desktop/SOFTWARE/faceswap-master/lib/FaceFilter.py", line 3, in
import face_recognition
File "/home/paperspace/faceswap_env/lib/python3.4/site-packages/face_recognition/init.py", line 7, in
from .api import load_image_file, face_locations, batch_face_locations, face_landmarks, face_encodings, compare_faces, face_distance
File "/home/paperspace/faceswap_env/lib/python3.4/site-packages/face_recognition/api.py", line 4, in
import dlib
ImportError: /home/paperspace/faceswap_env/lib/python3.4/site-packages/dlib.cpython-34m.so: undefined symbol: dgeqrf_

How long does a it take to train a model?

Mine's been running for about 2 hours maxing out my dual 12GB 1080 Tis - does this finish on its own? Or should i be stopping it when I think it's "done enough"?

If i have to stop it manually i might amend the project README so it's obvious

How to determine - GPU or CPU is used?

Hello.

During the installation, I made a mistake and first started:

pip install -r requirements.txt

After that I run:

pip install -r requirements-gpu.txt

When I start training, I have such messages:

...
Model A Directory: /Volumes/HDD/faceswap/source_faces
Model B Directory: /Volumes/HDD/faceswap/target_faces
Training data directory: /Volumes/HDD/faceswap/model
2018-01-31 03:37:14.842407: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.2 AVX AVX2 FMA
Starting, this may take a while...
press "q" to stop training and save model

I'm confused by this line:

2018-01-31 03:37:14.842407: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.2 AVX AVX2

Does this mean that the training was started using the CPU?

Before trying to install this REPO...

I already have installed all the things from this guide: https://www.reddit.com/r/deepfakes/comments/7nq173/v2_tutorial_intelbased_python_easy_to_follow/ this was when there didn't exist the APP.

Also i have CMAKE (cmake-gui), cuda 8, PYTHON 3.6.3 (ANACONDA3 5.0.1 64-BITS).

https://i.imgur.com/jmlqxgp.jpg

But i really want to try this repo. (i know i will need to do most of the things VIA CMD commands).

I'm not a programmer or anything, so i want to know if i foloow the installation instructions for this REPO, it will not fuck UP my other installation right?

For what i read if i do it trough Virtualenv (i suppouse it's like a virtual environment):

Windows specific:

virtualenvwrapper-win is a package that makes virtualenvs easier to manage on Windows.

pip install virtualenvwrapper-win

Everything will be downloaded/installed there without messing with other installations, i'm right?

Also if i can't do it, someone could help me VIA TEAMVIEWER to install it?

thx in advance!

Converting Error Help Please

Mac OS High Sierra
Mac: 10.13.2
Python 3.6.3 :: Anaconda custom (64-bit)
Using CPU
Processor: 2.2 GHz Intel Core i7
Memory: 16 GB 1600 MHz DDR3

Main Issue: "'NoneType' object is not iterable"

WHAT IT SAYS IN TERMINAL:

MY NAME-MBP-2:faceswap MY NAME$ python faceswap.py convert -i vid -o output -m model
Input Directory: /Volumes/My Passport/DeepFakes/faceswap/vid
Output Directory: /Volumes/My Passport/DeepFakes/faceswap/output
Starting, this may take a while...
Loading Model from Model_Original plugin...
/Users/MY NAME/anaconda3/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.
/Users/MY NAME/anaconda3/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)
2018-02-11 20:16:59.539510: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
loaded model weights
Loading Convert from Convert_Masked plugin...
0%| | 0/952 [00:00<?, ?it/s]Failed to convert image: /Volumes/My Passport/DeepFakes/faceswap/vid/vid 1.png. Reason: 'NoneType' object is not iterable


I have 952 video images and they all say:
"Failed to convert image: /Volumes/My Passport/DeepFakes/faceswap/vid/vid.png. Reason: 'NoneType' object is not iterable

Hope it's not too complicated and thanks in advance!

Running setup.py install for dlib ... error

when I run this command:

pip3 install -r requirements.txt

I got this error:

Installing collected packages: dlib, Click, face-recognition-models, face-recognition, tqdm
  Running setup.py install for dlib ... error
    Complete output from command /usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-wppnuye6/dlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-6t5vsick-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    package init file 'dlib/__init__.py' not found (or not a regular file)
    running build_ext
    Invoking CMake setup: 'cmake /private/tmp/pip-build-wppnuye6/dlib/tools/python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/private/tmp/pip-build-wppnuye6/dlib/build/lib.macosx-10.13-x86_64-3.6 -DPYTHON_EXECUTABLE=/usr/local/opt/python3/bin/python3.6 -DCMAKE_BUILD_TYPE=Release'
    error: [Errno 2] No such file or directory: 'cmake': 'cmake'
    
    ----------------------------------------
Command "/usr/local/opt/python3/bin/python3.6 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-build-wppnuye6/dlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-6t5vsick-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-build-wppnuye6/dlib/

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.