SamsungLabs / NeuralHaircut

Neural Haircut: Prior-Guided Strand-Based Hair Reconstruction. ICCV 2023

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Experiment folder cannot be crated on Windows

Andrej-sens opened this issue · comments

The experiment folder cannot be created when launching
python run_geometry_reconstruction.py --case person_0 --conf ./configs/example_config/neural_strands-monocular.yaml --exp_name first_stage_person_0
due to colons in the file path.
Error:
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'exps_first_stage\\first_stage_person_0\\person_0\\neural_strands-monocular\\2023-07-25_20:08:00'

I went around that by adding the line in the run_geometry_reconstruction.py
time = time.replace(':','_')

Hey did u managed to run the script on windows eventually? Also seems like this is the first windows thread haha, do u mind to share how u setup the environment for it?

Hi, I have that error too, could you share me about how did you solve it ? Do you think can we use our own dataset ? (Single Image)

Hi,
I can share my environment setup. I'm still testing scripts so can happen that I forgot something but so far:

Windows 10
Python 3.10
Pip 22.2.1
Pytorch 2.0.1
CUDA 11.8
RTX 3090

I followed your steps, updated the libraries with git submodule update --init --recursive and cd npbgpp && python setup.py build develop. Eventually, this crashed on pytorch3d that is not supported on Windows with pip (not sure about conda). Therefore, I installed it manually by following steps here (pytorch3d 0.7.4).

I installed any other pip module that I was missing and I had to update packages and imports in the scripts, for example I replaced from pytorch_lightning.metrics import Metric to from torchmetrics import Metric as it seems that pytorch_lightning.metrics is outdated.

I run the mentioned script python run_geometry_reconstruction.py --case person_0 --conf ./configs/example_config/neural_strands-monocular.yaml --exp_name first_stage_person_0 and replaced the colons int he path with different character, I used underscore. Moreover, the dataset loader is loading images with multiple extensions in src/utils/util.py .

def glob_imgs(path):
    imgs = []
    for ext in  ['*.jpg', '*.JPEG', '*.JPG', '*.png', '*.PNG', '*.npy', '*.NPY']:
        imgs.extend(glob(os.path.join(path, ext)))
    return imgs

Extension such as '*.png', '*.PNG', will cause another crash in dataset loader because Windows does not distinguish between lower and upper case extensions. It will create duplicates in dataset loader and you end up with more images then cameras.

After these updates I managed to run the run_geometry_reconstruction.py but I didn't finish it yet as it takes 60+ hours. I am not sure how long does it take on Linux to finish that script. What is the average time to run it for 300000 iterations?

@Andrej-sens Thanks for sharing on launching code on Windows! Unfortunately, I could test the code only on Linux and haven't tried it on Windows yet.

Regarding, the training time it highly depends on the used GPU. In my case, I could use RTX 4090 and it took around 1 day, for RTX 3090 maybe 30 hours. You could try to decrease the number of timesteps to 100000 iterations and it would still provide reasonable reconstructions.