CASL: Curvature-Augmented Self-supervised Learning for 3D Anomaly Detection

December 15, 2025 ยท View on GitHub

This repository provides the official implementation of CASL: Curvature-Augmented Self-supervised Learning for 3D Anomaly Detection at AAAI 2026.

1. Introduction

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.

img.png

In the following, we will guide you how to use this repository step by step. ๐Ÿค—

2. Preparation

git clone https://github.com/zyh16143998882/CASL.git
cd CASL/

2.1 Requirements

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=openblas

2.2 Download the point cloud datasets and organize them properly

Before 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:

  • Real3D-AD: [link].
  • Anomaly-ShapeNet: [link].

3. Pre-training

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.

4. Fine-tuning

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  

5. Validate with checkpoints

You can reproduce our results in the following way:

  1. Download the following ckpts to the "casl_ft/checkpoints" folder;

  2. Run "real_test.sh"

cd casl_ft/sh
bash real_test.sh  
DatasetCategoryO-AUROCP-AUROCCheckpoints Download
Real3DADAirplane0.8080.842ckpts
Real3DADCar0.7990.905ckpts
Real3DADCandybar0.8480.932ckpts
Real3DADChicken0.6570.713ckpts
Real3DADDiamond0.9760.988ckpts
Real3DADDuck0.8360.895ckpts
Real3DADFish0.9350.935ckpts
Real3DADGemstone0.7690.916ckpts
Real3DADSeahorse0.6430.814ckpts
Real3DADShell0.7910.873ckpts
Real3DADStarfish0.8930.839ckpts
Real3DADToffees0.9240.937ckpts

6. Bibliography

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}
}

7. Acknowledgements

Our codes are built upon PO3AD, Real3D-AD, Anomaly-ShapeNet. Thanks for their efforts.

8. Contact

If you have any question, you can raise an issue or email Yaohua Zha (zyh1614399882@gmail.com).