mapooon / blendface Goto Github PK
View Code? Open in Web Editor NEW[ICCV 2023] BlendFace: Re-designing Identity Encoders for Face-Swapping https://arxiv.org/abs/2307.10854
License: Other
[ICCV 2023] BlendFace: Re-designing Identity Encoders for Face-Swapping https://arxiv.org/abs/2307.10854
License: Other
I want to know the code for computing 'Identity Distance' and 'Attribute Distance.'
Thank you.
Hello author, thank you for your sharing, can the proposed encoder be applied to StyleGAN?
Figure 9 in your paper visualizes the images of ArcFace and BleedFace. If convenient, could you please provide some details? I really appreciate my interest in this aspect, thank you!
The swap result of this model is not good.
The similarity of the source face with the swapped face is very poor.
Note that-> I have used proper alignment methods as mentioned in this repository.
I will upload the similarity matrix and result later.
Hi, great work! I wanna know whether you will release the whole model(BlendFace + face-swapping model).
@mapooon
Thank you for your work.
I have been testing out your face swap model and the results seems to be quite bad.
steps taken:
Any advice on how to make it work properly?
Hello author, thank you for your excellent work and code sharing, I have a question, how to use this docker, how to place the source data and target data in the workspace directory, and which file to run to change the face
great work but where face swap code
Is there a specific size requirement for the source and target images? I successfully swapped faces using the provided source (112x112) and target (256x256). However, when I resized the source image from 112x112 to 256x256, an error occurred.
I have no name!@cbf99791397b:/workspace/swapping$ python3 inference.py -w /workspace/checkpoints/blendswap.pth -s examples/source.png -t examples/target.png -o examples/output.png
Traceback (most recent call last):
File "/workspace/swapping/inference.py", line 31, in <module>
output = model(target_img, source_img)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/workspace/swapping/blendswap.py", line 60, in forward
z_id = self.Z_e(source_img)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/container.py", line 204, in forward
input = module(input)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/workspace/swapping/model/iresnet.py", line 151, in forward
x = self.fc(x.float() if self.fp16 else x)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1194, in _call_impl
return forward_call(*input, **kwargs)
File "/opt/conda/lib/python3.10/site-packages/torch/nn/modules/linear.py", line 114, in forward
return F.linear(input, self.weight, self.bias)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (1x131072 and 25088x512)
Hi @mapooon , thanks for your work! May I know how to align the images? Whether it same with the arcface do as usual?
I notice that the result depends on how well the face is aligned, there is some script to align faces, it would be nice to be able to swap faces when the faces are not aligned
self.Decoder_inchannel = [1024, 2048, 1024, 512, 256, 128]
self.Decoder_outchannel = [1024, 512, 256, 128, 64, 32]
self.Decoder = nn.ModuleDict({f'layer_{i}' : nn.Sequential(
nn.ConvTranspose2d(self.Decoder_inchannel[i], self.Decoder_outchannel[i], kernel_size=4, stride=2, padding=1),
nn.BatchNorm2d(self.Decoder_outchannel[i]),
nn.LeakyReLU(0.1)
)for i in range(6)})
self.Decoder_inchannel1 is not equal to self.Decoder_outchannel0.is there a problem here
i think there is an issue with setting the number of channels.
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.