Giter VIP home page Giter VIP logo

simswap's Introduction

SimSwap: An Efficient Framework For High Fidelity Face Swapping

Proceedings of the 28th ACM International Conference on Multimedia

The official repository with Pytorch

Our method can realize arbitrary face swapping on images and videos with one single trained model.

Training and test code are now available! google colab logo

We are working with our incoming paper SimSwap++, keeping expecting!

The high resolution version of SimSwap-HQ is supported!

simswaplogo

Our paper can be downloaded from [Arxiv] [ACM DOI]

This project also received support from SocialBook.

Attention

This project is for technical and academic use only. Please do not apply it to illegal and unethical scenarios.

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

Please do not ignore the content at the end of this README!

If you find this project useful, please star it. It is the greatest appreciation of our work.

Top News

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) [Baidu Driver] [Password: lrod].

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.

2021-11-24: We have trained a beta version of SimSwap-HQ on VGGFace2-HQ and open sourced the checkpoint of this model (if you think the Simswap 512 is cool, please star our VGGFace2-HQ repo). Please don’t forget to go to Preparation and Inference for image or video face swapping to check the latest set up.

2021-11-23: The google drive link of VGGFace2-HQ is released.

2021-11-17: We released a high resolution face dataset VGGFace2-HQ and the method to generate this dataset. This dataset is for research purpose.

2021-08-30: Docker has been supported, please refer here for details.

2021-08-17: We have updated the Preparation, 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.

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 for details. Please don’t forget to go to Preparation to check the latest set up. (Thanks for the help from @woctezuma and @instant-high)

The first open source high resolution dataset for face swapping!!!

High Resolution Dataset VGGFace2-HQ

logo

Dependencies

  • python3.6+
  • pytorch1.5+
  • torchvision
  • opencv
  • pillow
  • numpy
  • imageio
  • moviepy
  • insightface
  • timm==0.5.4

Training

Preparation

The 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.

In order to ensure the normal training, the batch size must be greater than 1.

Friendly 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.

For faster convergence and better results, a large batch size (more than 16) is recommended!

We recommend training more than 400K iterations (batch size is 16), 600K~800K will be better, more iterations will not be recommended.

python train.py --name simswap224_test --batchSize 8  --gpu_ids 0 --dataset /path/to/VGGFace2HQ --Gdeep False

[Colab demo for training 224 model] google colab logo

For faster convergence and better results, a large batch size (more than 16) is recommended!

  • Train 512 models with VGGFace2-HQ 512*512 VGGFace2-HQ.
python train.py --name simswap512_test  --batchSize 16  --gpu_ids 0 --dataset /path/to/VGGFace2HQ --Gdeep True

Inference with a pretrained SimSwap model

Preparation

Inference for image or video face swapping

Colab demo

Stronger feature

[Colab for switching specific faces in multi-face videos] google colab logo

Image face swapping demo & Docker image on Replicate

Video

Results

Results1

Results2

High-quality videos can be found in the link below:

[Mama(video) 1080p]

[Google Drive link for video 1]

[Google Drive link for video 2]

[Google Drive link for video 3]

[Baidu Drive link for video] Password: b26n

[Online Video]

User case

If 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.

At 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, email2, email3. (All three can be contacted, just choose any one)

License

For academic and non-commercial use only.The whole project is under the CC-BY-NC 4.0 license. See LICENSE for additional details.

To cite our paper

