OSTeC icon indicating copy to clipboard operation
OSTeC copied to clipboard

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

Open xz23333 opened this issue 2 years ago • 2 comments

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

xz23333 avatar Jan 17 '23 06:01 xz23333

Hi, did you solve the problem?

Kelu007 avatar Apr 14 '23 08:04 Kelu007

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.

1164090024 avatar Apr 23 '23 08:04 1164090024