Take a video and replace the face in it with a face of your choice. You only need one image of the desired face. No dataset, no training.
pip install roop-pip
Be aware, the installation needs technical skills and is not for beginners. Please do not open platform and installation related issues on GitHub. Acceleration - Unleash the full potential of your CPU and GPU
from roop.core import roop_interface
roop_interface(
source_img=SOURCE_PATH,
target_path=TARGET_PATH,
output_file=OUTPUT_PATH
)
Parameter | Choices | Default |
---|---|---|
frame_processor |
['face_swapper', 'face_enhancer'] |
['face_swapper'] |
keep_fps |
True , False
|
True |
keep_frames |
True , False
|
False |
skip_audio |
True , False
|
False |
many_faces |
True , False
|
False |
reference_face_position |
Number | 0 |
reference_frame_number |
Number | 0 |
similar_face_distance |
Number | 0.85 |
temp_frame_format |
'jpg', 'png' |
'png' |
temp_frame_quality |
Range [0-100]
|
0 |
output_video_encoder |
'libx264', 'libx265', 'libvpx-vp9', 'h264_nvenc', 'hevc_nvenc' |
'libx264' |
output_video_quality |
Range [0-100]
|
35 |
max_memory |
- | - |
This software is designed to contribute positively to the AI-generated media industry, assisting artists with tasks like character animation and models for clothing.
We are aware of the potential ethical issues and have implemented measures to prevent the software from being used for inappropriate content, such as nudity.
Users are expected to follow local laws and use the software responsibly. If using real faces, get consent and clearly label deepfakes when sharing. The developers aren't liable for user actions.
Our software uses a lot of third party libraries as well pre-trained models. The users should keep in mind that these third party components have their own license and terms, therefore our license is not being applied.
- deepinsight for their insightface project which provided a well-made library and models.
- all developers behind the libraries used in this project
Read the documentation for a deep dive.