@inproceedings{DBLP:conf/mm/ChenCNG20,
  author    = {Renwang Chen and
               Xuanhong Chen and
               Bingbing Ni and
               Yanhao Ge},
  title     = {SimSwap: An Efficient Framework For High Fidelity Face Swapping},
  booktitle = {{MM} '20: The 28th {ACM} International Conference on Multimedia},
  year      = {2020}
}

Related Projects

Please visit our another ACMMM2020 high-quality style transfer project

logo

title

Please visit our AAAI2021 sketch based rendering project

logo title

Please visit our high resolution face dataset VGGFace2-HQ

logo

Learn about our other projects

[VGGFace2-HQ];

[RainNet];

[Sketch Generation];

[CooGAN];

[Knowledge Style Transfer];

[SimSwap];

[ASMA-GAN];

[SNGAN-Projection-pytorch]

[Pretrained_VGG19].

Acknowledgements

simswap's People

Contributors

acesix avatar arthurzhangsheng avatar bfirsh avatar neuralchen avatar nnnnai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simswap's Issues

batch size

Hi!
The work is great!
In your paper, you train one batch for image pairs with the same identity and another
batch for image pairs with different identities alternately. what is the batch size when you train? And have you tried a different batchsize.
Thank you

Colab Attribute Error

Love this project, and the demo project/colab works fine if I don't touch the demo image and the demo video, but as soon as I change either one to test it with my own samples I get an error. Can someone help tell me what I'm doing wrong, or missing?

Here's the output it gives me when it fails.

`AttributeError Traceback (most recent call last)
in ()
23 # img_a = Image.open(pic_a).convert('RGB')
24 img_a_whole = cv2.imread(pic_a)
---> 25 img_a_align_crop, _ = app.get(img_a_whole,crop_size)
26 img_a_align_crop_pil = Image.fromarray(cv2.cvtColor(img_a_align_crop[0],cv2.COLOR_BGR2RGB))
27 img_a = transformer_Arcface(img_a_align_crop_pil)

1 frames
/usr/local/lib/python3.7/dist-packages/insightface/model_zoo/scrfd.py in detect(self, img, threshold, input_size, max_num, metric)
202 input_size = self.input_size if input_size is None else input_size
203
--> 204 im_ratio = float(img.shape[0]) / img.shape[1]
205 model_ratio = float(input_size[1]) / input_size[0]
206 if im_ratio>model_ratio:

AttributeError: 'NoneType' object has no attribute 'shape'`

Size of dataset?

Hi!
The work is incredible! But I'm interested in the dataset -- what is the number of images that you trained on? And how much did it take in terms of time (and on which GPUs)?
Another question is if you know where to take this dataset, because as for now it is not available using the direct link https://www.robots.ox.ac.uk/~vgg/data/vgg_face2

AttributeError: module 'torch._C' has no attribute '_cuda_setDevice'

Traceback (most recent call last):
File "test_video_swapsingle.py", line 34, in
opt = TestOptions().parse()
File "C:\Program Files\SimSwap\SimSwap-main\options\base_options.py", line 84, in parse
torch.cuda.set_device(self.opt.gpu_ids[0])
File "C:\Users[ME]\anaconda3\envs\simswap\lib\site-packages\torch\cuda_init_.py", line 261, in set_device
torch._C._cuda_setDevice(device)
AttributeError: module 'torch._C' has no attribute '_cuda_setDevice'

How do I fix this, at first I thought I might have the wrong pytorch, but I downloaded it from simswap github https://github.com/neuralchen/SimSwap/blob/main/docs/guidance/preparation.md

audio not working on apple devices

Hello, I've sent some videos to a couple of friends, and none of them could listen to the audio (iphones and macbooks), there was no audio at all.

I had no problem listening to them on android or on windows.

Replacing the audio from the output file using ffmepg solved the problem.

training code

Thank you for excellent work! when will you release the training code?

not an issue - emotion transfer / stylegan2

I've seen other code that's been added to fsgan to attempt to inject emotion.
BigBey/emotion_transfer@24637fc

because the architecture is quite simple - presumably - you'd just need to do some neural net surgery on the ID injection layer?

if you have any line numbers to / blended networks to play with.....

Also - I see the pix2pix model is part of the architecture - were there any efforts to tack on stylegan2 into the mix?

🔥 Helping the project to become more user-friendly:

First of all, THANK YOU for working on this wonderful project! ❤
I found this project few days ago, I'm pretty much fall in love with it right away.

After trying the latest 2 features added:

  1. Remove Watermark
  2. Swap SPECIFIC Face

It inspired me as a simple user, how can I help the project grow with my own ideas & skills.

Suggestion / Ideas:

  1. Replace 'SPECIFIC' Multiple Faces at once
  2. GUI - Easy to use basic user-interface

1. If it's possible to go a bit farther with the "Replace Specific Face" to multiple?
For example, good reference is something like ReFace App:
First, it analyze the video find ALL the faces (I guess it snapshot and crop them as best as it can consider if face is close to edge or something it gives extra space on the other sides),
Then it allow the user to choose / select which one of the founded faces to swap: just a specific face or every single one of them. (total freedom of selection to the user)

2. Related to above suggestion, if possible it will be AMAZING :
Can you make a super-simplistic (basic as possible for start) GUI so we run 1 command it will open the GUI, this will help the user with some preview and controls such as:

  • Having all the features (current and future optional usage) working in one place.
  • Selecting the Main Destination Video or Image
  • Run video or image analyze (will recognize and crop each discovered face)
  • Align + Crop each founded face (so the user could SEE + Replace)
  • When analyze finished: Show 1 thumbnail of each of the cropped founded faces
  • Select / Drag & Drop to the SPECIFIC faces (thumbnails) with the wanted 1 or multiple Source image/s (the faces you want to use instead).
  • Run the Final Render-Process to Analyze, Align, Crop selected Source Images and merge all together.
  • When done, it can either play the final video inside the GUI as preview
  • If you like it, you can keep it or REDO change the SPECIFIC faces again, or anything else

The most helpful thing will be to SEE the recognized face of the current video / image so the users can CLICK the thumbnail of FACE-1 and swap to (either drag and drop or just load from our PC) the face we want, same for FACE-2, FACE-6 or Remove their selection, so it's easy to test results in one place which is the main GUI.

In case of multiple faces, if you don't swap one of the SPECIFIC faces, it will just leave them as the original video / image and do it's swapping magic.


I can help with the GUI + GUI Design:
I'm aware a GUI could be different, but it's a very inviting user-friendly for sure.

If you need help with the GUI design + buttons, I'll be happy to help using my skills:
I can design the basic GUI mockup for reference and the buttons (if needed), maybe you just want to draw whatever default buttons uses for minimalistic GUI which is fine and maybe faster to produce. again, I'm not a programmer I'm an animator + game/software designer so I look at it from other angle.

THE MAIN IDEA
Is to keep it simple for the user, but also start re-build upcoming features based on a specific Base-GUI so the user may see immediately new buttons or options when update.
If you will like my idea I'll be happy to help with the GUI graphics design: make a rough Mockup + Design the buttons.

  • Of course I have SO MANY IDEAS for extra features... but let's start with the basics first ;)

Thanks ahead and sorry about my bad English, I hope that you can understand most of what I wrote.

UnicodeEncodeError - what am I doing wrong? FIX ?

I've installed on Windows using Anaconda and when trying to run my first demo using: "Face swapping for video" command with the default demo files.

I get these errors:
cmd_2021-06-27_23-14-28

Can somebody please guide me step-by-step how to fix that?
Thanks ahead!

Watermark - Question ❓ (none issue)

Sorry if my question sound too rude to ask:
Is it possible to remove the watermark with an addition parameter?

In case the author are not interested allowing to remove the watermark I will respect that of course.
Just to be clear I didn't mean to be rude but wondering if possible.

Thanks ahead and please keep up the good work! :)

