模型名称: ScaffDiff
模型链接: https://huggingface.co/businesslion/scaffdiff
模型描述: ScaffDiff 是一个用于 3D 语义场景补全的单步骨架主导扩散模型,基于 SemanticKITTI 数据集训练,发表于 SMC 2026 和 RA-L 2026。给定部分 LiDAR 点云,ScaffDiff 通过结合条件特征提取器(Sonata/PTv3 编码器)和扩散去噪过程预测完整的 3D 场景几何。
模型架构: 扩散模型(Diffusion Model)+ PointNet-style 编码器
参数规模: Student (13M params) + VAE (7M params)
相关获取地址:
| 组件 | 版本 |
|---|---|
torch | 2.9.0+cpu |
torch-npu | 2.9.0 |
Python | 3.11 |
Ascend 910(逻辑卡)npu:0# 检查 NPU 设备
npu-smi infopip install -r requirements.txt注意:首次运行需要下载
student_v2gt/best_model.pth(517MB)权重文件,放置到student_v2gt/目录。测试数据test_partial.bin和 VAE 权重vae_v3/best_point_vae.pth已包含在仓库中。
# 确保 student 权重已放置
ls student_v2gt/best_model.pth # 如不存在请从 HuggingFace 下载
python inference.py \
--input test_partial.bin \
--student student_v2gt/best_model.pth \
--vae vae_v3/best_point_vae.pth \
--output scaffdiff_output.ply \
--num_steps 50 \
--device npu| 参数 | 类型 | 默认值 | 说明 |
|---|---|---|---|
--input | str | - | 输入点云文件路径(.bin / .pcd / .ply) |
--student | str | - | Student 模型权重路径 |
--vae | str | - | VAE 模型权重路径 |
--output | str | scaffdiff_output.ply | 输出文件路径 |
--voxel_size | float | 0.05 | 体素大小 |
--num_steps | int | 50 | 扩散去噪步数 |
--device | str | npu | 推理设备(npu / cuda / cpu) |
输入:
test_partial.bin (5000 点,部分场景)输出:
[ScaffDiff] Device: npu
[ScaffDiff] Scan: 5000 points
[ScaffDiff] Voxelized: 5000 points
[ScaffDiff] Condition: torch.Size([312, 256])
[ScaffDiff] Denoising 50 steps...
[ScaffDiff] VAE decode...
[ScaffDiff] Output: 8000 points -> scaffdiff_output.ply输出说明:
scaffdiff_output.ply(8000 个完成场景点)| 组件 | 描述 |
|---|---|
| 条件提取器 | Sonata (PTv3) 编码器 → 在第 2、3、4 层拼接融合 → 每个点 256 维条件向量 |
| 去噪器 | U-Net,3 个层级(64→128→256→512 瓶颈),标准 MultiheadAttention(4 头),正弦时间嵌入,跳跃连接 |
| VAE | PointNet 编码器 → 32-token 交叉注意力池化 → 高斯潜空间(256 维)→ 8000 点交叉注意力解码器(5 个块) |
torch_npu 调用 NPU 设备.bin(SemanticKITTI 格式)、.pcd、.ply