13 Commits

Author SHA1 Message Date
Xuanhong Chen
bd7b7686a1 Update README.md 2024-08-07 01:02:56 +08:00
Xuanhong Chen
f2741bc07e Update README.md 2024-08-07 01:02:20 +08:00
Xuanhong Chen
e1e0641ecb Update README.md 2024-07-19 23:05:27 +08:00
Xuanhong Chen
ea93ed95f4 Update README.md 2024-07-19 23:04:14 +08:00
Xuanhong Chen
a5f6dea673 Update README.md 2023-09-27 00:10:18 +08:00
Xuanhong Chen
e538d8815a Update README.md 2023-09-26 01:44:40 +08:00
Xuanhong Chen
bc288c914d Update README.md 2023-09-26 01:38:37 +08:00
Xuanhong Chen
1b04511c21 Update train.ipynb 2023-09-26 01:36:34 +08:00
Xuanhong Chen
bb5db7db11 Update train.ipynb 2023-09-26 01:16:15 +08:00
Xuanhong Chen
dcf3af2b07 Update train.ipynb 2023-09-26 01:07:30 +08:00
Xuanhong Chen
e2e5bf5aa9 Update train.ipynb 2023-09-26 01:05:28 +08:00
Xuanhong Chen
0711455bb3 Update train.ipynb 2023-09-26 01:04:30 +08:00
Xuanhong Chen
dd678ef155 Update train.ipynb 2023-09-25 23:17:41 +08:00
3 changed files with 27 additions and 17 deletions

View File

@@ -4,6 +4,8 @@
**Our method can realize **arbitrary face swapping** on images and videos with **one single trained model**.**
***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://join.sjtu.edu.cn/Admin/QsPreview.aspx?qsid=44f5413a90974114b8f5e643177ef32d)***
Training and test code are now available!
[ <a href="https://colab.research.google.com/github/neuralchen/SimSwap/blob/main/train.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="google colab logo"></a>](https://colab.research.google.com/github/neuralchen/SimSwap/blob/main/train.ipynb)
@@ -34,6 +36,8 @@ If you find this project useful, please star it. It is the greatest appreciation
## Top News <img width=8% src="./docs/img/new.gif"/>
**`2023-09-26`**: We fixed bugs in colab!
**`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 ```./models/```.
**`2022-04-21`**: For resource limited users, we provide the cropped VGGFace2-224 dataset [[Google Driver] VGGFace2-224 (10.8G)](https://drive.google.com/file/d/19pWvdEHS-CEG6tW3PdxdtZ5QEymVjImc/view?usp=sharing) [[Baidu Driver]](https://pan.baidu.com/s/1OiwLJHVBSYB4AY2vEcfN0A) [Password: lrod].
@@ -70,6 +74,7 @@ If you find this project useful, please star it. It is the greatest appreciation
- imageio
- moviepy
- insightface
- ***timm==0.5.4***
## Training
@@ -92,7 +97,7 @@ For faster convergence and better results, a large batch size (more than 16) is
python train.py --name simswap224_test --batchSize 8 --gpu_ids 0 --dataset /path/to/VGGFace2HQ --Gdeep False
```
[Colab demo for training 224 model](https://colab.research.google.com/github/neuralchen/SimSwap/blob/main/train.ipynb)
[Colab demo for training 224 model][ <a href="https://colab.research.google.com/github/neuralchen/SimSwap/blob/main/train.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="google colab logo"></a>](https://colab.research.google.com/github/neuralchen/SimSwap/blob/main/train.ipynb)
For faster convergence and better results, a large batch size (more than 16) is recommended!
@@ -112,7 +117,7 @@ python train.py --name simswap512_test --batchSize 16 --gpu_ids 0 --dataset /p
<div style="background: yellow; width:140px; font-weight:bold;font-family: sans-serif;">Stronger feature</div>
[Colab for switching specific faces in multi-face videos](https://colab.research.google.com/github/neuralchen/SimSwap/blob/main/MultiSpecific.ipynb)
[Colab for switching specific faces in multi-face videos][ <a href="https://colab.research.google.com/github/neuralchen/SimSwap/blob/main/MultiSpecific.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="google colab logo"></a>](https://colab.research.google.com/github/neuralchen/SimSwap/blob/main/MultiSpecific.ipynb)
[Image face swapping demo & Docker image on Replicate](https://replicate.ai/neuralchen/simswap-image)
@@ -166,7 +171,7 @@ At the same time, if you have suggestions for our project, please feel free to a
For academic and non-commercial use only.The whole project is under the CC-BY-NC 4.0 license. See [LICENSE](https://github.com/neuralchen/SimSwap/blob/main/LICENSE) for additional details.
## To cite our paper
## To cite our papers
```
@inproceedings{DBLP:conf/mm/ChenCNG20,
author = {Renwang Chen and
@@ -178,6 +183,22 @@ For academic and non-commercial use only.The whole project is under the CC-BY-NC
year = {2020}
}
```
```
@Article{simswapplusplus,
author = {Xuanhong Chen and
Bingbing Ni and
Yutian Liu and
Naiyuan Liu and
Zhilin Zeng and
Hang Wang},
title = {SimSwap++: Towards Faster and High-Quality Identity Swapping},
journal = {{IEEE} Trans. Pattern Anal. Mach. Intell.},
volume = {46},
number = {1},
pages = {576--592},
year = {2024}
}
```
## Related Projects

View File

@@ -1,12 +0,0 @@
# python=3.6
#cudatoolkit==10.2.89
imageio==2.9.0 # 06.07.2020
insightface==0.2.1
moviepy==1.0.2
numpy==1.19.1 # 21.06.2020
onnxruntime==1.6.0 # 10.12.2020
#pytorch==1.0.2
scikit-image==0.18.1 # 23.12.2020
torchaudio==0.8.0
torchvision==0.9.0

View File

@@ -112,7 +112,7 @@
"outputs": [],
"source": [
"!pip install googledrivedownloader\n",
"!pip install timm\n",
"!pip install timm==0.5.4\n",
"!wget -P SimSwap/arcface_model https://github.com/neuralchen/SimSwap/releases/download/1.0/arcface_checkpoint.tar"
]
},
@@ -140,9 +140,10 @@
},
"outputs": [],
"source": [
"%mkdir /content/TrainingData\n",
"!wget --load-cookies /tmp/cookies.txt \"https://docs.google.com/uc?export=download&confirm=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=19pWvdEHS-CEG6tW3PdxdtZ5QEymVjImc' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\\1\\n/p')&id=19pWvdEHS-CEG6tW3PdxdtZ5QEymVjImc\" -O /content/TrainingData/vggface2_crop_arcfacealign_224.tar && rm -rf /tmp/cookies.txt\n",
"%cd /content/\n",
"!tar -xzvf /content/TrainingData/vggface2_crop_arcfacealign_224.tar\n",
"!tar -xzvf /content/TrainingData/vggface2_crop_arcfacealign_224.tar -C /content/TrainingData\n ",
"!rm /content/TrainingData/vggface2_crop_arcfacealign_224.tar"
]
},