Closed aguirrejuan closed 3 years ago
Hi,
I think this was already discussed in this thread: https://github.com/LIVIAETS/boundary-loss/issues/8
The rationale, when I implemented it, was that we compute the distance to the boundary. By this logic, the distance of the boundary wrt the boundary should be 0. Since this not the behavior of the SciPy function distance_transform_edt. I did that manually by shifting the distance by 1 on the distance to the positive mask.
To be fair, I do not think it would change (much) the results, since it is only shifting the distance values inside the object. But I did not had time to compare the impact of this implementation detail.
Does it answer your question?
Best,
Hoel
Thanks
Hi, nice paper
Could you explain to me why you use -1 ?
https://github.com/LIVIAETS/boundary-loss/blob/749602d822fcb097c79a7fb708805b8982c37030/utils.py#L271-L272
Thanks.