Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swapping between two images. #17

Open
AIdeveloper-oz opened this issue Jul 8, 2020 · 4 comments
Open

Swapping between two images. #17

AIdeveloper-oz opened this issue Jul 8, 2020 · 4 comments

Comments

@AIdeveloper-oz
Copy link

Hi, I am a great fan for this kinda works and my appreciations to you. On analyzing the code, I get to know that, you swap face from an image to the face in a video feed. I have seen image to image face swapping using 68/81 facial keypoints. The results of your work seem to be better than keypoint based method. Is there any implementation of segmentation based swapping between images? Help, if you could.
Thanks.

@AliaksandrSiarohin
Copy link
Owner

What do you mean a segmentation based swapping? This work uses segmentation.

@AIdeveloper-oz
Copy link
Author

AIdeveloper-oz commented Jul 9, 2020

Yeah, I am aware of that. I referred **Segmentation based swapping ** to your work only. I found you are doing it between videos, where frames are played with. I simply wanted to try this between two images. (src image, target image -> segmentation->copy the src mask on target image). Maybe this is simple and I am a new bee. Help, if you could.
Thanks.

@AliaksandrSiarohin
Copy link
Owner

You can just use a single frame video, this will be effectively an image base swap.

@instant-high
Copy link

You can also use a *.gif as target_video (instead of *.mp4) and as result_video use also *.gif

Then you have to change the following lines in part_swap.py

(241) fps = reader.get_meta_data()['fps']
--> #fps = reader.get_meta_data()['fps']

(244) imageio.mimsave(opt.result_video, [img_as_ubyte(frame) for frame in predictions], fps=fps, bitrate=bitrate)
-->imageio.mimsave(opt.result_video, [img_as_ubyte(frame) for frame in predictions])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants