FaceFusion – 免费AI换脸工具(含教程)

FaceFusion(免费AI换脸工具)简介

FaceFusion是一个免费AI换脸工具,这是一个免费开源项目,利用AI深度学习技术实现AI换脸,该工具通过人脸识别、表情跟踪、换脸三步走的形式实现AI换脸功能。我们只需要准备两张人脸图片,通过这款软件就可以将其中一张脸用另一张替换,生成逼真的换脸图片以及换脸视频。该工具支持输入图片和视频,输出结果细节丰富,可自定义多个参数。它拥有简洁的界面,支持批量处理,使用灵活,为创作者提供了强大的换脸处理功能,但务必在使用的时候确保用途合法合规。

使用python开发,把项目下载到本地,然后安装必须的依赖包requirements.txt,然后运行run.py即可,安装需要一点点Python等等相关技术技能,不适合初学者哈,感兴趣的同学可以学习研究。

FaceFusion(免费AI换脸工具)下载及教程

FaceFusion - 免费AI换脸工具(含教程)

1、下载源代码压缩包并解压缩。

2、解压后进入文件夹,安装所需依赖: pip install -r requirements.txt

python run.py [options]

-h, --help show this help message and exit
-s SOURCE_PATH, --source SOURCE_PATH select a source image
-t TARGET_PATH, --target TARGET_PATH select a target image or video
-o OUTPUT_PATH, --output OUTPUT_PATH specify the output file or directory
--frame-processors FRAME_PROCESSORS [FRAME_PROCESSORS ...] choose from the available frame processors (choices: face_enhancer, face_swapper, frame_enhancer, ...)
--ui-layouts UI_LAYOUTS [UI_LAYOUTS ...] choose from the available ui layouts (choices: benchmark, default, ...)
--keep-fps preserve the frames per second (fps) of the target
--keep-temp retain temporary frames after processing
--skip-audio omit audio from the target
--face-recognition {reference,many} specify the method for face recognition
--face-analyser-direction {left-right,right-left,top-bottom,bottom-top,small-large,large-small} specify the direction used for face analysis
--face-analyser-age {child,teen,adult,senior} specify the age used for face analysis
--face-analyser-gender {male,female} specify the gender used for face analysis
--reference-face-position REFERENCE_FACE_POSITION specify the position of the reference face
--reference-face-distance REFERENCE_FACE_DISTANCE specify the distance between the reference face and the target face
--reference-frame-number REFERENCE_FRAME_NUMBER specify the number of the reference frame
--trim-frame-start TRIM_FRAME_START specify the start frame for extraction
--trim-frame-end TRIM_FRAME_END specify the end frame for extraction
--temp-frame-format {jpg,png} specify the image format used for frame extraction
--temp-frame-quality [0-100] specify the image quality used for frame extraction
--output-video-encoder {libx264,libx265,libvpx-vp9,h264_nvenc,hevc_nvenc} specify the encoder used for the output video
--output-video-quality [0-100] specify the quality used for the output video
--max-memory MAX_MEMORY specify the maximum amount of ram to be used (in gb)
--execution-providers {cpu} [{cpu} ...] choose from the available execution providers (choices: cpu, ...)
--execution-thread-count EXECUTION_THREAD_COUNT specify the number of execution threads
--execution-queue-count EXECUTION_QUEUE_COUNT specify the number of execution queries
-v, --version show program's version number and exit

相关文章