YuliangXiu / ICON

[CVPR'22] ICON: Implicit Clothed humans Obtained from Normals
https://icon.is.tue.mpg.de
Other
1.59k stars 218 forks source link

TypeError: 'NoneType' object is not subscriptable #65

Closed Yuhuoo closed 2 years ago

Yuhuoo commented 2 years ago

(ICON) root@Ib7403870f00901c48:/hy-tmp/ICON# python -m apps.infer -cfg ./configs/pifu.yaml -gpu 0 -in_dir ./examples -out_dir ./results OMP: Info #276: omp_set_nested routine deprecated, please use omp_set_max_active_levels instead. normal environment... PIFU: w/ Global Image Encoder: True Image Features used by MLP: ['image', 'normal_F', 'normal_B'] Dim of Image Features (global): 12 Dim of Geometry Features (PIFu): 1 (z-value) Dim of MLP's first layer: 13

Using cache found in /root/.cache/torch/hub/NVIDIA_DeepLearningExamples_torchhub Using cache found in /root/.cache/torch/hub/NVIDIA_DeepLearningExamples_torchhub Using pymaf as HPS Estimator

Dataset Size: 9 Body Fitting = 0.295: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.19it/s] Body Fitting = 0.295: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 1.19it/sNone%| | 0/100 [00:00<?, ?it/s] 22097467bffc92d4a5c4246f7d4edb75: 0%| | 0/9 [00:06<?, ?it/s] Traceback (most recent call last): File "/hy-tmp/envs/ICON/lib/python3.8/runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "/hy-tmp/envs/ICON/lib/python3.8/runpy.py", line 87, in _run_code exec(code, run_globals) File "/hy-tmp/ICON/apps/infer.py", line 324, in verts_pr, facespr, = model.test_single(in_tensor) File "/hy-tmp/ICON/apps/ICON.py", line 746, in test_single verts_pr, faces_pr = self.reconEngine.export_mesh(sdf) File "/hy-tmp/ICON/lib/common/seg3d_lossless.py", line 586, in export_mesh final = occupancys[:-1, :-1, :-1].contiguous() TypeError: 'NoneType' object is not subscriptable

When I run the demo, it was be an error as above. Why was this problem happened?

YuliangXiu commented 2 years ago

I test PIFu on my machine and it works well

Attachment

If you locate and resolve the issue, please provide your hints over here, Thanks.

Yuhuoo commented 2 years ago

I have solved the problem by changing the relative path to the absolute path in configs.yaml.

ElonKou commented 1 year ago

@YuliangXiu @Yuhuoo Thanks for your great work, It seems that this doesn't really solved the question. I changed the ckpt fodler's absoluate path, It's doesn't really work, but the program failed to after inference one image. Here is the code:

(icon) dlkou@LINUX:~/DLKOU/EXP/ICON$ python3 -m apps.infer -cfg ./configs/icon-filter.yaml -gpu 0 -in_dir ./examples -out_dir ./results -export_video -loop_smpl 100 -loop_cloth 200 -hps_type pymaf ICON: w/ Global Image Encoder: True Image Features used by MLP: ['normal_F', 'normal_B'] Geometry Features used by MLP: ['sdf', 'cmap', 'norm', 'vis'] Dim of Image Features (local): 6 Dim of Geometry Features (ICON): 7 Dim of MLP's first layer: 13 Using pymaf as HPS Estimator Dataset Size: 14 Body Fitting --- normal: 0.193 | silhouette: 0.025 | Total: 0.219: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 100/100 [00:24<00:00, 4.16it/s] 0000: 0%| | 0/14 [00:43 verts_pr, faces_pr, _ = model.test_single(in_tensor) File "/home/dlkou/DLKOU/EXP/ICON/apps/ICON.py", line 683, in test_single verts_pr, faces_pr = self.reconEngine.export_mesh(sdf) File "/home/dlkou/DLKOU/EXP/ICON/lib/common/seg3d_lossless.py", line 559, in export_mesh final = occupancys[1:, 1:, 1:].contiguous() TypeError: 'NoneType' object is not subscriptable

and I got the png file, no vid files. Screenshot from 2023-03-22 22-09-03

ElonKou commented 1 year ago

@YuliangXiu @Yuhuoo Thanks for your great work, It seems that this doesn't really solved the question. I changed the ckpt fodler's absoluate path, It's doesn't really work, but the program failed to after inference one image. Here is the code:

and I got the png file, no vid files. Screenshot from 2023-03-22 22-09-03

It seems that I didn't download the whole file named "icon_data.zip", the problem have been solved when I download the file, Thanks.