garrickbrazil / kinematic3d

97 stars 35 forks source link

the orientation decompose seems to fail according to the log ? #1

Closed kaixinbear closed 4 years ago

kaixinbear commented 4 years ago

Hi, thanks for your great work . I train your project with mirror modification in network and loss. And I find something strange when seeing the training log. The axis and head accuracy is always around 0.50. It is the normal case that the acc of axis and head would converge to 1, right? image I wonder to know is this two item around 0.5 a strange phenomenon? Thanks.

garrickbrazil commented 4 years ago

Hi and thank you!

No, this is not a normal phenomenon. Usually the axis and heading rise in accuracy pretty quickly, especially the axis which is intuitively easier.

Can I ask what modification did you make and does this occurrence happen without the change on your system?

kaixinbear commented 4 years ago

Tnanks for reply. I use focal loss to replace ce loss, and I modify the loss.py from

if self.decomp_alpha:
   loss_bbox_3d_init += float((loss_axis[torch.isfinite(loss_axis)].mean()
                                                    + loss_head[torch.isfinite(loss_head)].mean()).item())*self.bbox_axis_head_lambda

if self.decomp_alpha and self.orientation_bins <= 0:
    bbox_3d_loss += (loss_axis.mean() + loss_head.mean())*self.bbox_axis_head_lambda

to


if self.decomp_alpha :
    bbox_3d_loss += float((loss_axis[torch.isfinite(loss_axis)].mean()
                                    + loss_head[torch.isfinite(loss_head)].mean()).item()) *self.bbox_axis_head_lambda

Would this modification affect the backprop of loss?

garrickbrazil commented 4 years ago

Thanks to your comment, I caught a minor bug in the config file that was uploaded in the initial commit. I have just updated it. It wrongly included the "orientation_bins" value to be set to a value > 0 and referenced a different model.

Can you check to see if this change solves your axis/heading acc?

kaixinbear commented 4 years ago

I see your updates and the acc of head/axis converges to 1 normally. Thanks.