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

Differenct coordinate setting in gt_bboxes and bboxes_preds #48

Open
nacayu opened this issue Jul 24, 2022 · 3 comments
Open

Differenct coordinate setting in gt_bboxes and bboxes_preds #48

nacayu opened this issue Jul 24, 2022 · 3 comments

Comments

@nacayu
Copy link

nacayu commented Jul 24, 2022

Hello, thanks for your excellent work.
I have some questions about your work, In detr3d_head.py, the prediction coordinate is :

            tmp[..., 0:2] += reference[..., 0:2]
            tmp[..., 0:2] = tmp[..., 0:2].sigmoid()
            tmp[..., 4:5] += reference[..., 2:3]
            tmp[..., 4:5] = tmp[..., 4:5].sigmoid()
            tmp[..., 0:1] = (tmp[..., 0:1] * (self.pc_range[3] - self.pc_range[0]) + self.pc_range[0])
            tmp[..., 1:2] = (tmp[..., 1:2] * (self.pc_range[4] - self.pc_range[1]) + self.pc_range[1])
            tmp[..., 4:5] = (tmp[..., 4:5] * (self.pc_range[5] - self.pc_range[2]) + self.pc_range[2])

According to the above setting, the tmp[...,:2] is x,y, and the 4th dim is z.
But in ground truth setting:
The gt_bboxes_3d[...,:3] is x,y,z which is conflict with the prediction bboxes of dimension setting.

        if self.with_velocity:
            gt_velocity = info['gt_velocity'][mask]
            nan_mask = np.isnan(gt_velocity[:, 0])
            gt_velocity[nan_mask] = [0.0, 0.0]
            gt_bboxes_3d = np.concatenate([gt_bboxes_3d, gt_velocity], axis=-1)

How to explain it?

@a1600012888
Copy link

Hi, see the normalize and denonormalize function here: https://github.com/WangYueFt/detr3d/blob/main/projects/mmdet3d_plugin/core/bbox/util.py#L26

There are processes where we convert the format of the box using there two functions.

@nacayu
Copy link
Author

nacayu commented Aug 9, 2022

@a1600012888 Thanks

@chyohoo
Copy link

chyohoo commented Dec 15, 2022

hello, in normalize_bbox, why log the w,h,l for loss calculating?

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

3 participants