Face detection & cropping method

Hi, great work !

I am trying on my own images, and the result changes a lot depending on the cropping conditions of the face. What backend are you using to align your faces ? I use face-alignment to detect the face, crop the face centered on the nose and rotated along the axis eye_average->mouth. Still I don't know the extent of the cropping. Can you help me with that ?

Thanks a lot in advance !

Questiones about training results.

Thanks for your wonderful work and opening the source codes. I have implemented the training codes. To make the background stable, I predict the mask and merge the generated image with the target image as

class Generator_Adain_Mask(nn.Module):
However, it seems hard to train, the generated image is totally similar to the target image and doesn't swap the face. I have trained 500K iterations. Do you have any idea to solve this problem?
image
The generated images are in the third row.

how to adjust swap intensity

I would like to know if it is possible to adjust the force of the face swap.

for example

force = 0
show original face
force = 0.5
original and new face mixed
force = 1
show the new face

The arcface model cannot be loaded

It's a great project. I follow the instructions to configure the environment. When the code runs to netArc_checkpoint=torch.load(netArc_checkpoint) an error is reported.
..torch/serialization.py line 702, in _legacy_load
result = unpickler.load()
AttributeError: Can't get attribute 'ArcMarginModel' on <module 'models' from 'SimSwap-main/models/init.py'>
How to solve it? Is the model incorrect?

