HuXiaoling / TopoLoss

Code for the NeurIPS 2019 paper: Topology-Preserving Deep Image Segmentation
MIT License
146 stars 22 forks source link

Indentation issue in topoloss_pytorch.py #10

Closed mrenzo96 closed 2 years ago

mrenzo96 commented 2 years ago

Hello, @HuXiaoling. Thank you for providing this code! I just have a question about the getTopoLoss function on the topoloss_pytorch.py script:

The lines 220-225: https://github.com/HuXiaoling/TopoLoss/blob/bbf9d2699cbd76dabe113e8be810c56aa40a8e06/topoloss_pytorch.py#L220-L225 have 2 indentations, which means that they are currently inside the for loop in line 160: https://github.com/HuXiaoling/TopoLoss/blob/bbf9d2699cbd76dabe113e8be810c56aa40a8e06/topoloss_pytorch.py#L160

Shouldn't they be outside the y for loop to get the total topological loss for the image?

HuXiaoling commented 2 years ago

Thanks for pointing out this stupid error! Already fixed both for topoloss.py and topoloss_pytorch.py