Improve dataset card: Add description, paper, code, task categories, tags, and sample usage for Anomaly-ShapeNet
Browse filesThis PR significantly enhances the dataset card for `Anomaly-ShapeNet` (also known as `ShapeNetAD`) by:
- Providing a clear description of the dataset's contents and its role in the associated research paper.
- Linking to the official paper: [Bridging 3D Anomaly Localization and Repair via High-Quality Continuous Geometric Representation](https://huggingface.co/papers/2505.24431).
- Linking to the GitHub repository of the `PASDF` framework, which uses this dataset: [https://github.com/ZZZBBBZZZ/PASDF](https://github.com/ZZZBBBZZZ/PASDF).
- Adding relevant `task_categories` (`image-to-3d`, `3d-reconstruction`) and `tags` (`3d-anomaly-detection`, `signed-distance-field`, `point-cloud`, `geometric-repair`) to improve discoverability and provide more context.
- Including a detailed "Sample Usage" section with code snippets for installation, data download, evaluation, and mesh reconstruction, directly adapted from the `PASDF` GitHub README to help users get started with the dataset in the context of the framework.
- Adding the BibTeX citation for the paper.
|
@@ -1,3 +1,136 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: cc-by-4.0
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- image-to-3d
|
| 5 |
+
- 3d-reconstruction
|
| 6 |
+
tags:
|
| 7 |
+
- 3d-anomaly-detection
|
| 8 |
+
- signed-distance-field
|
| 9 |
+
- point-cloud
|
| 10 |
+
- geometric-repair
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# Anomaly-ShapeNet (ShapeNetAD) Dataset
|
| 14 |
+
|
| 15 |
+
This repository hosts the **Anomaly-ShapeNet (ShapeNetAD)** dataset, a key component for the research presented in the paper [Bridging 3D Anomaly Localization and Repair via High-Quality Continuous Geometric Representation](https://huggingface.co/papers/2505.24431). The paper introduces **PASDF**, a novel framework that integrates 3D anomaly detection and repair by learning a continuous, pose-invariant shape representation.
|
| 16 |
+
|
| 17 |
+
Anomaly-ShapeNet serves as a benchmark for 3D anomaly localization and geometric repair tasks, providing training and evaluation data in PCD and OBJ formats. It is essential for developing and testing models that leverage continuous geometric representations via neural implicit functions for identifying and rectifying fine-grained anomalies in 3D point clouds.
|
| 18 |
+
|
| 19 |
+
**Paper:** [Bridging 3D Anomaly Localization and Repair via High-Quality Continuous Geometric Representation](https://huggingface.co/papers/2505.24431)
|
| 20 |
+
**Code (PASDF framework):** [https://github.com/ZZZBBBZZZ/PASDF](https://github.com/ZZZBBBZZZ/PASDF)
|
| 21 |
+
|
| 22 |
+
## Sample Usage
|
| 23 |
+
|
| 24 |
+
The following instructions are adapted from the [PASDF GitHub repository](https://github.com/ZZZBBBZZZ/PASDF) and demonstrate how to set up the PASDF framework and use the Anomaly-ShapeNet dataset for various tasks.
|
| 25 |
+
|
| 26 |
+
### 1. Installation
|
| 27 |
+
|
| 28 |
+
First, set up the Conda environment and install the necessary dependencies for the PASDF framework:
|
| 29 |
+
|
| 30 |
+
```bash
|
| 31 |
+
conda create -n PASDF python=3.10
|
| 32 |
+
conda activate PASDF
|
| 33 |
+
cd path/to/PASDF # Navigate to your cloned PASDF repository
|
| 34 |
+
bash install.sh PASDF
|
| 35 |
+
```
|
| 36 |
+
|
| 37 |
+
### 2. Download Required Data
|
| 38 |
+
|
| 39 |
+
To use Anomaly-ShapeNet with the PASDF framework, you will need to download the dataset itself and also the preprocessed templates and model weights.
|
| 40 |
+
|
| 41 |
+
**Anomaly-ShapeNet (ShapeNetAD) Dataset:**
|
| 42 |
+
Training / Evaluation Data (PCD & OBJ format) can be accessed through this Hugging Face Dataset page, or from the original Baidu Disk link provided in the PASDF GitHub repository.
|
| 43 |
+
|
| 44 |
+
**Preprocessed Templates and Model Weights:**
|
| 45 |
+
Download these from the [Google Drive Folder](https://drive.google.com/drive/folders/1-aeND5tZ_dFp-7BhZHPyZSofDgxRTYRQ?usp=sharing) linked in the PASDF GitHub README.
|
| 46 |
+
|
| 47 |
+
Place the downloaded contents into your `PASDF/` project directory to match the following structure:
|
| 48 |
+
|
| 49 |
+
```
|
| 50 |
+
PASDF/
|
| 51 |
+
├── data/ # Template files for both datasets
|
| 52 |
+
│ ├── ShapeNetAD/ # Template meshes for ShapeNetAD
|
| 53 |
+
│ ├── Real3D_AD/ # Template meshes for Real3D-AD
|
| 54 |
+
│
|
| 55 |
+
├── results/ # Pretrained weights and preprocessed SDF data
|
| 56 |
+
│ ├── ShapeNetAD/
|
| 57 |
+
│ │ ├── runs_sdf/ # Trained model weights (.pt files)
|
| 58 |
+
│ │ └── samples_dict_ShapeNetAD.npy # Preprocessed SDF samples
|
| 59 |
+
│ │
|
| 60 |
+
│ ├── Real3D_AD/
|
| 61 |
+
│ │ ├── runs_sdf/
|
| 62 |
+
│ │ └── samples_dict_Real3D_AD.npy
|
| 63 |
+
│
|
| 64 |
+
└── Test/
|
| 65 |
+
├── AD_test.py
|
| 66 |
+
└── infer.py
|
| 67 |
+
```
|
| 68 |
+
|
| 69 |
+
### 3. Usage with Anomaly-ShapeNet (ShapeNetAD)
|
| 70 |
+
|
| 71 |
+
> ⚠️ **Note:** If you have already downloaded the preprocessed data and pretrained weights (as described above), you can **skip Steps 1 and 2 (Extract SDF Samples and Train SDF Model)** and go directly to **Step 3: Evaluation**.
|
| 72 |
+
|
| 73 |
+
#### **Step 1 — Extract SDF Samples**
|
| 74 |
+
|
| 75 |
+
Configuration: `config_files/extract_sdf_ShapeNetAD.yaml`
|
| 76 |
+
|
| 77 |
+
```bash
|
| 78 |
+
python data/extract_sdf_ShapeNetAD.py
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
#### **Step 2 — Train SDF Model**
|
| 82 |
+
|
| 83 |
+
Configuration: `config_files/train_sdf_ShapeNetAD.yaml`
|
| 84 |
+
|
| 85 |
+
```bash
|
| 86 |
+
python Train/train_sdf_ShapeNetAD.py
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
#### **Step 3 — Evaluate**
|
| 90 |
+
|
| 91 |
+
Update the dataset path in `config_files/test_ShapeNetAD.yaml` to point to your local Anomaly-ShapeNet data:
|
| 92 |
+
|
| 93 |
+
```yaml
|
| 94 |
+
dataset:
|
| 95 |
+
name: ShapeNetAD
|
| 96 |
+
dataset_dir: /path/to/Anomaly-ShapeNet-v2/dataset/16384 # ← modify here to your local path
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
Then, run the evaluation script:
|
| 100 |
+
|
| 101 |
+
```bash
|
| 102 |
+
python Test/AD_test.py --config config_files/test_ShapeNetAD.yaml
|
| 103 |
+
```
|
| 104 |
+
|
| 105 |
+
### 4. Reconstruction
|
| 106 |
+
|
| 107 |
+
The PASDF framework also supports mesh reconstruction. To reconstruct meshes using the trained SDF models for Anomaly-ShapeNet:
|
| 108 |
+
|
| 109 |
+
1. **Modify the YAML Configuration File**
|
| 110 |
+
|
| 111 |
+
Update the `checkpoint_path` in `config_files/reconstruct_mesh_ShapeNetAD.yaml`:
|
| 112 |
+
|
| 113 |
+
```yaml
|
| 114 |
+
checkpoint_path: results/ShapeNetAD/runs_sdf/ # default path
|
| 115 |
+
mesh_save_dir: results/ShapeNetAD/reconstruct_mesh/
|
| 116 |
+
```
|
| 117 |
+
|
| 118 |
+
2. **Run the Reconstruction Script**
|
| 119 |
+
|
| 120 |
+
```bash
|
| 121 |
+
# For Anomaly-ShapeNet dataset
|
| 122 |
+
python scripts/reconstruct_mesh.py config_files/reconstruct_mesh_ShapeNetAD.yaml
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
## Citation
|
| 126 |
+
|
| 127 |
+
If you find the Anomaly-ShapeNet dataset or the associated **PASDF** framework useful in your research, please cite the following paper:
|
| 128 |
+
|
| 129 |
+
```bibtex
|
| 130 |
+
@article{zheng2025bridging,
|
| 131 |
+
title={Bridging 3D Anomaly Localization and Repair via High-Quality Continuous Geometric Representation},
|
| 132 |
+
author={Zheng, Bozhong and Gan, Jinye and Xu, Xiaohao and Li, Wenqiao and Huang, Xiaonan and Ni, Na and Wu, Yingna},
|
| 133 |
+
journal={arXiv preprint arXiv:2505.24431},
|
| 134 |
+
year={2025}
|
| 135 |
+
}
|
| 136 |
+
```
|