📘 PASDF: Bridging 3D Anomaly Localization and Repair via High-Quality Continuous Geometric Representation
Bozhong Zheng1*, Jinye Gan1*, Xiaohao Xu2†, Xintao Chen1, Wenqiao Li1, Xiaonan Huang2, Na Ni1†, Yingna Wu1†
1ShanghaiTech University 2University of Michigan, Ann Arbor
*Equal contribution. †corresponding author.
PASDF is a framework designed for 3D anomaly localization and geometric repair, leveraging high-quality continuous geometric representations via neural implicit functions.
It bridges 3D anomaly detection and surface reconstruction by learning a Signed Distance Function (SDF) representation of object geometry.
conda create -n PASDF python=3.10
conda activate PASDF
cd path/to/PASDF
bash install.sh PASDF-
Training / Evaluation Data (PCD format)
-
Raw Data (PLY format)
-
Training / Evaluation Data (PCD & OBJ format)
Before running inference (PASDF/Test/AD_test.py), download the preprocessed SDF samples and pretrained model weights.
This folder contains:
data/
results/
Place the contents into your project as follows:
PASDF/
├── data/ ← Template files for both datasets
│ ├── ShapeNetAD/ ← Template meshes for ShapeNetAD
│ ├── Real3D_AD/ ← Template meshes for Real3D-AD
│
├── results/ ← Pretrained weights and preprocessed SDF data
│ ├── ShapeNetAD/
│ │ ├── runs_sdf/ ← Trained model weights (.pt files)
│ │ └── samples_dict_ShapeNetAD.npy ← Preprocessed SDF samples
│ │
│ ├── Real3D_AD/
│ │ ├── runs_sdf/
│ │ └── samples_dict_Real3D_AD.npy
│
└── Test/
├── AD_test.py
└── infer.py
⚠️ Note: If you have already downloaded the preprocessed data and pretrained weights (Section 2.2), you can skip Steps 1 and 2 and go directly to Step 3: Evaluation.
Configuration: config_files/extract_sdf_ShapeNetAD.yaml
python data/extract_sdf_ShapeNetAD.pyConfiguration: config_files/train_sdf_ShapeNetAD.yaml
python Train/train_sdf_ShapeNetAD.pyUpdate the dataset path in config_files/test_ShapeNetAD.yaml:
dataset:
name: ShapeNetAD
dataset_dir: /path/to/Anomaly-ShapeNet-v2/dataset/16384 # ← modify hereRun:
python Test/AD_test.py --config config_files/test_ShapeNetAD.yamlImplementation Notes:
-
The Chamfer distance in the PAM module was replaced with a directed variant for Real3D-AD, differing slightly from the paper but yielding better stability and efficiency.
-
Adjusting the
voxel_sizeparameter improves registration accuracy. The optimal per-class values (used for the best results reported in the paper) are provided inconfig_files/voxel_sizes.yaml, with a default of 0.03.
Update the checkpoint_path in config_files/reconstruct_mesh_ShapeNetAD.yaml:
checkpoint_path: results/ShapeNetAD/runs_sdf/ # default path
mesh_save_dir: results/ShapeNetAD/reconstruct_mesh/After modifying the YAML configuration file, run the reconstruction script using the following command:
#for Anomaly-ShapeNet dataset
python scripts/reconstruct_mesh.py config_files/reconstruct_mesh_ShapeNetAD.yaml
#for Real3D-AD dataset
python scripts/reconstruct_mesh.py config_files/reconstruct_mesh_Real3D_AD.yamlIf you find PASDF useful in your research, please cite:
@article{zheng2025bridging,
title={Bridging 3D Anomaly Localization and Repair via High-Quality Continuous Geometric Representation},
author={Zheng, Bozhong and Gan, Jinye and Xu, Xiaohao and Li, Wenqiao and Huang, Xiaonan and Ni, Na and Wu, Yingna},
journal={arXiv preprint arXiv:2505.24431},
year={2025}
}