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: too many indices for tensor of dimension 1 #1457

Open
sunghyun-nam opened this issue May 3, 2022 · 0 comments
Open

IndexError: too many indices for tensor of dimension 1 #1457

sunghyun-nam opened this issue May 3, 2022 · 0 comments
Assignees

Comments

@sunghyun-nam
Copy link

sunghyun-nam commented May 3, 2022

/home/unstruct/mmdetection3d/mmdet3d/models/backbones/mink_resnet.py:10: UserWarning: Please follow getting_started.md to install MinkowskiEngine.'Please followgetting_started.md to install MinkowskiEngine.')
/home/unstruct/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/mmdet/utils/setup_env.py:39: UserWarning: Setting OMP_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.
f'Setting OMP_NUM_THREADS environment variable for each process '
/home/unstruct/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/mmdet/utils/setup_env.py:49: UserWarning: Setting MKL_NUM_THREADS environment variable for each process to be 1 in default, to avoid your system being overloaded, please further tune the variable for optimal performance in your application as needed.
f'Setting MKL_NUM_THREADS environment variable for each process '
/home/unstruct/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/mmseg/models/losses/cross_entropy_loss.py:236: UserWarning: Default avg_non_ignore is False, if you would like to ignore the certain label and average loss over non-ignore labels, which is the same with PyTorch official cross_entropy, set avg_non_ignore=True.
'Default avg_non_ignore is False, if you would like to '
/home/unstruct/anaconda3/envs/open-mmlab/lib/python3.7/site-packages/mmcv/cnn/bricks/conv_module.py:151: UserWarning: Unnecessary conv bias before batch/instance norm
'Unnecessary conv bias before batch/instance norm')
load checkpoint from local path: work_dirs/pointnet2_ssg_16x2_cosine_50e_s3dis_seg-3d-13class/latest.pth
[>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>] 68/68, 1.1 task/s, elapsed: 61s, ETA: 0s
+---------+---------+--------+--------+--------+--------+--------+--------+--------+--------+--------+----------+--------+---------+--------+--------+---------+
| classes | ceiling | floor | wall | beam | column | window | door | table | chair | sofa | bookcase | board | clutter | miou | acc | acc_cls |
+---------+---------+--------+--------+--------+--------+--------+--------+--------+--------+--------+----------+--------+---------+--------+--------+---------+
| results | 0.9206 | 0.9706 | 0.7725 | 0.0000 | 0.1751 | 0.5143 | 0.1770 | 0.6770 | 0.7171 | 0.1873 | 0.6319 | 0.5811 | 0.4546 | 0.5215 | 0.8434 | 0.5895 |
+---------+---------+--------+--------+--------+--------+--------+--------+--------+--------+--------+----------+--------+---------+--------+--------+---------+
Traceback (most recent call last):
File "tools/test.py", line 260, in
main()
File "tools/test.py", line 256, in main
print(dataset.evaluate(outputs, **eval_kwargs))
File "/home/unstruct/mmdetection3d/mmdet3d/datasets/custom_3d_seg.py", line 359, in evaluate
self.show(pred_sem_masks, out_dir, pipeline=pipeline)
File "/home/unstruct/mmdetection3d/mmdet3d/datasets/s3dis_dataset.py", line 292, in show
pred_sem_mask = result['semantic_mask'].numpy()
IndexError: too many indices for tensor of dimension 1

====================================================================================================================================================================================================

Hello.

https://mmdetection3d.readthedocs.io/en/latest/useful_tools.html#visualization

I'm doing 'visualization' section.

python tools/test.py ${CONFIG_FILE} ${CKPT_PATH} --show --show-dir ${SHOW_DIR}

After running this command, I had neither error or warning.

And it shows output results.

python tools/test.py ${CONFIG_FILE} ${CKPT_PATH} --eval 'mAP' --eval-options 'show=True' 'out_dir=${SHOW_DIR}'

But, when I put this command, I got an ERROR message.

What should I do to solve the problem?

Thanks in advance.

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