cvg / DeepLSD

Implementation of the paper "DeepLSD: Line Segment Detection and Refinement with Deep Image Gradients"
MIT License
486 stars 62 forks source link

Question about angle field’s loss function #36

Open KunningZheng opened 7 months ago

KunningZheng commented 7 months ago

Hello, thank you for your work. I tried drawing the plot of the angle field’s loss function with a fixed groundtruth A and found the following problem. I am wondering if I have misunderstood something in the paper.

cf1f6d4de8db797744e01b9a2746623
rpautrat commented 7 months ago

Hi, I think that you are correct. The prediction in your example will converge to 0 and stay stuck there, so the loss is not optimal indeed.

I think that the second part of the loss was added at a time when the predicted angle was in [0, 2pi], but this is not the case anymore. So changing the loss directly to ||\hat{A} - A|| should work better. Thank you very much for reporting this!