Face swapper and enhancer
Project description
FaceFuison Python Lib
FaceFusion is a very nice face swapper and enhancer.
Requirements
python: >=3.9
Installation
CPU support:
pip install facefusionlib
GPU support:
First of all, you need to check if your system supports the onnxruntime-gpu
.
Go to https://onnxruntime.ai and check the installation matrix.
If yes, just run:
pip install facefusionlib[gpu]
Usage
from facefusionlib import swapper
from facefusionlib.swapper import DeviceProvider
input_path = 'input.png'
target_path = 'target.png'
result = swapper.swap_face(
source_paths=[input_path],
target_path=target_path,
provider=DeviceProvider.CPU,
detector_score=0.65,
mask_blur=0.7,
skip_nsfw=True,
landmarker_score=0.5
)
print(result)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
facefusionlib-1.1.2.tar.gz
(33.5 kB
view details)
Built Distribution
File details
Details for the file facefusionlib-1.1.2.tar.gz
.
File metadata
- Download URL: facefusionlib-1.1.2.tar.gz
- Upload date:
- Size: 33.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7751f1770cf5aabccc61cd2aad1191936b9e961f5e41c0655f521800132f32fd |
|
MD5 | c2aa4d7a2a0a932cd94ffacbacc4e98b |
|
BLAKE2b-256 | ef96f8e491b37d14311a8e7c60e6d352b7e5b36642936ac012fded65817f4576 |
File details
Details for the file facefusionlib-1.1.2-py3-none-any.whl
.
File metadata
- Download URL: facefusionlib-1.1.2-py3-none-any.whl
- Upload date:
- Size: 45.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e8ce5937d838530cdfad47baae2813f4d095d803eaa494c00880bc26fcee3ed8 |
|
MD5 | ff7099457ab5751b33a0463c764209a2 |
|
BLAKE2b-256 | 7ba5123adbf5131d3d2015dfc9ef91acba5a58ee133723dc5271acddd0861f42 |