SamsungLabs / NeuralHaircut

Neural Haircut: Prior-Guided Strand-Based Hair Reconstruction. ICCV 2023
Other
516 stars 48 forks source link

Error testing the example provided #4

Closed carlosedubarreto closed 1 year ago

carlosedubarreto commented 1 year ago

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

carlosedubarreto commented 1 year ago

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

Now I'll try to find why ☺️

carlosedubarreto commented 1 year ago

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')))
egorzakharov commented 1 year ago

Hello Carlos,

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

carlosedubarreto commented 1 year ago

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')))