20230622 Update: https://colab.research.google.com/github/dream80/roop_colab/blob/main/roop_v1.ipynb
Talents in the field of AI are emerging one after another, and suddenly a big shot named "s0md3v" has released an open-source project that can perform face swapping in videos with just a single image.
The project homepage provides a very convincing face swapping animation, truly a picture is worth a thousand words.
I quickly set up an environment locally to verify it, and it's indeed quite good. The main advantage is that it's simple and fast, simple and fast, simple and fast! However, setting it up locally requires downloading and configuring a bunch of things, which may still be a bit challenging for ordinary people. Even for those with better hands-on skills, it may still take some time to tinker with it.
In order to save everyone's time and brain cells, I have quickly written another script based on Google Colab. Those who need it can directly use it!
With the power of magic, no local configuration is required, no high-performance computer is needed, just a few clicks of the mouse can complete it.
Below is a brief introduction of how to use it~~
First, open this address:
Single picture, one click, video face swap! Use Colab scripts, no need to burn the graphics card, no need to go to the sauna!
Then click on the ipynb file in the red circle!
Then click "Open in Colab"
After entering the Google Colab platform, click on the script in order. This will complete the entire face swapping process. When you hover over the "parentheses", a clickable "play" button will appear.
You can also find "Runtime" -> "Run all" in the top menu, so you can run it with just one click!
In order to allow everyone to quickly and smoothly experience the fun of face swapping with a single image, I have prepared demonstration pictures and video materials.
After running ①, you can view it in the file manager on the left. If you want to replace the pictures and videos, just replace these two files. After replacing them, click ⑤ again.
If the file is not too large, you can right-click on the roop_colab folder, click "Upload", and find the video file on your computer to upload it.
After successful uploading, delete the original 1.jpg and 2.MP4, replace them with your own uploaded photos and videos, and then run step ⑤ again.
After step ⑤ is completed, a video file named out.mp4 will be generated, which is the result of the face swapping.
In the left file manager, right-click and download it. Download it to your local computer and you can directly view the result.
This demonstration should be easy to understand, right? If not, you can watch a video. Haha!
The script was written quickly and is not perfect, but it can be used normally. It will be improved gradually in the future. The installation tutorial for the local version will be available later, and you can get the latest content through the WeChat public account "托尼不是塔克" or the blog.