-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Open
Labels
Description
Thanks for your error report and we appreciate it a lot.
Checklist
- I have searched related issues but cannot get the expected help.
- The bug has not been fixed in the latest version.
Describe the bug
An error about tools/create_data.py on s3dis dataset
Reproduction
- What command or script did you run?
python tools/create_data.py s3dis --root-path ./data/s3dis --out-dir ./data/s3dis --extra-tag s3dis
- Did you make any modifications on the code or config? Did you understand what you have modified?
- What dataset did you use?
Environment
- Please run
python mmdet3d/utils/collect_env.py
to collect necessary environment information and paste it here. - You may add addition that may be helpful for locating the problem, such as
- How you installed PyTorch [e.g., pip, conda, source]
- Other environment variables that may be related (such as
$PATH
,$LD_LIBRARY_PATH
,$PYTHONPATH
, etc.)
master/v1.0.0rc5
Error traceback
s3dis info Area_1 file is saved to ./data/s3dis\s3dis_infos_Area_1.pkl
Traceback (most recent call last):
File "E:\mmdetection3d\tools\create_data.py", line 302, in <module>
s3dis_data_prep(
File "E:\mmdetection3d\tools\create_data.py", line 133, in s3dis_data_prep
indoor.create_indoor_info_file(
File "e:\mmdetection3d\tools\data_converter\indoor_converter.py", line 121, in create_indoor_info_file
seg_dataset.get_seg_infos()
File "e:\mmdetection3d\tools\data_converter\s3dis_data_utils.py", line 194, in get_seg_infos
scene_idxs, label_weight = self.get_scene_idxs_and_label_weight()
File "e:\mmdetection3d\tools\data_converter\s3dis_data_utils.py", line 226, in get_scene_idxs_and_label_weight
label = self._convert_to_label(
File "e:\mmdetection3d\tools\data_converter\s3dis_data_utils.py", line 212, in _convert_to_label
label = self.cat_id2class[mask]
IndexError: index 12884901891 is out of bounds for axis 0 with size 13
Bug fix
If you have already identified the reason, you can provide the information here. If you are willing to create a PR to fix it, please also leave a comment here and that would be much appreciated!
tools/data_converter/s3dis_data_utils.py, line 81, 82
pts_instance_mask = np.load(pts_instance_mask_path).astype(np.int)
pts_semantic_mask = np.load(pts_semantic_mask_path).astype(np.int)
should be changed to
pts_instance_mask = np.load(pts_instance_mask_path).astype(np.int64)
pts_semantic_mask = np.load(pts_semantic_mask_path).astype(np.int64)