Training model

Hi, thanks for releasing the amazing work!

I'm trying to reproduce the training part, and I borrowed a lot code from fs_model.py

However, in another issues, #27 , you recommend to use "opt.model == 'pix2pixHD" to reprodeuce the base performance.

I'm wondering how are these two models used?

Btw, when I'm trying to train the model by using fs_model.py, the Gradient Penalty loss gets very high, even it is assigned by λ=1e-5, do you have any idea about this?

SourceChangeWarning errors: What specific versions of python, torch, torchvision and torchtext were used?

I'm trying to test the trained model using test_one_image.py as instructed in the README, but am running into the following errors. I'm using Python 3.7.10, Pytorch 1.8.1+cu101 , torchvision 0.9.1+cu101, and torchtext 0.9.1. What versions of all the libraries were used to train the model? And how do I forward port the model?

/usr/local/lib/python3.7/dist-packages/torch/serialization.py:649: SourceChangeWarning: source code of class 'torch.nn.parallel.data_parallel.DataParallel' has changed. Saved a reverse patch to DataParallel.patch. Run `patch -p0 < DataParallel.patch` to revert your changes.
  warnings.warn(msg, SourceChangeWarning)
/usr/local/lib/python3.7/dist-packages/torch/serialization.py:649: SourceChangeWarning: source code of class 'torch.nn.modules.conv.Conv2d' has changed. Saved a reverse patch to Conv2d.patch. Run `patch -p0 < Conv2d.patch` to revert your changes.
  warnings.warn(msg, SourceChangeWarning)
/usr/local/lib/python3.7/dist-packages/torch/serialization.py:649: SourceChangeWarning: source code of class 'torch.nn.modules.batchnorm.BatchNorm2d' has changed. Saved a reverse patch to BatchNorm2d.patch. Run `patch -p0 < BatchNorm2d.patch` to revert your changes.
  warnings.warn(msg, SourceChangeWarning)
/usr/local/lib/python3.7/dist-packages/torch/serialization.py:649: SourceChangeWarning: source code of class 'torch.nn.modules.activation.PReLU' has changed. Saved a reverse patch to PReLU.patch. Run `patch -p0 < PReLU.patch` to revert your changes.
  warnings.warn(msg, SourceChangeWarning)
/usr/local/lib/python3.7/dist-packages/torch/serialization.py:649: SourceChangeWarning: source code of class 'torch.nn.modules.pooling.MaxPool2d' has changed. Saved a reverse patch to MaxPool2d.patch. Run `patch -p0 < MaxPool2d.patch` to revert your changes.
  warnings.warn(msg, SourceChangeWarning)
/usr/local/lib/python3.7/dist-packages/torch/serialization.py:649: SourceChangeWarning: source code of class 'torch.nn.modules.container.Sequential' has changed. Saved a reverse patch to Sequential.patch. Run `patch -p0 < Sequential.patch` to revert your changes.
  warnings.warn(msg, SourceChangeWarning)
/usr/local/lib/python3.7/dist-packages/torch/serialization.py:649: SourceChangeWarning: source code of class 'torch.nn.modules.pooling.AdaptiveAvgPool2d' has changed. Saved a reverse patch to AdaptiveAvgPool2d.patch. Run `patch -p0 < AdaptiveAvgPool2d.patch` to revert your changes.
  warnings.warn(msg, SourceChangeWarning)
