ovalery16 / swap-face Goto Github PK
View Code? Open in Web Editor NEWTutorial about the swap-face algorithm
License: Mozilla Public License 2.0
Tutorial about the swap-face algorithm
License: Mozilla Public License 2.0
Hello
I'm porting your work over to Colaboratory, but having trouble with the preprocessing function during face extraction.
For some reason, I keep getting the error during the preprocessing process, and the loop terminates prematurely.
Some images do get preprocessed, so I'm not sure what's the problem. Using the Daniel Craig images in your data folder works fine.
"Failed to extract from image: ../content/chris/chris (80).jpg. Reason: list index out of range"
Code below, any advice would be helpful!
EDIT: So I took a closer look, it's definitely certain images that causes system trip. I believe it's due to the face_recognition library, name faces_filter.py. If no face is detected, and hence no encoding, then the resulting array will be null, and hence an exception is thrown. Will update here in due course
`
Hi, when I tried to run the train.ipynb it went wrong! So I edit it in pycharm, it shows this. What can I do to train on new data? Thanks! @OValery16
AttributeError: module 'keras.utils.conv_utils' has no attribute 'normalize_data_format'
Got this error due to unsupported version of Keros and Tensorflow
My version in system is Keros=2.2.2 and Tensorflow=1.13.0
Can you tell me the correct version of both of these
Hi
Ive managed to produce some outputs the results are quite blurry, so I've been trying out MSE instead of MAE. However, I've noticed the weights you given us are from the bond transfer, do you happen to have the original weights for trump to cage or whatnot?
Thank you
Regards
Adrian
Hello, don't know if you are the original author of this tutorial โ if so, thank you for making this so easy to understand for beginners!
Hope you can help me understand the Autoencoder model better:
IMAGE_SHAPE = (64, 64, 3)
ENCODER_DIM = 1024
def Encoder(self):
input_ = Input(shape=IMAGE_SHAPE)
x = input_
x = self.conv(128)(x)
x = self.conv(256)(x)
x = self.conv(512)(x)
x = self.conv(1024)(x)
x = Dense(ENCODER_DIM)(Flatten()(x))
x = Dense(4 * 4 * 1024)(x)
x = Reshape((4, 4, 1024))(x)
x = self.upscale(512)(x)
return KerasModel(input_, x)
def Decoder(self):
input_ = Input(shape=(8, 8, 512))
x = input_
x = self.upscale(256)(x)
x = self.upscale(128)(x)
x = self.upscale(64)(x)
x = Conv2D(3, kernel_size=5, padding='same', activation='sigmoid')(x)
return KerasModel(input_, x)
What would be an efficient way to increase the input image size (128, 192, 256) so that the Decoder is still producing good results? Which values are important โ which should be increased? The filters of the Encoder or Decoder? Simply more convolution layers? Or is the ENCODER_DIM
more important?
Why does the Decoder have this specific input shape? Is it connected to the input image size?
input_ = Input(shape=(8, 8, 512))
Hi ,
I tried face-swapping between Nickolas cage and Donald Trump Dataset but my output of the test script contains a blur grayscale patch over the face detected in trumps faces in the images of my test data. The scripts seem to run and finish without throwing up any errors and I trained the model without any specific error. Can someone help me with the possible reason be behind this happening?
I have uploaded 2/5 output images after performing the execution of prediction scripts
The images used are of size 256X256 while training and testing and I just used the same images( 5 images) for from training data to perform the test.
I used around 375 images for trump faces training and approx 310 for cage training faces. I am stuck at this point and can't proceed further to reach any conclusion
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.