SimSwap
SimSwap copied to clipboard
GUI for SimSwap
I've written a very, very simple GUI "Swap only one face within the video" (test_video_swapsingle.py) (No video or image preview, no extra parameters I've added for my local setup)
If you want to try, here's the download link: https://drive.google.com/file/d/1jC30wY7_rQqXhNPxrYg6WKU-kubQsCVg/view?usp=sharing
Hope it can help you.
Ok. I've made some changes so you can also use it to swap a specific face... You have to enter a frame number to be shown as preview of your input video. The you can select the face to be replaced by drawing a rectangle around it. No need to prepare a second image.
This uses a slightly modified script test_video_swapspecific_instant.py which is included in the download package. View readme.txt
v.0.2 https://drive.google.com/file/d/1Q724vnjAE1hagnpfnUHRVBRoKEIX-bHQ/view?usp=sharing
I tried this on Windows 8.1 x64. Unfortunately when I try registering the OCX file it gives an error that says "the module may not be compatible with the version of Windows that you're running". Then when trying to run the GUI it says "component OCX...not correctly registered".
If anyone knows a workaround please let me know.
Sorry. That seems to be a bigger problem. I've tried to make a real setup.exe for it on old winXP.....but that also did not work. Maybe you try to find a "version" of VB6 IDE and install it, ignoring all error messages. (VB6 no more supported since 1999 or so but still working for me)
https://youtube.com/user/heinzelmann1963
Having same issue but on windows 11. I can not seem to register the ocx file with command prompt.
Same issue for me on Windows 10.
Ok. I've searched the internet and found this page:
http://schierlm.users.sourceforge.net/mschierlm/smsoft/runtime.htm
You can download some VB6 runtime files. (There's no date written on the page. last update seems to be 2002) Maybe it can help you to solve the problem running VB6 SimSwap GUI.
vbrun600.exe = runtime files vbrun60sp5.exe = runtime files latest service pack 5 (vbcont60.zip contains a registry file for COMDLG32.OCX and Mscomctl.ocx if regsvr command does not work)
Use at your own risk, I can't test it because for me VB6 is working
Please report if it made SimSwap GUI work for you. i've made a small update for video specific which I would share....
GUI version for SimSwap-HQ ONLY! No additional parameters, input prompt for frame number for selecting the face to be swapped in "video swap specific"
https://drive.google.com/file/d/1lKGMKhoe5ek7mGCUaBzUpw2Vp2qcRUz4/view?usp=sharing
GUI version for SimSwap-HQ ONLY! No additional parameters, input prompt for frame number for selecting the face to be swapped in "video swap specific"
https://drive.google.com/file/d/1lKGMKhoe5ek7mGCUaBzUpw2Vp2qcRUz4/view?usp=sharing
Thank you so much for creating this new GUI.
In regards to the previous problem with the OCX file...even after upgrading from Windows 8.1 x64 to Windows 10 x64, I was still getting errors registering the file.
But then I tried the "vbcont60.zip" solution you posted above. Copying those files to the folder indicated in the registry file...then executing it solved the problem.
By the way, the other two VB installers provided did not work - only the registry file solution worked.
Also a suggestion for future... I don't see any method to swap "multi faces" using GUI. Can this be supported in the future?
Thank you for your reply. So the registry file made it.
I've never used the multi-face. Do you mean the GUI should be able to open all images? How many, I think max. number of faces is 8 ? And 8 faces from the video ?
Hi sorry for late response. I was referring to "Swap multi specific face with multi specific id within the video" that is explained in the usage wiki: https://github.com/neuralchen/SimSwap/blob/main/docs/guidance/usage.md
Basically, this is the option to use when the video has multiple characters...and you want to associate a unique face to each character.
For example, video has Batman and Superman. In GUI you select Batman as one character to be edited, then you select Superman as another. Then we set the new face "John" to be Batman and the new face "Jim" to be Superman.
Currently I don't see a way to do this via the GUI.
Having nearly finished another faceswap project I'm back to SimSwap with a new GUI for test_video_swapspecific HQ
Written in python to avoid problems with VB6... Additionally needs TKinter to be installed.
I've merged test_video_swapspecific.py + reverse2original.py + videoswap_specific.py to a single script. No need to replace the original files.
It let's you select a face from an image with multiple faces and the face to be replaced in the video by using the mouse. Cropsize, Detsize and use mask can be set. Video preview while running
During inference the GUI window will close but come back on screen when finished.
Please let me know if you are interested to test it.
Having nearly finished another faceswap project I'm back to SimSwap with a new GUI for test_video_swapspecific HQ
Written in python to avoid problems with VB6... Additionally needs TKinter to be installed.
I've merged test_video_swapspecific.py + reverse2original.py + videoswap_specific.py to a single script. No need to replace the original files.
It let's you select a face from an image with multiple faces and the face to be replaced in the video by using the mouse. Cropsize, Detsize and use mask can be set. Video preview while running
During inference the GUI window will close but come back on screen when finished.
Please let me know if you are interested to test it.
Thank you so much for adding these advanced features! I would be very interested in trying it. Please let me know when installer is available. I have Windows 10 x64.
I've made an upload to google drive. https://drive.google.com/file/d/1qBfP3tkC_Ejb7d7acxZAib5fqT9uL5BW/view?usp=sharing
Make sure your SimSwap is working. Install Tkinter if not already done. Just unzip the files and copy the two python scripts (single and/or specific) to your SimSwap root directory. Read the "readme.txt"
EDIT: I can't test it on another computer but it's working for me corrected wrong link
what is detsize, having a hard time finding literature on this, amateur here.
Detection size Works in most cases. Makes it a bit faster
Having nearly finished another faceswap project I'm back to SimSwap with a new GUI for test_video_swapspecific HQ Written in python to avoid problems with VB6... Additionally needs TKinter to be installed. I've merged test_video_swapspecific.py + reverse2original.py + videoswap_specific.py to a single script. No need to replace the original files. It let's you select a face from an image with multiple faces and the face to be replaced in the video by using the mouse. Cropsize, Detsize and use mask can be set. Video preview while running During inference the GUI window will close but come back on screen when finished. Please let me know if you are interested to test it.
Thank you so much for adding these advanced features! I would be very interested in trying it. Please let me know when installer is available. I have Windows 10 x64.
Hi,
I am finding difficulty in installing TKinter in Windows 10 64 bit. I am getting this error. My python is 3.9 version.
"(base) C:\WINDOWS\system32>python --version Python 3.9.7
(base) C:\WINDOWS\system32>pip -V pip 21.2.4 from C:\Users\vkark\anaconda3\lib\site-packages\pip (python 3.9)
(base) C:\WINDOWS\system32>pip install tkinter ERROR: Could not find a version that satisfies the requirement tkinter (from versions: none) ERROR: No matching distribution found for tkinter"
Can you pls Assist me.
Thank You
If you're using anaconda >= 3.7 Tkinter should be already installed. If you are running simswap in an environment activate your environment and try to install Tkinter.
I cant't remember if I had to install Tkinter or if it was already configured...
If you're using anaconda >= 3.7 Tkinter should be already installed. If you are running simswap in an environment activate your environment and try to install Tkinter.
I cant't remember if I had to install Tkinter or if it was already configured...
Thank You Sir I tried as you said, but still getting error. A Big Thank You to you for your quick reply, as I have zero knowledge with python so this must have been difficult to install from my side.
Have A Wonderful Day Sir :) Thank You
Please make this open source. It makes no sense for the GUI to be distributed as a pre-compiled binary, when the original code is open source.
The source code is no secret, but I think there is no use pulishing it because you need the old Visual Basic 6 IDE to compile or run it. Try the Tkinter version instead. I have a new version of it, some bug fixes and new options. Also a bit faster. Maybe I will upload it as soon as I've made a new video for YT
I know, it looks a bit like a competition, but you can try my UI on .NET for Windows: https://github.com/SerZhyAle/reface
Thanks. I don't want a competion. ;-) My own versions I'm using have much more options like eg. cut-in cut-out, face enhancement/restoration...
Regards