barisgecer / OSTeC

TF implementation of our CVPR 2021 paper: OSTeC: One-Shot Texture Completion
https://openaccess.thecvf.com/content/CVPR2021/html/Gecer_OSTeC_One-Shot_Texture_Completion_CVPR_2021_paper.html
Other
188 stars 28 forks source link

IndexError: index 0 is out of bounds for axis 0 with size 0` #28

Open xz23333 opened 1 year ago

xz23333 commented 1 year ago

Hello, some input images have such an error, do you know why? Hope to get an answer, thank you very much!

Traceback (most recent call last): File "run_ostec.py", line 98, in main(args) File "run_ostec.py", line 73, in main final_uv, results_dict = operator.run(img, fitting, face_mask) File "/data/code/OSTeC/core/operator.py", line 351, in run face = self.get_tmesh(im, reconstruction_dict, face_mask) File "/data/code/OSTeC/core/operator.py", line 207, in get_tmesh im_masked = fill_UV(im_PIL2menpo(im_masked)) File "/data/code/OSTeC/utils/utils.py", line 132, in fill_UV result = interp(np.ravel(xx[mask]), np.ravel(yy[mask])) File "/data/anaconda3/envs/ostec/lib/python3.6/site-packages/scipy/interpolate/ndgriddata.py", line 79, in call return self.values[i] IndexError: index 0 is out of bounds for axis 0 with size 0

Kelu007 commented 1 year ago

Hi, did you solve the problem?

1164090024 commented 1 year ago

It seems a problem with facial detection, so I used the commented try/exception statement(try: # To avoid detection errors on large datasets) to solve the problem.