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:
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;
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;
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.
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:
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.