From ecf2de404940e186ec68e6a20936db63d2507082 Mon Sep 17 00:00:00 2001 From: Danila Rukhovich Date: Tue, 26 Jul 2022 11:04:08 +0300 Subject: [PATCH] fix s3dis preprocessing --- docs/en/compatibility.md | 4 ++++ tools/data_converter/s3dis_data_utils.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/en/compatibility.md b/docs/en/compatibility.md index a4dbf2921..bfff9b0ac 100644 --- a/docs/en/compatibility.md +++ b/docs/en/compatibility.md @@ -6,6 +6,10 @@ Before mmdet3d version 1.0.0rc4 we sampled 50000 points following VoteNet prepro Please refer to the SUN RGB-D [README.md](https://github.com/open-mmlab/mmdetection3d/blob/master/data/sunrgbd/README.md/) for more details. +### Fix a small amount of missing objects during S3DIS preprocessing + +We fixed a bug in `tools/data_converter/s3dis_data_utils.py` leading to miss not more than one object per scene. Users need to regenerate the annotations with `tools/create_data.py`. + ## v1.0.0rc1 ### Operators Migration diff --git a/tools/data_converter/s3dis_data_utils.py b/tools/data_converter/s3dis_data_utils.py index 751688f7a..48f37882c 100644 --- a/tools/data_converter/s3dis_data_utils.py +++ b/tools/data_converter/s3dis_data_utils.py @@ -129,7 +129,7 @@ def get_bboxes(self, points, pts_instance_mask, pts_semantic_mask): - gt_num (int): Number of boxes. """ bboxes, labels = [], [] - for i in range(1, pts_instance_mask.max()): + for i in range(1, pts_instance_mask.max() + 1): ids = pts_instance_mask == i # check if all instance points have same semantic label assert pts_semantic_mask[ids].min() == pts_semantic_mask[ids].max()