daerduoCarey / PyTorchEMD

PyTorch Wrapper for Earth-Mover-Distance (EMD) for 3D point cloud regression
288 stars 56 forks source link

EMD still very large and increases throughout training #5

Open davezdeng8 opened 4 years ago

davezdeng8 commented 4 years ago

Hi, Similar to some of the other issues posted, I'm getting a very large EMD. I divided by the number of points but ended up with an EMD of around 26 for a Chamfer Distance of around .1. I'm working with n = 22000 points. In addition, if I use EMD as my loss and backpropogate, the loss ends up increasing, whereas it went down with Chamfer Distance. Any advice? Thanks!

daerduoCarey commented 4 years ago

This is definitely possible that you get a small CD and a big EMD. Please check the definition for more details. For example, S1 = {(1, 0, 0) x 1, (0, 0, 1) x 100} and S2 = {(1, 0, 0) x 100, (0, 0, 1) x 1}. The CD is 0 between S1 and S2, but the EMD is 0.98.

davezdeng8 commented 4 years ago

Thanks for your response! Do you have any idea why EMD seems more difficult to optimize than Chamfer Distance? I've been trying to use EMD as a loss but even if I make the learning rate really small the model still ends up diverging. On the other hand, if I use Chamfer Distance the model converges extremely fast. I'm not too familiar with the algorithm you're using and how it would affect the optimization landscape, but could it have anything to do with that? Thanks!