YaN9-Y / lafin

LaFIn: Generative Landmark Guided Face Inpainting
148 stars 28 forks source link

fix genfromtxt bug in case one landmarks txt is provided #14

Closed ghost closed 2 years ago

ghost commented 3 years ago

Type of change

Bug fix

Description

If a flist, contains just one file (.txt) path, the load_flist function in dataset.py returns a 0-dimensional numpy array. As a result, the landmarks = np.genfromtxt(self.landmark_data[index]) command (line 105) in dataset.py fails, because a 0-dimensional numpy array can't be indexed.

To fix this, the load_flist function must return a numpy array with at least one dimension.