๐ PASDF: Bridging 3D Anomaly Localization and Repair via High-Quality Continuous Geometric Representation
December 17, 2025 ยท View on GitHub
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.
๐ Overview
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.
๐งฉ 1. Installation
conda create -n PASDF python=3.10
conda activate PASDF
cd path/to/PASDF
bash install.sh PASDF
๐ฆ 2. Download Required Data
2.1 Datasets
Real3D-AD Dataset
-
Training / Evaluation Data (PCD format)
-
Raw Data (PLY format)
Anomaly-ShapeNet (ShapeNetAD) Dataset
-
Training / Evaluation Data (PCD & OBJ format)
2.2 Preprocessed Templates and Model Weights
Before running inference (PASDF/Test/AD_test.py), download the preprocessed SDF samples and pretrained model weights.
๐ Google Drive Folder
This folder contains:
data/
results/
๐ Directory Structure
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
โ๏ธ 3. Usage
๐งฑ 3.1 Anomaly_ShapeNet(ShapeNetAD)
โ ๏ธ 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.
Step 1 โ Extract SDF Samples
Configuration: config_files/extract_sdf_ShapeNetAD.yaml
python data/extract_sdf_ShapeNetAD.py
Step 2 โ Train SDF Model
Configuration: config_files/train_sdf_ShapeNetAD.yaml
python Train/train_sdf_ShapeNetAD.py
Step 3 โ Evaluate
Update the dataset path in config_files/test_ShapeNetAD.yaml:
dataset:
name: ShapeNetAD
dataset_dir: /path/to/Anomaly-ShapeNet-v2/dataset/16384 # โ modify here
Run:
python Test/AD_test.py --config config_files/test_ShapeNetAD.yaml
Implementation 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.
๐งฉ Reconstruction
1. Modify the YAML Configuration File
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/
2. Run the Reconstruction Script
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.yaml
Citation
If 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}
}