skyhehe123 / SA-SSD

SA-SSD: Structure Aware Single-stage 3D Object Detection from Point Cloud (CVPR 2020)
492 stars 106 forks source link

Possible Misorder of [width, height, length] in gt_bboxes? #67

Open Son-Goku-gpu opened 4 years ago

Son-Goku-gpu commented 4 years ago

Hi, @skyhehe123

I read your source code and find it reads gt_bboxes in line 36 of mmdet/datasets/kitti_utils.py with

self.box3d = np.array( [data[11], data[12], data[13], data[9], data[10], data[8], data[14]]).astype(np.float32)

so the input dimension has the order of [w, l, h].

While when computing the center offset for the auxiliary task, it calculate the targets of center offset in line 139 of mmdet/ops/points_op/src/points_op.cpp with

reg_target_flat[j*3+2] = pts_flat[j*3+2] - (boxes3d_flat[i*7+2] + boxes3d_flat[i*7+3] / 2.0),

which seems take the width (boxes3d_flat[i*7+3] ) as height (boxes3d_flat[i*7+5] ) mistakely, as I didn't find related order transformation of dimensions in the data processing. Did I miss some code for such a transformation? Thanks!

skyhehe123 commented 4 years ago

@Son-Goku-gpu. The dimension order is not changed, yet the x,y,z is transformed. The x,y,z in rect coordinates correspond, y,z,x in velo coordinates.

Son-Goku-gpu commented 4 years ago

@skyhehe123 I see. While if the dimension order is not changed, then the regression target of a point (denoted as [x', y', z']) for the box (denoted as [x, y, z, w, l, h, ry]) center should be: (x'-x, y'-y, z'-(z+h/2)), and h is with index of 5 (boxes3d_flat[i7+5]), while it uses boxes3d_flat[i7+3] ( actually width) as I mentioned in the source .cpp file, am I right?

Son-Goku-gpu commented 4 years ago

@skyhehe123 Any update? Thanks!