Generation strand-based hairstyle from single image.
[Paper] [Project Page] [Video]
- Install CUDA 11.8
Follow the instructions on https://developer.nvidia.com/cuda-11-8-0-download-archive.
Make sure that
PATH includes <CUDA_DIR>/bin
LD_LIBRARY_PATH includes <CUDA_DIR>/lib64
The environment was tested only with this CUDA version.
- Clone repo, download checkpoints and preprocessed example data:
git clone --recurse-submodules https://github.com/Vanessik/Im2Haircut
cd Im2Haircut
chmod +x ./install.sh
./install.sh- Launch the demo:
bash ./scripts/static.sh-
Find results in the folder:
./exps_inverse_stage/try/examples/{IMG_NAME} -
Visualize results using tensorbard:
tensorboard --logdir ./exps_inverse_stage --port 6008To run the pipeline on your own images, first download the model checkpoints and install all required submodules and environments:
chmod +x ./install_submodules.sh
./install_submodules.shThen follow these steps:
-
Place your input images in
./data/new_data/img -
Compute preprocessing data (masks, orientation maps, depth maps, and cameras):
bash ./scripts/preprocess_any_data.sh- Run the main inference:
bash ./scripts/static.sh💻 Code was tested on NVIDIA A100 GPU.
This code is based on the 3D Gaussian Splatting project. For terms and conditions, please refer to LICENSE_3DGS. The rest of the code is distributed under CC BY-NC-SA 4.0.
If this code is helpful in your project, cite the papers below.
This work is based on the great projects:
-
Hairstep calculation direction map;
-
PERM basis implementation;
-
NeuS learning head signed distance function;
-
Deep3DFaceRecon_pytorch camera estimation;
-
GaussianHaircut hairstyle rasterization using gaussian splatting;
-
ml-depth-pro depth estimation;
-
VOODOO3D-official implementation of transformer architecture;
@article{sklyarova2025im2haircut,
title={Im2Haircut: Single-view Strand-based Hair Reconstruction for Human Avatars},
author=Sklyarova, Vanessa and Zakharov, Egor and Prinzler, Malte and Becherini, Giorgio and Black, Michael and Thies, Justus},
journal={ArXiv},
month={Sep},
year={2025}
}
