文章目录 1. 距离变换的算法实现 ⚪ 通过广度优先搜索实现距离变换 ⚪ 通过动态规划实现距离变换 ⭐ 进一步化简 ⚪ 通过`scipy.ndimage.distance_transform_edt`实现距离变换 2. 距离变换的应用 (1) 构造分割任务的损失函数 ⚪ [Distance Map Penalized CE Loss](https://arxiv.org/abs/1908.03679) ⚪ [Boundary Loss](https://0809zheng.github.io/2021/03/25/boundary.html)