/usr/local/lib/python3.7/dist-packages/torch/serialization.py:649: SourceChangeWarning: source code of class 'torch.nn.modules.linear.Linear' has changed. Saved a reverse patch to Linear.patch. Run `patch -p0 < Linear.patch` to revert your changes.
  warnings.warn(msg, SourceChangeWarning)
/usr/local/lib/python3.7/dist-packages/torch/serialization.py:649: SourceChangeWarning: source code of class 'torch.nn.modules.activation.Sigmoid' has changed. Saved a reverse patch to Sigmoid.patch. Run `patch -p0 < Sigmoid.patch` to revert your changes.
  warnings.warn(msg, SourceChangeWarning)
/usr/local/lib/python3.7/dist-packages/torch/serialization.py:649: SourceChangeWarning: source code of class 'torch.nn.modules.dropout.Dropout' has changed. Saved a reverse patch to Dropout.patch. Run `patch -p0 < Dropout.patch` to revert your changes.
  warnings.warn(msg, SourceChangeWarning)
/usr/local/lib/python3.7/dist-packages/torch/serialization.py:649: SourceChangeWarning: source code of class 'torch.nn.modules.batchnorm.BatchNorm1d' has changed. Saved a reverse patch to BatchNorm1d.patch. Run `patch -p0 < BatchNorm1d.patch` to revert your changes.
  warnings.warn(msg, SourceChangeWarning)
Traceback (most recent call last):
  File "test_one_image.py", line 35, in <module>
    model = create_model(opt)
  File "/content/SimSwap/models/models.py", line 18, in create_model
    model.initialize(opt)
  File "/content/SimSwap/models/fs_model.py", line 64, in initialize
    netArc_checkpoint = torch.load(netArc_checkpoint)
  File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 585, in load
    return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
  File "/usr/local/lib/python3.7/dist-packages/torch/serialization.py", line 772, in _legacy_load
    deserialized_objects[key]._set_from_file(f, offset, f_should_read_directly)
RuntimeError: unexpected EOF, expected 1918589 more bytes. The file might be corrupted.

couldn't create a writable file...

C:\ProgramData\Miniconda3\envs\simswap\lib\site-packages\torch\serialization.py:658: SourceChangeWarning: source code of class 'torch.nn.parallel.data_parallel.DataParallel' has changed. Tried to save a patch, but couldn't create a writable file DataParallel.patch. Make sure it doesn't exist and your working directory is writable.

colab error

when trying to run the last bit of code I get this error
image

ValueError: attempt to get argmin of an empty sequence

After I've downloaded the latest version I'm getting an error when I try to run the mutispecific command for video:

set det-size: (640, 640)
(142, 366, 4)
  0%|                                                                                                                                                                                                                | 0/56 [00:01<?, ?it/s]
Traceback (most recent call last):
  File "test_video_swap_multispecific.py", line 93, in <module>
    model, app, opt.output_path,temp_results_dir=opt.temp_path,no_simswaplogo=opt.no_simswaplogo)
  File "Z:\SimSwap\util\videoswap_multispecific.py", line 83, in video_swap
    min_indexs = np.argmin(id_compare_values_array,axis=0)
  File "<__array_function__ internals>", line 6, in argmin
  File "Z:\anaconda3\envs\simswap\lib\site-packages\numpy\core\fromnumeric.py", line 1269, in argmin
    return _wrapfunc(a, 'argmin', axis=axis, out=out)
  File "Z:\anaconda3\envs\simswap\lib\site-packages\numpy\core\fromnumeric.py", line 58, in _wrapfunc
    return bound(*args, **kwds)
ValueError: attempt to get argmin of an empty sequence

What am I doing wrong? and how can I fix it?
it worked fine on the version before for few days ago...


UPDATE: (it works now)
It's funny because it was my suggestion (Thanks for adding this!) the file names are now on the same directory + named to SRC_01.jpg and DST_02.jpg - GREAT!
But I believe it's supposed to be the opposite:

  • SRC = The source image you want to swap to the destination.
  • DST = The destination image which should be swap in to. (to final result)

