Add comprehensive dataset card with baseline results
Browse files
README.md
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# IPAD: Industrial Process Anomaly Detection Dataset
|
| 2 |
+
|
| 3 |
+
This is the official IPAD dataset for video anomaly detection in industrial scenarios.
|
| 4 |
+
|
| 5 |
+
## Dataset Description
|
| 6 |
+
|
| 7 |
+
- **Paper**: [IPAD: Industrial Process Anomaly Detection Dataset](https://arxiv.org/abs/2404.15033)
|
| 8 |
+
- **Project Page**: [https://ljf1113.github.io/IPAD_VAD](https://ljf1113.github.io/IPAD_VAD)
|
| 9 |
+
- **Authors**: Jinfan Liu, Yichao Yan, Junjie Li, et al. (Shanghai Jiao Tong University & Lenovo Research)
|
| 10 |
+
- **Conference**: ACM MM 2024
|
| 11 |
+
|
| 12 |
+
## Key Features
|
| 13 |
+
|
| 14 |
+
- **16 Industrial Devices**: 12 synthetic + 4 real-world scenarios
|
| 15 |
+
- **597,979 Video Frames**: Over 6 hours of footage
|
| 16 |
+
- **Periodicity Annotations**: Unique temporal features for industrial processes
|
| 17 |
+
- **39 Anomaly Classes**: Various types including:
|
| 18 |
+
- Appearance anomalies (color, shape changes)
|
| 19 |
+
- Position anomalies (shifts, tilts)
|
| 20 |
+
- Motion anomalies (lagging, speed changes)
|
| 21 |
+
- Logic anomalies (sorting errors, wrong sequences)
|
| 22 |
+
|
| 23 |
+
## Dataset Structure
|
| 24 |
+
|
| 25 |
+
```
|
| 26 |
+
ipad_dataset/
|
| 27 |
+
├── S01_conveyer_belt/
|
| 28 |
+
├── S02_automatic_lifter/
|
| 29 |
+
├── S03_forklift_truck/
|
| 30 |
+
├── S04_manual_cutter/
|
| 31 |
+
├── S05_90_conveyer/
|
| 32 |
+
├── S06_180_conveyer/
|
| 33 |
+
├── S07_z_lifter/
|
| 34 |
+
├── S08_box_sorter/
|
| 35 |
+
├── S09_mechanical_gripper/
|
| 36 |
+
├── S10_standing_crane/
|
| 37 |
+
├── S11_automatic_cutter/
|
| 38 |
+
├── S12_drilling_machine/
|
| 39 |
+
├── R01_conveyer_belt_real/
|
| 40 |
+
├── R02_automatic_lifter_real/
|
| 41 |
+
├── R03_forklift_truck_real/
|
| 42 |
+
└── R04_manual_cutter_real/
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
Each device folder contains:
|
| 46 |
+
- `training/frames/`: Normal operation videos
|
| 47 |
+
- `testing/frames/`: Both normal and anomalous videos
|
| 48 |
+
- Frame-level annotations for anomalies
|
| 49 |
+
|
| 50 |
+
## Statistics
|
| 51 |
+
|
| 52 |
+
- **Total Frames**: 597,979
|
| 53 |
+
- **Training Frames**: 430,867 (normal only)
|
| 54 |
+
- **Testing Frames**: 167,112 (normal + anomalies)
|
| 55 |
+
- **Resolution**: 2492 × 988 pixels
|
| 56 |
+
- **Frame Rate**: Variable (5-30 second cycles)
|
| 57 |
+
|
| 58 |
+
## Differences from Existing Datasets
|
| 59 |
+
|
| 60 |
+
Unlike human-centric VAD datasets (UCSD Ped, Avenue, ShanghaiTech):
|
| 61 |
+
- ✅ **Object-centric**: Anomalies can occur anywhere in frame
|
| 62 |
+
- ✅ **Periodic**: Equipment has cyclic motion patterns
|
| 63 |
+
- ✅ **Industrial-specific**: Real factory scenarios
|
| 64 |
+
- ✅ **Synthetic + Real**: Domain adaptation capability
|
| 65 |
+
|
| 66 |
+
## Usage
|
| 67 |
+
|
| 68 |
+
### Download and Extract
|
| 69 |
+
|
| 70 |
+
```python
|
| 71 |
+
from huggingface_hub import hf_hub_download
|
| 72 |
+
import zipfile
|
| 73 |
+
|
| 74 |
+
# Download the dataset
|
| 75 |
+
zip_path = hf_hub_download(
|
| 76 |
+
repo_id="MSherbinii/ipad-industrial-anomaly",
|
| 77 |
+
filename="ipad_dataset.zip",
|
| 78 |
+
repo_type="dataset"
|
| 79 |
+
)
|
| 80 |
+
|
| 81 |
+
# Extract
|
| 82 |
+
with zipfile.ZipFile(zip_path, 'r') as zip_ref:
|
| 83 |
+
zip_ref.extractall("./ipad_data")
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
### Load with PyTorch
|
| 87 |
+
|
| 88 |
+
```python
|
| 89 |
+
from torch.utils.data import Dataset
|
| 90 |
+
import cv2
|
| 91 |
+
import os
|
| 92 |
+
|
| 93 |
+
class IPADDataset(Dataset):
|
| 94 |
+
def __init__(self, root_dir, device="S01", split="train"):
|
| 95 |
+
self.root = os.path.join(root_dir, f"{device}/{split}/frames")
|
| 96 |
+
# ... implementation
|
| 97 |
+
|
| 98 |
+
def __getitem__(self, idx):
|
| 99 |
+
# Load 16-frame video clip
|
| 100 |
+
frames = []
|
| 101 |
+
for i in range(idx, idx+16):
|
| 102 |
+
frame = cv2.imread(f"{self.root}/frame_{i:05d}.jpg")
|
| 103 |
+
frame = cv2.resize(frame, (256, 256))
|
| 104 |
+
frames.append(frame)
|
| 105 |
+
return torch.tensor(frames)
|
| 106 |
+
```
|
| 107 |
+
|
| 108 |
+
## Baseline Results
|
| 109 |
+
|
| 110 |
+
From the original paper using Video Swin Transformer + Periodic Memory:
|
| 111 |
+
|
| 112 |
+
| Device | AUC (%) | Device | AUC (%) |
|
| 113 |
+
|--------|---------|--------|---------|
|
| 114 |
+
| S01 | 69.5 | S07 | 60.6 |
|
| 115 |
+
| S02 | 63.9 | S08 | 85.6 |
|
| 116 |
+
| S03 | 70.6 | S09 | 71.2 |
|
| 117 |
+
| S04 | 58.3 | S10 | 62.2 |
|
| 118 |
+
| S05 | 86.2 | S11 | 60.9 |
|
| 119 |
+
| S06 | 61.2 | S12 | 67.1 |
|
| 120 |
+
| R01 | 84.4 | R03 | 43.5 |
|
| 121 |
+
| R02 | 75.4 | R04 | 76.7 |
|
| 122 |
+
| **Average** | **68.6** | | |
|
| 123 |
+
|
| 124 |
+
## Citation
|
| 125 |
+
|
| 126 |
+
```bibtex
|
| 127 |
+
@article{liu2024ipad,
|
| 128 |
+
author = {Jinfan Liu, Yichao Yan, Junjie Li, Weiming Zhao,
|
| 129 |
+
Pengzhi Chu, Xingdong Sheng, Yunhui Liu and Xiaokang Yang},
|
| 130 |
+
title = {IPAD: Industrial Process Anomaly Detection Dataset},
|
| 131 |
+
year = {2024},
|
| 132 |
+
journal = {arXiv preprint arXiv:2404.15033},
|
| 133 |
+
}
|
| 134 |
+
```
|
| 135 |
+
|
| 136 |
+
## License
|
| 137 |
+
|
| 138 |
+
Please refer to the original paper and project page for license information.
|
| 139 |
+
|
| 140 |
+
## Acknowledgments
|
| 141 |
+
|
| 142 |
+
- Original dataset creators: Shanghai Jiao Tong University & Lenovo Research
|
| 143 |
+
- Uploaded to HuggingFace Hub by: MSherbinii
|
| 144 |
+
- Part of the IPAD VAD reproduction and improvement project
|