[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-71176":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":23,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":34,"readmeContent":35,"aiSummary":36,"trendingCount":16,"starSnapshotCount":16,"syncStatus":17,"lastSyncTime":37,"discoverSource":38},71176,"SimSwap","neuralchen\u002FSimSwap","neuralchen","An arbitrary face-swapping framework on images and videos with one single trained model!","",null,"Python",5180,1008,83,288,0,2,10,40.01,"Other",false,"main",true,[25,26,27,28,29,30,31,32,33],"deepfacelab","deepfakes","face","faceswap","gan","image-manipulation","pytorch","swap","video","2026-06-12 02:02:48","# SimSwap: An Efficient Framework For High Fidelity Face Swapping\n## Proceedings of the 28th ACM International Conference on Multimedia\n**The official repository with Pytorch**\n\n**Our method can realize **arbitrary face swapping** on images and videos with **one single trained model**.**\n\n***We are recruiting full-time engineers. If you are interested, please send an [email](mailto:chen19910528@sjtu.edu.cn?subject=[GitHub]%20Source%20Han%20Sans) to my team. Please refer to the website for specific recruitment conditions: [Requirements](https:\u002F\u002Fjoin.sjtu.edu.cn\u002FAdmin\u002FQsPreview.aspx?qsid=44f5413a90974114b8f5e643177ef32d)***\n\nTraining and test code are now available!\n[ \u003Ca href=\"https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fneuralchen\u002FSimSwap\u002Fblob\u002Fmain\u002Ftrain.ipynb\">\u003Cimg src=\"https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\" alt=\"google colab logo\">\u003C\u002Fa>](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fneuralchen\u002FSimSwap\u002Fblob\u002Fmain\u002Ftrain.ipynb)\n\nWe are working with our incoming paper SimSwap++, keeping expecting!\n\nThe high resolution version of ***SimSwap-HQ*** is supported!\n\n[![simswaplogo](\u002Fdocs\u002Fimg\u002Flogo1.png)](https:\u002F\u002Fgithub.com\u002Fneuralchen\u002FSimSwap)\n\nOur paper can be downloaded from [[Arxiv]](https:\u002F\u002Farxiv.org\u002Fpdf\u002F2106.06340v1.pdf) [[ACM DOI]](https:\u002F\u002Fdl.acm.org\u002Fdoi\u002F10.1145\u002F3394171.3413630)\n\n\n### This project also received support from [SocialBook](https:\u002F\u002Fsocialbook.io).\n\u003C!-- [![logo](.\u002Fsimswaplogo\u002Fsocialbook_logo.2020.357eed90add7705e54a8.svg)](https:\u002F\u002Fsocialbook.io) -->\n\u003Cimg width=30% src=\".\u002Fsimswaplogo\u002Fsocialbook_logo.2020.357eed90add7705e54a8.svg\"\u002F>\n\n\u003C!-- [[Google Drive]](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1fcfWOGt1mkBo7F0gXVKitf8GJMAXQxZD\u002Fview?usp=sharing) \n[[Baidu Drive ]](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1-TKFuycRNUKut8hn4IimvA) Password: ```ummt``` -->\n\n## Attention\n***This project is for technical and academic use only. Please do not apply it to illegal and unethical scenarios.***\n\n***In the event of violation of the legal and ethical requirements of the user's country or region, this code repository is exempt from liability***\n\n***Please do not ignore the content at the end of this README!***\n\nIf you find this project useful, please star it. It is the greatest appreciation of our work.\n\n## Top News \u003Cimg width=8% src=\".\u002Fdocs\u002Fimg\u002Fnew.gif\"\u002F>\n\n**`2023-09-26`**: We fixed bugs in colab!\n\n**`2023-04-25`**: We fixed the \"AttributeError: 'SGD' object has no attribute 'defaults' now\" bug. If you have already downloaded **arcface_checkpoint.tar**, please **download it again**. Also, you also need to update the scripts in ```.\u002Fmodels\u002F```.\n\n**`2022-04-21`**: For resource limited users, we provide the cropped VGGFace2-224 dataset [[Google Driver] VGGFace2-224 (10.8G)](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F19pWvdEHS-CEG6tW3PdxdtZ5QEymVjImc\u002Fview?usp=sharing) [[Baidu Driver]](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1OiwLJHVBSYB4AY2vEcfN0A) [Password: lrod].\n\n**`2022-04-20`**: Training scripts are now available. We highly recommend that you guys train the simswap model with our released high quality dataset [VGGFace2-HQ](https:\u002F\u002Fgithub.com\u002FNNNNAI\u002FVGGFace2-HQ).\n\n**`2021-11-24`**: We have trained a beta version of ***SimSwap-HQ*** on [VGGFace2-HQ](https:\u002F\u002Fgithub.com\u002FNNNNAI\u002FVGGFace2-HQ) and open sourced the checkpoint of this model (if you think the Simswap 512 is cool, please star our  [VGGFace2-HQ](https:\u002F\u002Fgithub.com\u002FNNNNAI\u002FVGGFace2-HQ) repo). Please don’t forget to go to [Preparation](.\u002Fdocs\u002Fguidance\u002Fpreparation.md) and [Inference for image or video face swapping](.\u002Fdocs\u002Fguidance\u002Fusage.md) to check the latest set up.\n\n**`2021-11-23`**: The google drive link of [VGGFace2-HQ](https:\u002F\u002Fgithub.com\u002FNNNNAI\u002FVGGFace2-HQ) is released. \n\n**`2021-11-17`**: We released a high resolution face dataset [VGGFace2-HQ](https:\u002F\u002Fgithub.com\u002FNNNNAI\u002FVGGFace2-HQ) and the method to generate this dataset. This dataset is for research purpose. \n\n**`2021-08-30`**: Docker has been supported, please refer [here](https:\u002F\u002Freplicate.ai\u002Fneuralchen\u002Fsimswap-image) for details.\n\n**`2021-08-17`**: We have updated the [Preparation](.\u002Fdocs\u002Fguidance\u002Fpreparation.md), The main change is that the gpu version of onnx is now installed by default, Now the time to process a video is greatly reduced.\n\n**`2021-07-19`**: ***Obvious border abruptness has been resolved***. We add the ability to using mask and upgrade the old algorithm for better visual effect, please go to [Inference for image or video face swapping](.\u002Fdocs\u002Fguidance\u002Fusage.md) for details. Please don’t forget to go to [Preparation](.\u002Fdocs\u002Fguidance\u002Fpreparation.md) to check the latest set up. (Thanks for the help from [@woctezuma](https:\u002F\u002Fgithub.com\u002Fwoctezuma) and [@instant-high](https:\u002F\u002Fgithub.com\u002Finstant-high))\n\n## The first open source high resolution dataset for face swapping!!!\n## High Resolution Dataset [VGGFace2-HQ](https:\u002F\u002Fgithub.com\u002FNNNNAI\u002FVGGFace2-HQ)\n\n[![logo](.\u002Fdocs\u002Fimg\u002Fvggface2_hq_compare.png)](https:\u002F\u002Fgithub.com\u002FNNNNAI\u002FVGGFace2-HQ)\n\n\n\n\n## Dependencies\n- python3.6+\n- pytorch1.5+\n- torchvision\n- opencv\n- pillow\n- numpy\n- imageio\n- moviepy\n- insightface\n- ***timm==0.5.4***\n\n## Training\n\n[Preparation](.\u002Fdocs\u002Fguidance\u002Fpreparation.md)\n\nThe training script is slightly different from the original version, e.g., we replace the patch discriminator with the projected discriminator, which saves a lot of hardware overhead and achieves slightly better results.\n\nIn order to ensure the normal training, the batch size must be greater than 1.\n\nFriendly reminder, due to the difference in training settings, the user-trained model will have subtle differences in visual effects from the pre-trained model we provide.\n\n- Train 224 models with VGGFace2 224*224 [[Google Driver] VGGFace2-224 (10.8G)](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F19pWvdEHS-CEG6tW3PdxdtZ5QEymVjImc\u002Fview?usp=sharing) [[Baidu Driver] ](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1OiwLJHVBSYB4AY2vEcfN0A) [Password: lrod]\n\nFor faster convergence and better results, a large batch size (more than 16) is recommended!\n\n***We recommend training more than 400K iterations (batch size is 16), 600K~800K will be better, more iterations will not be recommended.***\n\n\n```\npython train.py --name simswap224_test --batchSize 8  --gpu_ids 0 --dataset \u002Fpath\u002Fto\u002FVGGFace2HQ --Gdeep False\n```\n\n[Colab demo for training 224 model][ \u003Ca href=\"https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fneuralchen\u002FSimSwap\u002Fblob\u002Fmain\u002Ftrain.ipynb\">\u003Cimg src=\"https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\" alt=\"google colab logo\">\u003C\u002Fa>](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fneuralchen\u002FSimSwap\u002Fblob\u002Fmain\u002Ftrain.ipynb)\n\nFor faster convergence and better results, a large batch size (more than 16) is recommended!\n\n- Train 512 models with VGGFace2-HQ 512*512 [VGGFace2-HQ](https:\u002F\u002Fgithub.com\u002FNNNNAI\u002FVGGFace2-HQ).\n```\npython train.py --name simswap512_test  --batchSize 16  --gpu_ids 0 --dataset \u002Fpath\u002Fto\u002FVGGFace2HQ --Gdeep True\n```\n\n\n\n## Inference with a pretrained SimSwap model\n[Preparation](.\u002Fdocs\u002Fguidance\u002Fpreparation.md)\n\n[Inference for image or video face swapping](.\u002Fdocs\u002Fguidance\u002Fusage.md)\n\n[Colab demo](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fneuralchen\u002FSimSwap\u002Fblob\u002Fmain\u002FSimSwap%20colab.ipynb)\n\n\u003Cdiv style=\"background: yellow; width:140px; font-weight:bold;font-family: sans-serif;\">Stronger feature\u003C\u002Fdiv>\n\n[Colab for switching specific faces in multi-face videos][ \u003Ca href=\"https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fneuralchen\u002FSimSwap\u002Fblob\u002Fmain\u002FMultiSpecific.ipynb\">\u003Cimg src=\"https:\u002F\u002Fcolab.research.google.com\u002Fassets\u002Fcolab-badge.svg\" alt=\"google colab logo\">\u003C\u002Fa>](https:\u002F\u002Fcolab.research.google.com\u002Fgithub\u002Fneuralchen\u002FSimSwap\u002Fblob\u002Fmain\u002FMultiSpecific.ipynb)\n\n[Image face swapping demo & Docker image on Replicate](https:\u002F\u002Freplicate.ai\u002Fneuralchen\u002Fsimswap-image)\n\n\n\n## Video\n\u003Cimg src=\".\u002Fdocs\u002Fimg\u002Fvideo.webp\"\u002F>\n\u003Cdiv>\n\u003Cimg width=24% src=\".\u002Fdocs\u002Fimg\u002Fanni.webp\"\u002F>\n\u003Cimg width=24% src=\".\u002Fdocs\u002Fimg\u002Fchenglong.webp\"\u002F>\n\u003Cimg width=24% src=\".\u002Fdocs\u002Fimg\u002Fzhoujielun.webp\"\u002F>\n\u003Cimg width=24% src=\".\u002Fdocs\u002Fimg\u002Fzhuyin.webp\"\u002F>\n\u003C\u002Fdiv>\n\u003Cdiv>\n\u003Cimg width=49% src=\".\u002Fdocs\u002Fimg\u002Fmama_mask_short.webp\"\u002F>\n\u003Cimg width=49% src=\".\u002Fdocs\u002Fimg\u002Fmama_mask_wuyifan_short.webp\"\u002F>\n\u003C\u002Fdiv>\n\n## Results\n![Results1](\u002Fdocs\u002Fimg\u002Fresults1.PNG)\n\n![Results2](\u002Fdocs\u002Fimg\u002Ftotal.PNG)\n\n\n\u003C!-- ![video2](\u002Fdocs\u002Fimg\u002Fanni.webp)\n![video3](\u002Fdocs\u002Fimg\u002Fchenglong.webp)\n![video4](\u002Fdocs\u002Fimg\u002Fzhoujielun.webp)\n![video5](\u002Fdocs\u002Fimg\u002Fzhuyin.webp) -->\n\n\n**High-quality videos can be found in the link below:**\n\n[[Mama(video) 1080p]](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1mnSlwzz7f4H2O7UwApAHo64mgK4xSNyK\u002Fview?usp=sharing)\n\n[[Google Drive link for video 1]](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1hdne7Gw39d34zt3w1NYV3Ln5cT8PfCNm\u002Fview?usp=sharing)\n\n[[Google Drive link for video 2]](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1bDEg_pVeFYLnf9QLSMuG8bsjbRPk0X5_\u002Fview?usp=sharing)\n\n[[Google Drive link for video 3]](https:\u002F\u002Fdrive.google.com\u002Ffile\u002Fd\u002F1oftHAnLmgFis4XURcHTccGSWbWSXYKK1\u002Fview?usp=sharing)\n\n[[Baidu Drive link for video]](https:\u002F\u002Fpan.baidu.com\u002Fs\u002F1WTS6jm2TY17bYJurw57LUg ) Password: ```b26n```\n\n[[Online Video]](https:\u002F\u002Fwww.bilibili.com\u002Fvideo\u002FBV12v411p7j5\u002F)\n\n## User case\nIf you have some interesting results after using our project and are willing to share, you can contact us by email or share directly on the issue. Later, we may make a separate section to show these results, which should be cool.\n\nAt the same time, if you have suggestions for our project, please feel free to ask questions in the issue, or contact us directly via email: [email1](mailto:chenxuanhongzju@outlook.com), [email2](mailto:nicklau26@foxmail.com), [email3](mailto:ziangliu824@gmail.com). (All three can be contacted, just choose any one)\n\n## License\nFor academic and non-commercial use only.The whole project is under the CC-BY-NC 4.0 license. See [LICENSE](https:\u002F\u002Fgithub.com\u002Fneuralchen\u002FSimSwap\u002Fblob\u002Fmain\u002FLICENSE) for additional details.\n\n\n## To cite our papers\n```\n@inproceedings{DBLP:conf\u002Fmm\u002FChenCNG20,\n  author    = {Renwang Chen and\n               Xuanhong Chen and\n               Bingbing Ni and\n               Yanhao Ge},\n  title     = {SimSwap: An Efficient Framework For High Fidelity Face Swapping},\n  booktitle = {{MM} '20: The 28th {ACM} International Conference on Multimedia},\n  year      = {2020}\n}\n```\n```\n@Article{simswapplusplus,\n    author  = {Xuanhong Chen and\n              Bingbing Ni and\n              Yutian Liu and\n              Naiyuan Liu and\n              Zhilin Zeng and\n              Hang Wang},\n    title   = {SimSwap++: Towards Faster and High-Quality Identity Swapping},\n    journal = {{IEEE} Trans. Pattern Anal. Mach. Intell.},\n    volume  = {46},\n    number  = {1},\n    pages   = {576--592},\n    year    = {2024}\n}\n```\n\n## Related Projects\n\n**Please visit our another ACMMM2020 high-quality style transfer project**\n\n[![logo](.\u002Fdocs\u002Fimg\u002Flogo.png)](https:\u002F\u002Fgithub.com\u002Fneuralchen\u002FASMAGAN)\n\n[![title](\u002Fdocs\u002Fimg\u002Ftitle.png)](https:\u002F\u002Fgithub.com\u002Fneuralchen\u002FASMAGAN)\n\n**Please visit our AAAI2021 sketch based rendering project**\n\n[![logo](.\u002Fdocs\u002Fimg\u002Fgirl2.gif)](https:\u002F\u002Fgithub.com\u002FTZYSJTU\u002FSketch-Generation-with-Drawing-Process-Guided-by-Vector-Flow-and-Grayscale)\n[![title](\u002Fdocs\u002Fimg\u002Fgirl2-RGB.png)](https:\u002F\u002Fgithub.com\u002FTZYSJTU\u002FSketch-Generation-with-Drawing-Process-Guided-by-Vector-Flow-and-Grayscale)\n\n**Please visit our high resolution face dataset VGGFace2-HQ**\n\n[![logo](.\u002Fdocs\u002Fimg\u002Fvggface2_hq_compare.png)](https:\u002F\u002Fgithub.com\u002FNNNNAI\u002FVGGFace2-HQ)\n\nLearn about our other projects \n\n[[VGGFace2-HQ]](https:\u002F\u002Fgithub.com\u002FNNNNAI\u002FVGGFace2-HQ);\n\n[[RainNet]](https:\u002F\u002Fneuralchen.github.io\u002FRainNet);\n\n[[Sketch Generation]](https:\u002F\u002Fgithub.com\u002FTZYSJTU\u002FSketch-Generation-with-Drawing-Process-Guided-by-Vector-Flow-and-Grayscale);\n\n[[CooGAN]](https:\u002F\u002Fgithub.com\u002Fneuralchen\u002FCooGAN);\n\n[[Knowledge Style Transfer]](https:\u002F\u002Fgithub.com\u002FAceSix\u002FKnowledge_Transfer);\n\n[[SimSwap]](https:\u002F\u002Fgithub.com\u002Fneuralchen\u002FSimSwap);\n\n[[ASMA-GAN]](https:\u002F\u002Fgithub.com\u002Fneuralchen\u002FASMAGAN);\n\n[[SNGAN-Projection-pytorch]](https:\u002F\u002Fgithub.com\u002Fneuralchen\u002FSNGAN_Projection)\n\n[[Pretrained_VGG19]](https:\u002F\u002Fgithub.com\u002Fneuralchen\u002FPretrained_VGG19).\n\n## Acknowledgements\n\n\u003C!--ts-->\n* [Deepfacelab](https:\u002F\u002Fgithub.com\u002Fiperov\u002FDeepFaceLab)\n* [Insightface](https:\u002F\u002Fgithub.com\u002Fdeepinsight\u002Finsightface)\n* [Face-parsing.PyTorch](https:\u002F\u002Fgithub.com\u002Fzllrunning\u002Fface-parsing.PyTorch)\n* [BiSeNet](https:\u002F\u002Fgithub.com\u002FCoinCheung\u002FBiSeNet)\n\u003C!--te-->\n","SimSwap 是一个基于单个训练模型实现任意人脸交换的框架，支持图像和视频处理。该项目利用PyTorch开发，结合了深度学习技术如GAN（生成对抗网络），实现了高保真度的人脸替换功能。其核心优势在于只需一次训练即可应用于多种场景下的人脸交换任务，极大提高了效率与灵活性。适用于需要进行高质量人脸替换的研究或创意项目中，例如影视后期制作、虚拟形象创建等。请注意，此项目仅供技术和学术用途，不得用于任何非法或不道德的行为。","2026-06-11 03:36:25","high_star"]