I'm now trying the multi-specific for the images, still getting issues with it... if I won't catch my mistake I may post it so I can get some help, thanks and please keep up the good work!

Error in Colab Notebook.


UnpicklingError Traceback (most recent call last)
in ()
13
14 torch.nn.Module.dump_patches = True
---> 15 model = create_model(opt)
16 model.eval()
17

3 frames
/usr/local/lib/python3.7/dist-packages/torch/serialization.py in _legacy_load(f, map_location, pickle_module, **pickle_load_args)
775 "functionality.")
776
--> 777 magic_number = pickle_module.load(f, **pickle_load_args)
778 if magic_number != MAGIC_NUMBER:
779 raise RuntimeError("Invalid magic number; corrupt file?")

UnpicklingError: invalid load key, '<'.


How would this be fixed?

Normalization during training

Hey guys! thank you for the amazing paper!
While trying to implement a training script for the model I got the following question:
What type of input and output normalization did you use? Am I correct that it was [0..1] for the input image, and tanh ([-1..1]) as output? What was the input for the Discriminator: [-1..1] or [0..1]?

I will be grateful for the answer.

Are there parameters for making the source facial details stronger?

First of all, great work. Are there parameters that can keep more of the details from the source image, or is this something that needs to be trained on? For example, sometimes there might be key details missing from the eyes, or maybe there are other features(piercings, tattoos, moles, and so on for example) that I may want to keep. Thanks!

AssertionError

根据Usage所提供的命令运行出现如下错误。
运行的命令:
Face swapping for video
Swap only one face within the video(the one with highest confidence by face detection).
python test_video_swapsingle.py --isTrain false --name people --Arc_path arcface_model/arcface_checkpoint.tar --pic_a_path ./demo_file/Iron_man.jpg --video_path ./demo_file/mutil_people_1080p.mp4 --output_path ./output/mutil_test_swapsingle.mp4 --temp_path ./temp_results
出现的错误:
Traceback (most recent call last):
File "test_video_swapsingle.py", line 44, in
app = Face_detect_crop(name='antelope', root='./insightface_func/models')
File "E:\BaiduNetdiskDownload\SimSwap-main\insightface_func\face_detect_crop_single.py", line 39, in init
assert 'detection' in self.models
AssertionError

Evaluation protocol

First of all, great work!

I wanted to ask you how you evaluated against "Fine-grained head pose estimation without keypoints" for face pose correctness, because the official implementation of the Hopenet works on Python 2.7 with torch 0.4, incompatible with your environment and most modern systems. I was wondering if you used a different or more modern implementation of it.

Thank you!

TypeError: cannot unpack non-iterable NoneType object

when I use an custom image I get this

-------------- End ----------------
input mean and std: 127.5 127.5
find model: ./insightface_func/models/antelope/glintr100.onnx recognition
find model: ./insightface_func/models/antelope/scrfd_10g_bnkps.onnx detection
set det-size: (640, 640)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-21-c61bb4ca883a> in <module>()
     23 # img_a = Image.open(pic_a).convert('RGB')
     24 img_a_whole = cv2.imread(pic_a)
---> 25 img_a_align_crop, _ = app.get(img_a_whole,crop_size)
     26 img_a_align_crop_pil = Image.fromarray(cv2.cvtColor(img_a_align_crop[0],cv2.COLOR_BGR2RGB))
     27 img_a = transformer_Arcface(img_a_align_crop_pil)

TypeError: cannot unpack non-iterable NoneType object

Limitation in processing number of video frames according to GPU memory?

Since I got it to work on my GForce 1050GTX / 2GB , at least for videos not longer than ~ 16 frames, before the GPU runs out of memory I wonder if there is also a limitation for using a 8 GB GPU ?

I had the same problem using Wav2Lip, but it could be solved by setting the chunk size to 1.

Would it (theoretically) be possible to process videos in SimSwap in smaller parts or chunks by releasing GPU memory every 15 frames ?

pretrained model?

FileNotFoundError: [Errno 2] No such file or directory: 'models/BEST_checkpoint.tar'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.