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

Some question on code (About the origin in class DepthInstance3DBoxes ) #24

Closed
wtt0213 opened this issue Feb 25, 2022 · 5 comments
Closed

Comments

@wtt0213
Copy link

wtt0213 commented Feb 25, 2022

Thanks for your great work, when I read the code, I have some confuse.

In the file mmdet3d/models/dense_heads/fcaf3d_neck_with_head.py, we can see function loss_single for train, and get_box_single for evaluation. I just want to know, the origin of the box predicated by network is (0.5, 0.5, 0) or (0.5, 0.5, 0.5).
Because I see that when we get the box_loss in function '_loss_single', the gt_box is convert to the class with origin(0.5, 0.5, 0.5), and the box predicated by the network do nothing(after _bbox_pred_to_bbox), then we get the loss_bbox. So we can think the p red box's origin is (0.5, 0.5, 0.5).
But when we evaluate the network, the predicated box in function '_get_box_single' is convert to box with origin(0.5, 0.5, 0.5), then the boxes are evaluated by the function('indoor_eval') with gt_box which was convert to box with origin(0.5, 0.5, 0,5)

So I confused with above code, thus, when I using the box to test some others tasks, I have no idea to use the original box or convert it to the box with origin(0.5, 0.5, 0.5)

@filaPro
Copy link
Contributor

filaPro commented Feb 25, 2022

Hi @wtt0213 ,

Both the input of the Fcaf3DNeckWithHead on training step and the output on the test step are the instances of DepthInstance3DBoxes. So for your tasks you just need to be familiar with this class, you can check its documentation here, including origin, corners, gravity_center methods to be sure where the origin is. Does this answer help?

@wtt0213
Copy link
Author

wtt0213 commented Feb 25, 2022

so what you mean is that the output of the network (pred_box) is directly with origin(0.5, 0.5, 0), which the pred_box[:3] is the center of the bottom face? or pred_box[:3] is just center of the box?

looking forward to your reply

@filaPro
Copy link
Contributor

filaPro commented Feb 25, 2022

bboxes here is the instance of DepthInstance3DBoxes. This means that it has self.tensor with self.tensor[:, :3] containing the bottom centers following DepthInstance3DBoxes documentation.

@wtt0213
Copy link
Author

wtt0213 commented Feb 25, 2022

But the box here is just a tensor, which is mismatch with the gt_box here which is a DepthInstance3DBoxes, using these two type of box to compute box_loss is confused me

@filaPro
Copy link
Contributor

filaPro commented Feb 26, 2022

This is caused by the general convention of mmdetection3d, including BaseInstance3dBoxes for exchange between dataloader, model and evaluator. However the model subparts and the losses take Tensor as an input.

@filaPro filaPro closed this as completed Mar 4, 2022
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

2 participants