GaussianHaircut/README.md

122 lines
3.9 KiB
Markdown
Raw Normal View History

2025-02-14 01:50:52 +08:00
# Gaussian Haircut使用股线对齐 3D 高斯模型进行人体头发重建
2025-02-14 00:44:47 +08:00
2025-02-14 01:50:52 +08:00
[**论文**](https://arxiv.org/abs/2409.14778) | [**项目页面**](https://eth-ait.github.io/GaussianHaircut/)
2025-02-14 00:44:47 +08:00
2025-02-14 01:50:52 +08:00
本仓库包含了 Gaussian Haircut 的官方实现,这是一种基于股线的人体头发重建方法,用于单目视频。
2025-02-14 00:44:47 +08:00
2025-02-14 01:50:52 +08:00
## 入门指南
2025-02-14 00:44:47 +08:00
2025-02-14 01:50:52 +08:00
### Linux 平台
2025-02-14 00:44:47 +08:00
2025-02-14 01:50:52 +08:00
1. **安装 CUDA 11.8**
2025-02-14 00:44:47 +08:00
2025-02-14 01:50:52 +08:00
按照 https://developer.nvidia.com/cuda-11-8-0-download-archive 上的说明进行操作。
2025-02-14 00:44:47 +08:00
2025-02-14 01:50:52 +08:00
确保:
- PATH 包含 <CUDA_DIR>/bin
- LD_LIBRARY_PATH 包含 <CUDA_DIR>/lib64
2025-02-14 00:44:47 +08:00
2025-02-14 01:50:52 +08:00
该环境仅在此 CUDA 版本下进行了测试。
2025-02-14 00:44:47 +08:00
2025-02-14 01:50:52 +08:00
2. **安装 Blender 3.6** 以创建股线可视化
2025-02-14 00:44:47 +08:00
2025-02-14 01:50:52 +08:00
按照 https://www.blender.org/download/lts/3-6 上的说明进行操作。
3. **克隆仓库并运行安装脚本**
2025-02-14 00:44:47 +08:00
```bash
git clone git@github.com:eth-ait/GaussianHaircut.git
cd GaussianHaircut
chmod +x ./install.sh
./install.sh
```
2025-02-14 01:50:52 +08:00
### Windows 平台
1. **安装 CUDA 11.8**
- 从 https://developer.nvidia.com/cuda-11-8-0-download-archive 下载并安装
- 默认安装路径C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.8
2. **安装 Blender 3.6**
- 从 https://www.blender.org/download/lts/3-6 下载并安装
- 默认安装路径C:\Program Files\Blender Foundation\Blender 3.6
3. **安装 Visual Studio 2019 Build Tools**
- 从 https://visualstudio.microsoft.com/vs/older-downloads/ 下载并安装
- 选择"C++构建工具"工作负载
- 默认安装路径C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
4. **安装 COLMAP**
- 从 https://github.com/colmap/colmap/releases 下载并安装
- 确保将COLMAP添加到系统PATH环境变量中
5. **安装 micromamba**
- 从 https://mamba.readthedocs.io/en/latest/installation.html 下载并安装
6. **克隆仓库并运行安装脚本**
```cmd
git clone git@github.com:eth-ait/GaussianHaircut.git
cd GaussianHaircut
install.bat
```
2025-02-14 00:44:47 +08:00
2025-02-14 01:50:52 +08:00
## 重建
2025-02-14 00:44:47 +08:00
2025-02-14 01:50:52 +08:00
1. **录制单目视频**
2025-02-14 00:44:47 +08:00
2025-02-14 01:50:52 +08:00
参考项目页面上的示例,并尽可能减少运动模糊。
2025-02-14 00:44:47 +08:00
2025-02-14 01:50:52 +08:00
2. **设置重建场景的目录**
2025-02-14 00:44:47 +08:00
2025-02-14 01:50:52 +08:00
将视频文件放入其中,并将其重命名为 raw.mp4
2025-02-14 00:44:47 +08:00
2025-02-14 01:50:52 +08:00
3. **运行脚本**
Linux:
2025-02-14 00:44:47 +08:00
```bash
export PROJECT_DIR="[/path/to/]GaussianHaircut"
export BLENDER_DIR="[/path/to/blender/folder/]blender"
DATA_PATH="[path/to/scene/folder]" ./run.sh
```
2025-02-14 01:50:52 +08:00
Windows:
```cmd
set PROJECT_DIR=[path\to\]GaussianHaircut
set DATA_PATH=[path\to\scene\folder]
run.bat
2025-02-14 02:19:55 +08:00
# 或在PowerShell中运行:
set PROJECT_DIR=[path\to\]GaussianHaircut
set DATA_PATH=[path\to\scene\folder]
.\run.bat
2025-02-14 01:50:52 +08:00
```
该脚本执行数据预处理、重建以及使用 Blender 进行最终可视化。使用 Tensorboard 查看中间可视化结果。
2025-02-14 00:44:47 +08:00
2025-02-14 01:50:52 +08:00
## 许可证
2025-02-14 00:44:47 +08:00
2025-02-14 01:50:52 +08:00
此代码基于 3D Gaussian Splatting 项目。有关条款和条件,请参阅 LICENSE_3DGS。其余代码根据 CC BY-NC-SA 4.0 分发。
2025-02-14 00:44:47 +08:00
2025-02-14 01:50:52 +08:00
如果此代码对您的项目有帮助,请引用以下论文。
2025-02-14 00:44:47 +08:00
2025-02-14 01:50:52 +08:00
## 引用
2025-02-14 00:44:47 +08:00
```
@inproceedings{zakharov2024gh,
title = {Human Hair Reconstruction with Strand-Aligned 3D Gaussians},
author = {Zakharov, Egor and Sklyarova, Vanessa and Black, Michael J and Nam, Giljoo and Thies, Justus and Hilliges, Otmar},
booktitle = {European Conference of Computer Vision (ECCV)},
year = {2024}
}
```
2025-02-14 01:50:52 +08:00
## 链接
2025-02-14 00:44:47 +08:00
- [3D Gaussian Splatting](https://github.com/graphdeco-inria/gaussian-splatting)
2025-02-14 01:50:52 +08:00
- [Neural Haircut](https://github.com/SamsungLabs/NeuralHaircut): FLAME 拟合管线、股线先验和发型扩散先验
- [HAAR](https://github.com/Vanessik/HAAR): 头发上采样
- [Matte-Anything](https://github.com/hustvl/Matte-Anything): 头发和身体分割
- [PIXIE](https://github.com/yfeng95/PIXIE): FLAME 拟合的初始化
- [Face-Alignment](https://github.com/1adrianb/face-alignment), [OpenPose](https://github.com/CMU-Perceptual-Computing-Lab/openpose): 用于 FLAME 拟合的关键点检测