Skip to content

Conversation

@zeakey
Copy link
Contributor

@zeakey zeakey commented Oct 27, 2025

This PR implements the distance transform algorithm.

Our implementation strictly follows the scipy implementation, which originates from this paper.

@moliflower Do not touch any other files except csrc/distance_transform_kernel.cu.

zeakey and others added 10 commits October 27, 2025 11:34
安装了miniconda来进行虚拟环境包管理 在执行`pip install -e. "import torch" 失败并抛出 `ModuleNotFoundError
 所以在 `pyproject.toml` 的 `[build-system].requires` 列表中明确添加 `"torch"`。
这会强制 pip 在构建开始前,先将 torch 安装到其临时环境中,从而确保构建过程顺利完成。
- 新增 CUDA 内核,分别用于行与列方向的距离变换
- 支持在 GPU 上处理二维张量
- 已通过基础单元测试验证正确性
- 注意:当前实现仅适用于二维情况,尚未推广到 N 维张量
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants