Source image | Target image |
---|---|
(Image from https://github.com/ai-forever/sber-swap/tree/main/examples/images)
Automatically downloads the onnx and prototxt files on the first run. It is necessary to be connected to the Internet while downloading.
For the sample image,
$ python3 sber-swap.py
If you want to specify the target image, put the image path after the --input
option.
The source image can be specified with the --source
option.
You can use --savepath
option to change the name of the output file to save.
$ python3 sber-swap.py --input TARGET_IMAGE --source SOURCE_IMAGE --savepath SAVE_IMAGE_PATH
By adding the --video
option, you can input the video.
If you pass 0
as an argument to VIDEO_PATH, you can use the webcam input instead of the video file.
$ python3 sber-swap.py --video VIDEO_PATH
Pytorch
-
G_unet_2blocks.onnx.prototxt
-
scrfd_10g_bnkps.onnx.prototxt
-
arcface_backbone.onnx.prototxt
ONNX opset=11
-
face_landmarks.onnx.prototxt
ONNX opset=12
G_unet_2blocks.onnx.prototxt
scrfd_10g_bnkps.onnx.prototxt
arcface_backbone.onnx.prototxt
face_landmarks.onnx.prototxt