haofengac / MonoDepth-FPN-PyTorch

Single Image Depth Estimation with Feature Pyramid Network
MIT License
327 stars 69 forks source link

Angle Based loss versus cosine inverse loss #8

Open rohun-tripathi opened 6 years ago

rohun-tripathi commented 6 years ago

Thanks for your great work!

Have you experimented with arccos based normal loss. Does the performance vary when using arccos instead of (1 - normalized inner product)?

The code I am referring to is -

prod = ( grad_fake[:,:,None,:] @ grad_real[:,:,:,None] ).squeeze(-1).squeeze(-1) fake_norm = torch.sqrt( torch.sum( grad_fake2, dim=-1 ) ) real_norm = torch.sqrt( torch.sum( grad_real2, dim=-1 ) )