{"id":48278443,"url":"https://github.com/chencore/deep-live-cam-tutorial","last_synced_at":"2026-04-07T00:00:24.148Z","repository":{"id":349133584,"uuid":"1201191913","full_name":"chencore/deep-live-cam-tutorial","owner":"chencore","description":"Deep-Live-Cam 完整安装与使用教程 - AI 换脸工具中文指南","archived":false,"fork":false,"pushed_at":"2026-04-04T10:36:13.000Z","size":4,"stargazers_count":63,"open_issues_count":0,"forks_count":12,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-05T23:03:53.201Z","etag":null,"topics":["ai","chinese","deepfake","face-swap","tutorial"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chencore.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-04T10:35:53.000Z","updated_at":"2026-04-05T21:06:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/chencore/deep-live-cam-tutorial","commit_stats":null,"previous_names":["chencore/deep-live-cam-tutorial"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chencore/deep-live-cam-tutorial","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chencore%2Fdeep-live-cam-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chencore%2Fdeep-live-cam-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chencore%2Fdeep-live-cam-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chencore%2Fdeep-live-cam-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chencore","download_url":"https://codeload.github.com/chencore/deep-live-cam-tutorial/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chencore%2Fdeep-live-cam-tutorial/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31494177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T17:22:55.647Z","status":"ssl_error","status_checked_at":"2026-04-06T17:22:54.741Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","chinese","deepfake","face-swap","tutorial"],"created_at":"2026-04-04T22:41:55.053Z","updated_at":"2026-04-07T00:00:24.110Z","avatar_url":"https://github.com/chencore.png","language":null,"readme":"# Deep-Live-Cam 完整安装与使用教程\n\n\u003e 实时 AI 换脸工具，一张图片即可实现直播/视频换脸\n\n## 这是什么？\n\nDeep-Live-Cam 是一个开源的实时人脸替换工具。\n\n**核心能力：**\n- 一张图片就能换脸\n- 实时处理，延迟极低\n- 支持直播、视频、摄像头\n- 本地运行，隐私安全\n\n**效果演示：**\n- 直播换脸\n- 视频会议虚拟形象\n- 电影实时换演员\n- 制作梗图/短视频\n\n---\n\n## 系统要求\n\n### 最低配置\n- **GPU:** NVIDIA 2060/3060 或更高（6GB 显存）\n- **或者:** AMD GPU 6GB 显存 / Apple Silicon M1/M2/M3\n- **CPU:** 也能跑，但慢（约 2-5 FPS）\n- **内存:** 16GB 推荐\n- **硬盘:** 2GB 以上（模型 + 依赖）\n\n### 推荐配置\n- NVIDIA 3080/4080 或更高（12GB+ 显存）\n- 32GB 内存\n- 可达 15-20 FPS\n\n---\n\n## 安装方法\n\n### 方法一：Quickstart 版本（新手推荐）\n\n适合：不想折腾的技术小白\n\n**优点：**\n- 解压即用\n- 不需要配置环境\n- 预装所有依赖\n\n**缺点：**\n- 需要付费订阅\n- 更新不如 GitHub 版及时\n\n**获取地址：**\ndeeplivecam.net/index.php/quickstart\n\n---\n\n### 方法二：GitHub 源码安装（免费）\n\n适合：有技术基础的用户\n\n#### Windows 安装\n\n**1. 安装前置依赖**\n\n```bash\n# 安装 Python 3.11\n# 下载地址：python.org/downloads\n\n# 安装 Git\n# 下载地址：git-scm.com/download/win\n\n# 安装 ffmpeg\n# 方法一：winget install ffmpeg\n# 方法二：从 ffmpeg.org 下载，添加到 PATH\n\n# 安装 Visual Studio 2022 Runtime\n# 下载地址：visualstudio.microsoft.com/visual-cpp-build-tools/\n```\n\n**2. 克隆项目**\n\n```bash\ngit clone https://github.com/hacksider/Deep-Live-Cam.git\ncd Deep-Live-Cam\n```\n\n**3. 下载模型文件**\n\n从 HuggingFace 下载：\n- [GFPGANv1.4.onnx](https://huggingface.co/hacksider/deep-live-cam/resolve/main/GFPGANv1.4.onnx)\n- [inswapper_128_fp16.onnx](https://huggingface.co/hacksider/deep-live-cam/resolve/main/inswapper_128_fp16.onnx)\n\n放到 `models/` 文件夹\n\n**4. 创建虚拟环境**\n\n```bash\npython -m venv venv\nvenv\\Scripts\\activate\npip install -r requirements.txt\n```\n\n**5. GPU 加速（NVIDIA）**\n\n```bash\n# 安装 CUDA Toolkit 12.8\n# 下载地址：developer.nvidia.com/cuda-12-8-0-download-archive\n\n# 安装 cuDNN v8.9.7\n# 下载地址：developer.nvidia.com/rdp/cudnn-archive\n\n# 安装 PyTorch + onnxruntime-gpu\npip install -U torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu128\npip uninstall onnxruntime onnxruntime-gpu\npip install onnxruntime-gpu==1.21.0\n```\n\n**6. 运行**\n\n```bash\npython run.py --execution-provider cuda\n```\n\n---\n\n#### macOS 安装（Apple Silicon）\n\n**1. 安装依赖**\n\n```bash\n# 安装 Python 3.11（必须是这个版本）\nbrew install python@3.11\n\n# 安装 tkinter\nbrew install python-tk@3.10\n```\n\n**2. 克隆项目**\n\n```bash\ngit clone https://github.com/hacksider/Deep-Live-Cam.git\ncd Deep-Live-Cam\n```\n\n**3. 创建虚拟环境**\n\n```bash\npython3.11 -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\n```\n\n**4. 安装 CoreML 支持**\n\n```bash\npip uninstall onnxruntime onnxruntime-silicon\npip install onnxruntime-silicon==1.13.1\n```\n\n**5. 下载模型**\n\n同 Windows，放到 `models/` 文件夹\n\n**6. 运行**\n\n```bash\npython3.10 run.py --execution-provider coreml\n```\n\n⚠️ **注意：** macOS 必须用 `python3.10` 命令，不是 `python`\n\n---\n\n#### Linux 安装\n\n```bash\n# 安装系统依赖\nsudo apt update\nsudo apt install python3.10 python3-pip git ffmpeg\n\n# 克隆项目\ngit clone https://github.com/hacksider/Deep-Live-Cam.git\ncd Deep-Live-Cam\n\n# 创建虚拟环境\npython3 -m venv venv\nsource venv/bin/activate\npip install -r requirements.txt\n\n# 下载模型到 models/ 文件夹\n# ...\n\n# CPU 运行\npython run.py\n\n# GPU 运行（需要 CUDA）\npython run.py --execution-provider cuda\n```\n\n---\n\n## 使用方法\n\n### 基本操作\n\n**1. 启动程序**\n\n```bash\npython run.py --execution-provider cuda\n```\n\n**2. 打开界面**\n\n浏览器会自动打开 `http://localhost:8080`\n\n**3. 三个步骤**\n\n1. **选择脸** - 上传一张正面清晰的照片\n2. **选择摄像头** - 选择你的 webcam\n3. **点击 Live** - 开始实时换脸\n\n### 参数说明\n\n```bash\n# 基本运行\npython run.py\n\n# 指定执行设备\npython run.py --execution-provider cuda      # NVIDIA GPU\npython run.py --execution-provider coreml    # Apple Silicon\npython run.py --execution-provider cpu       # 纯 CPU\n\n# 指定端口\npython run.py --port 8888\n\n# 处理视频文件\npython run.py --target video.mp4 --source face.jpg -o output.mp4\n```\n\n### 高级功能\n\n**Mouth Mask（嘴巴遮罩）**\n- 保留原始嘴部动作\n- 让表情更自然\n\n**Many Faces（多人换脸）**\n- 同时处理多个人脸\n- 每个人可以用不同的脸\n\n**Face Enhancer（面部增强）**\n- 使用 GFPGAN 提升面部质量\n- 修复模糊/噪点\n\n---\n\n## 常见问题\n\n### Q: 运行报错 \"No module named '_tkinter'\"\n\nmacOS 解决：\n```bash\nbrew reinstall python-tk@3.10\n```\n\n### Q: 模型加载失败\n\n检查：\n1. 模型文件是否在 `models/` 文件夹\n2. 文件名是否正确（区分大小写）\n3. 文件是否完整（重新下载）\n\n### Q: FPS 很低\n\n可能原因：\n1. 没用 GPU（检查 CUDA 是否安装正确）\n2. 显存不足（降低分辨率）\n3. CPU 性能不够\n\n### Q: 换脸效果不好\n\n建议：\n1. 使用高质量、正面的源照片\n2. 光线充足\n3. 开启 Face Enhancer\n\n### Q: 提示内容违规\n\n工具内置审核，会拒绝处理：\n- 裸露内容\n- 暴力画面\n- 敏感素材\n\n---\n\n## 道德与法律\n\n⚠️ **重要提醒：**\n\n**合法使用：**\n- 使用他人脸需要获得同意\n- 发布内容要标注是 deepfake\n- 不要用于欺诈、骚扰、诽谤\n\n**工具限制：**\n- 内置内容审核\n- 可能添加水印\n- 违规可能导致项目关闭\n\n**你的责任：**\n- 使用者需遵守当地法律\n- 开发者不对用户行为负责\n\n---\n\n## 性能参考\n\n| 配置 | FPS |\n|------|-----|\n| i9 + RTX 4090 (24GB) | 20+ |\n| i7 + RTX 3080 (10GB) | 12-15 |\n| i5 + RTX 3060 (6GB) | 8-10 |\n| Apple M2 Max | 10-12 |\n| Apple M1 | 6-8 |\n| 纯 CPU | 2-5 |\n\n---\n\n## 相关链接\n\n- **GitHub:** github.com/hacksider/Deep-Live-Cam\n- **官网:** deeplivecam.net\n- **模型下载:** huggingface.co/hacksider/deep-live-cam\n- **Discord:** 社区支持\n\n---\n\n## 更新日志\n\n- 2026-04: 支持多人同时换脸\n- 2026-03: 添加嘴巴遮罩功能\n- 2026-02: CoreML 支持 Apple Silicon\n\n---\n\n\u003e 最后更新：2026-04-04\n\u003e \n\u003e 教程作者：[你的名字]\n\u003e \n\u003e 原文链接：[待补充]\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchencore%2Fdeep-live-cam-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchencore%2Fdeep-live-cam-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchencore%2Fdeep-live-cam-tutorial/lists"}