This repository provides the official implementation of CASL: Curvature-Augmented Self-supervised Learning for 3D Anomaly Detection at AAAI 2026.
Deep learning-based 3D anomaly detection methods have demonstrated significant potential in industrial manufacturing. However, many approaches are specifically designed for anomaly detection tasks, which limits their generalizability to other 3D understanding tasks. In contrast, self-supervised point cloud models aim for general-purpose representation learning, yet our investigation reveals that these classical models are suboptimal at anomaly detection under the unified fine-tuning paradigm. This motivates us to develop a more generalizable 3D model that can effectively detect anomalies without relying on task-specific designs. Interestingly, we find that using only the curvature of each point as its anomaly score already outperforms several classical self-supervised and dedicated anomaly detection models, highlighting the critical role of curvature in 3D anomaly detection. In this paper, we propose a Curvature-Augmented Self-supervised Learning (CASL) framework based on a reconstruction paradigm. Built upon the classical U-Net architecture, our approach introduces multi-scale curvature prompts to guide the decoder in predicting the spatial coordinates of each point. Without relying on any dedicated anomaly detection mechanisms, it achieves leading detection performance through straightforward anomaly classification fine-tuning. Moreover, the learned representations generalize well to standard 3D understanding tasks such as point cloud classification.
In the following, we will guide you how to use this repository step by step. 🤗
git clone https://github.com/zyh16143998882/CASL.git
cd CASL/conda create -y -n casl python=3.8
conda activate casl
pip install torch==1.13.0+cu117 torchvision==0.14.0+cu117 torchaudio==0.13.0 --extra-index-url https://download.pytorch.org/whl/cu117
pip install -r requirements.txt
conda install openblas-devel -c anaconda
git clone https://github.com/NVIDIA/MinkowskiEngine.git
cd MinkowskiEngine/
python setup.py install --blas_include_dirs=${CONDA_PREFIX}/include --blas=openblasBefore running the code, we need to make sure that everything needed is ready. First, the working directory is expected to be organized as below:
click to expand 👈
CASL/
├── data/
│ ├── Anomaly-ShapeNet-v2/
│ │ └── dataset/
│ │ ├── new_obj
│ │ ├── new_pcd
│ │ ├── obj
│ │ └──pcd
│ ├── Real3D/ # ModelNet Few-shot
│ │ ├── Real3D-AD-PCD/
│ │ ├── airplane
│ │ ├── ...
│ │ └── toffees
│ │ ├── Real3D-AD-PLY/
│ │ ├── airplane
│ │ ├── ...
│ │ └── toffees
Here we have also collected the download links of required datasets for you:
You can start the pre-training of the CASL model from scratch by using the following commands:
cd casl_pretrain
CUDA_VISIBLE_DEVICES=5 python train.py --logpath ./log/pretrain/
Or you can directly fine-tune using our pre-trained model. The link of our model is here.
Set Dataset Path:
cd casl_ft/
ln -s ../data .
Real3d-AD
cd casl_ft/sh
bash real.sh
Anomaly-ShapeNet
cd casl_ft/sh
bash shape.sh
You can reproduce our results in the following way:
-
Download the following ckpts to the "casl_ft/checkpoints" folder;
-
Run "real_test.sh"
cd casl_ft/sh
bash real_test.sh
| Dataset | Category | O-AUROC | P-AUROC | Checkpoints Download |
|---|---|---|---|---|
| Real3DAD | Airplane | 0.808 | 0.842 | ckpts |
| Real3DAD | Car | 0.799 | 0.905 | ckpts |
| Real3DAD | Candybar | 0.848 | 0.932 | ckpts |
| Real3DAD | Chicken | 0.657 | 0.713 | ckpts |
| Real3DAD | Diamond | 0.976 | 0.988 | ckpts |
| Real3DAD | Duck | 0.836 | 0.895 | ckpts |
| Real3DAD | Fish | 0.935 | 0.935 | ckpts |
| Real3DAD | Gemstone | 0.769 | 0.916 | ckpts |
| Real3DAD | Seahorse | 0.643 | 0.814 | ckpts |
| Real3DAD | Shell | 0.791 | 0.873 | ckpts |
| Real3DAD | Starfish | 0.893 | 0.839 | ckpts |
| Real3DAD | Toffees | 0.924 | 0.937 | ckpts |
If you find this code useful or use the toolkit in your work, please consider citing:
@article{zha2025casl,
title={CASL: Curvature-Augmented Self-supervised Learning for 3D Anomaly Detection},
author={Zha, Yaohua and Yuerong, Xue and Fan, Chunlin and Wang, Yuansong and Dai, Tao and Chen, Ke and Xia, Shu-Tao},
journal={arXiv preprint arXiv:2511.12909},
year={2025}
}
Our codes are built upon PO3AD, Real3D-AD, Anomaly-ShapeNet. Thanks for their efforts.
If you have any question, you can raise an issue or email Yaohua Zha (zyh1614399882@gmail.com).
