提升观众体验

  • 新奇与趣味:实时换脸能将主播的脸实时替换成各种动漫角色或奇幻形象。例如,直播游戏时,瞬间变成热门动漫角色进行游戏解说,这种奇特的视觉效果会让观众眼前一亮,增加直播的趣味性和吸引力,使观众更容易沉浸在直播内容中。

开源项目介绍

直播试试替换任意脸

安装方法

 项目地址:GitHub Pages | Websites for you and your projects, hosted directly from your GitHub repository. Just edit, push, and your changes are live.

 运行环境安装 pip install -r requirements.txt

国内镜像地址

GitCode - 全球开发者的开源社区,开源代码托管平台GitCode是面向全球开发者的开源社区,包括原创博客,开源代码托管,代码协作,项目管理等。与开发者社区互动,提升您的研发效率和质量。https://gitcode.com/gh_mirrors/de/Deep-Live-Cam

国内模型镜像

inswapper_128_fp16.onnx

https://dl.aifasthub.com/datasets/Gourieff/ReActor/tree/main/models

GFPGANv1.4

Neus/GFPGANv1.4 at main

GPU加速

* In case something goes wrong and you need to reinstall the virtual environment **

# Deactivate the virtual environment
rm -rf venv

# Reinstall the virtual environment
python -m venv venv
source venv/bin/activate

# install the dependencies again
pip install -r requirements.txt

Run: If you don't have a GPU, you can run Deep-Live-Cam using python run.py. Note that initial execution will download models (~300MB).

GPU Acceleration

CUDA Execution Provider (Nvidia)

  1. Install CUDA Toolkit 11.8.0
  2. Install dependencies:
pip uninstall onnxruntime onnxruntime-gpu
pip install onnxruntime-gpu==1.16.3
  1. Usage:
python run.py --execution-provider cuda

CoreML Execution Provider (Apple Silicon)

Apple Silicon (M1/M2/M3) specific installation:

  1. Make sure you've completed the macOS setup above using Python 3.10.
  2. Install dependencies:
pip uninstall onnxruntime onnxruntime-silicon
pip install onnxruntime-silicon==1.13.1
  1. Usage (important: specify Python 3.10):
python3.10 run.py --execution-provider coreml

使用方法

首次运行会自动下载一些模型。程序启动后,按界面指示选择源图片与目标图像/视频,点击开始即可。对于实时摄像头模式,只需选择脸孔并等待预览。

Logo

DAMO开发者矩阵,由阿里巴巴达摩院和中国互联网协会联合发起,致力于探讨最前沿的技术趋势与应用成果,搭建高质量的交流与分享平台,推动技术创新与产业应用链接,围绕“人工智能与新型计算”构建开放共享的开发者生态。

更多推荐