SA-SSD icon indicating copy to clipboard operation
SA-SSD copied to clipboard

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

Open Son-Goku-gpu opened this issue 4 years ago • 3 comments

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!

Son-Goku-gpu avatar Aug 18 '20 03:08 Son-Goku-gpu

@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.

skyhehe123 avatar Aug 19 '20 02:08 skyhehe123

@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 avatar Aug 19 '20 02:08 Son-Goku-gpu

@skyhehe123 Any update? Thanks!

Son-Goku-gpu avatar Aug 24 '20 01:08 Son-Goku-gpu