6DRepNet360 icon indicating copy to clipboard operation
6DRepNet360 copied to clipboard

evaluate mae

Open geoffzhang opened this issue 1 year ago • 3 comments

Hello, I have a question about the method of calculating mae. The below is coded in your code. """ += torch.sum(torch.min(torch.stack((torch.abs(p_gt_deg - p_pred_deg), torch.abs(p_pred_deg + 360 - p_gt_deg), torch.abs( p_pred_deg - 360 - p_gt_deg), torch.abs(p_pred_deg + 180 - p_gt_deg), torch.abs(p_pred_deg - 180 - p_gt_deg))), 0)[0]) yaw_error += torch.sum(torch.min(torch.stack((torch.abs(y_gt_deg - y_pred_deg), torch.abs(y_pred_deg + 360 - y_gt_deg), torch.abs( y_pred_deg - 360 - y_gt_deg), torch.abs(y_pred_deg + 180 - y_gt_deg), torch.abs(y_pred_deg - 180 - y_gt_deg))), 0)[0]) roll_error += torch.sum(torch.min(torch.stack((torch.abs(r_gt_deg - r_pred_deg), torch.abs(r_pred_deg + 360 - r_gt_deg), torch.abs( r_pred_deg - 360 - r_gt_deg), torch.abs(r_pred_deg + 180 - r_gt_deg), torch.abs(r_pred_deg - 180 - r_gt_deg))), 0)[0]) """ I don't understand why to use " torch.abs(p_pred_deg + 180 - p_gt_deg), torch.abs(p_pred_deg - 180 - p_gt_deg)". For example, if p_pred_deg=10 and p_gt_deg=170, the error should be 160. But if I calculate it use your method, the error is 20.

geoffzhang avatar May 17 '24 02:05 geoffzhang

@thohemp

geoffzhang avatar May 22 '24 01:05 geoffzhang

https://github.com/thohemp/6DRepNet360/issues/2#issuecomment-1798445673

awarebayes avatar May 22 '24 14:05 awarebayes

Thanks @geoffzhang @awarebayes This seems indeed odd, I will investigate this.

thohemp avatar May 22 '24 14:05 thohemp