HuXiaoling / TopoLoss

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

Debug problems #15

Open ClingZhang opened 2 years ago

ClingZhang commented 2 years ago

Hello! First of all thanks for sharing your code. Use your topological loss as follows: *loss = nn.CrossEntropyLoss() + lambda getTopoLoss(lh, gt)**. In the process of code debugging, there are several questions I would like to ask you:

  1. The gt image has only a single connected domain. Is it not recommended to block the image, otherwise it cannot be guaranteed that the connected domains after the block are continuous on the overall image;
  2. If the image needs to be divided into blocks, whether it is necessary to mark the background color around the divided image, there seems to be no such part in topoloss.py;
  3. lh_cubic.persistence(homology_coeff_field=2, min_persistence=0), whether the min_persistence here needs to be debugged for the input image.

At present, during the running of the code, I don't know if the topological constraint is not very effective because gt has only one connected domain. Looking forward to your reply.