Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IndexError: index 5484 is out of bounds for axis 0 with size 5023 #35

Open
dataangel opened this issue Mar 18, 2023 · 8 comments
Open

Comments

@dataangel
Copy link

dataangel commented Mar 18, 2023

(base) H:\ECON-master>python -m apps.infer -cfg ./configs/econ.yaml -in_dir ./examples -out_dir ./results
Traceback (most recent call last):
  File "d:\tools\anaconda3\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "d:\tools\anaconda3\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "H:\ECON-master\apps\infer.py", line 32, in <module>
    from apps.Normal import Normal
  File "H:\ECON-master\apps\Normal.py", line 2, in <module>
    from lib.common.train_util import batch_mean
  File "H:\ECON-master\lib\common\train_util.py", line 18, in <module>
    from ..dataset.mesh_util import *
  File "H:\ECON-master\lib\dataset\mesh_util.py", line 162, in <module>
    model_path=SMPLX().model_dir,
  File "H:\ECON-master\lib\dataset\mesh_util.py", line 92, in __init__
    self.smplx_front_flame_vid = self.smplx_flame_vid[np.load(self.front_flame_path)]
IndexError: index 5484 is out of bounds for axis 0 with size 5023
@YuliangXiu
Copy link
Owner

I tried to print the dim of np.load(self.front_flame_path)

print(np.load(self.front_flame_path).max())
3928

Did you download the right smpl_data/FLAME_face_mask_ids.npy?

@dataangel
Copy link
Author

dataangel commented Mar 19, 2023

image
print(np.load(self.front_flame_path).max())
10474
win11+cuda 11.7+cub 1.72

@YuliangXiu
Copy link
Owner

Interesting, could you share this file with me?

Mailto: yuliang.xiu@tue.mpg.de

@dataangel
Copy link
Author

image

@YuliangXiu
Copy link
Owner

Have a try on numpy==1.23.4

@dataangel
Copy link
Author

image

@YuliangXiu
Copy link
Owner

YuliangXiu commented Mar 19, 2023

Could you print out matrix and its shape?

>>> np.load(path)
array([  16,   17,   18, ..., 3926, 3927, 3928])
>>> np.load(path).shape
(1609,)

@dataangel
Copy link
Author

image
(base) H:\ECON-master>python
Python 3.9.13 (main, Aug 25 2022, 23:51:50) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.

import numpy as np
np.load('H:\ECON-master\lib\dataset../../data/smpl_related\smpl_data/FLAME_face_mask_ids.npy')
array([ 0, 1, 2, ..., 10472, 10473, 10474], dtype=int64)
np.load('H:\ECON-master\lib\dataset../../data/smpl_related\smpl_data/FLAME_face_mask_ids.npy').shape
(5023,)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants