SamsungLabs / NeuralHaircut

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error testing the example provided

carlosedubarreto opened this issue · comments

Hello, I'm trying to test using the provided that, but it returns with the following error

index 66 is out of bounds for axis 0 with size 66

I'm trying to debug but somthing is strange and I cant understadwhat is.
Can someone give me a help? thanks
image

I think I've foud the problem, the values ar duplicating
image

Now I'll try to find why ☺️

Found a solution changin a bit the information where it loads the images

    # self.images_lis = sorted(glob_imgs(os.path.join(self.data_dir, 'image')))
    self.images_lis = sorted(glob(os.path.join(self.data_dir, 'image','*.png')))

    # self.masks_lis = sorted(glob_imgs(os.path.join(self.data_dir, 'mask')))
    self.masks_lis = sorted(glob(os.path.join(self.data_dir, 'mask','*.png')))

load hair mask

    # self.hair_masks_lis = sorted(glob_imgs(os.path.join(self.data_dir, 'hair_mask')))
    self.hair_masks_lis = sorted(glob(os.path.join(self.data_dir, 'hair_mask','*.png')))

load orientations

    # self.orientations_lis = sorted(glob_imgs(os.path.join(self.data_dir, 'orientation_maps')))
    self.orientations_lis = sorted(glob(os.path.join(self.data_dir, 'orientation_maps','*.png')))

load variance

    # self.variance_lis = sorted(glob_imgs(os.path.join(self.data_dir, 'confidence_maps')))
    self.variance_lis = sorted(glob(os.path.join(self.data_dir, 'confidence_maps','*.png')))

Hello Carlos,

Thanks for investigating this issue! We'll take a look at it.

Oh I missed one thing, on the last part of the code I wrote it wrong and Vanessa corrected me.

Instead of
self.variance_lis = sorted(glob(os.path.join(self.data_dir, 'confidence_maps','*.png')))

it should be
self.variance_lis = sorted(glob(os.path.join(self.data_dir, 'confidence_maps','*.npy')))