3D Strand-Based Hair Generation and Editing System: Using HairStep to Generate Hair from Images and Export Editable and Applicable Files
Anaconda 3, Blender 4.3
git clone --recursive https://github.com/asd56585452/3D-hair-reconstruction-interface.git
cd 3D-hair-reconstruction-interface
cd HairStep
conda env create -f environment.yml
conda activate hairstep
pip install torch==1.9.0+cpu torchvision==0.10.0+cpu torchaudio==0.9.0 -f https://download.pytorch.org/whl/torch_stable.html
pip install -r requirements.txt
cd external/3DDFA_V2
sh ./build.sh
cd ../../
cd ..
rm -r HairStep/results
pip install PyQt6==6.2.3
pip install pyrr
pip install PyOpenGL
cp -r HairStepCpuPatch/* HairStep
cd grid_less
sudo apt-get install libxcb-cursor0
Next, download the model files from the HairStep GitHub repository.
Download the SAM checkpoint and place it in ./HairStep/checkpoints/SAM-models/.
Download the 3D networks checkpoint and place it in ./HairStep/checkpoints/recon3D/.
Then, execute the following command (make sure to run the command in the ./grid_less/ folder):
python grid_slicer.py
The code has been tested on Ubuntu 24.04 LTS.
If you encounter an "ld" error while running "sh ./build.sh", it could be due to an issue with anaconda3/envs/hairstep/compiler_compat/ld. You can delete it. Refer to: