hawcat
文章20
标签28
分类8

文章分类

文章归档

e4s Windows复现部署教程

e4s Windows复现部署教程

fork地址:hawcat/e4s: (CVPR 2023) E4S: Fine-grained Face Swapping via Regional GAN Inversion (github.com)

Windows版本下的E4s复现指北

conda env create -f e4s_env.yaml

修改了部分linux依赖

针对环境变量有所调整

1
2
3
os.environ['KMP_DUPLICATE_LIB_OK'] = 'True'
# Optional
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..'))

你需要安装的pip库:

1.Ninja

2.pytorch+cu11x 版本没有特定要求,高于官方就行 默认torch向下兼容

你需要安装的C++编译器

1.Visual Studio 20xx

2.在x64 Native Tools Command Prompt for VS 2022激活conda环境

开始demo,目前仅测试faceswap。

E4s Replication Guide for Windows

conda env create -f e4s_env.yaml

This guide has been modified to replace some Linux dependencies and adjust environment variables for Windows.

Environment Variables Setup:

1
2
3
4
5
6
7
pythonCopy codeimport os
import sys

os.environ['KMP_DUPLICATE_LIB_OK'] = 'True'

# Optional
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..'))

Required Python Libraries:

  1. Ninja

    1
    2
    bashCopy code
    pip install ninja
  2. PyTorch with CUDA 11.x support

    • No specific version required, any version higher than the official recommendation should suffice since PyTorch is usually backward compatible.

Required C++ Compilers:

  1. Install Visual Studio 20xx (replace ‘xx’ with the appropriate version number).
  2. Activate your conda environment within the “x64 Native Tools Command Prompt for VS 20xx”.

Demo:

As of now, only the faceswap has been tested.


To install the mentioned libraries and set up the required environment, follow the steps provided above.

(Note: Some specific details, such as the version number for Visual Studio or additional instructions, might need further clarification based on the user’s requirements or the specific context in which this guide is being provided.)

总结

效果很好,通用化需要一个比较好的face parsing模型。

:D 获取中...

本文作者:hawcat
本文链接:https://hawcat.cn/2023/09/11/e4s/
版权声明:本文采用 CC BY-NC-SA 3.0 CN 协议进行许可
×