Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,119 @@
|
|
| 1 |
---
|
| 2 |
license: cc-by-nc-sa-4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: cc-by-nc-sa-4.0
|
| 3 |
+
library_name: pytorch
|
| 4 |
+
base_model: openai/clip-vit-large-patch14-336
|
| 5 |
+
tags:
|
| 6 |
+
- computer-vision
|
| 7 |
+
- anomaly-detection
|
| 8 |
+
- anomaly-segmentation
|
| 9 |
+
- zero-shot-learning
|
| 10 |
+
- industrial-anomaly-detection
|
| 11 |
+
- clip
|
| 12 |
+
- fe-clip
|
| 13 |
+
- mvtec-ad
|
| 14 |
+
- visa
|
| 15 |
+
- pytorch
|
| 16 |
---
|
| 17 |
+
|
| 18 |
+
# FE-CLIP Reproduction Checkpoints: MVTec AD & VisA
|
| 19 |
+
|
| 20 |
+
This repository provides PyTorch checkpoints from an independent reconstruction of:
|
| 21 |
+
|
| 22 |
+
**FE-CLIP: Frequency Enhanced CLIP Model for Zero-Shot Anomaly Detection and Segmentation**
|
| 23 |
+
Tao Gong, Qi Chu, Bin Liu, Wei Zhou, and Nenghai Yu
|
| 24 |
+
ICCV 2025, pages 21220–21230.
|
| 25 |
+
|
| 26 |
+
- [Official paper](https://openaccess.thecvf.com/content/ICCV2025/papers/Gong_FE-CLIP_Frequency_Enhanced_CLIP_Model_for_Zero-Shot_Anomaly_Detection_and_ICCV_2025_paper.pdf)
|
| 27 |
+
- [Supplementary material](https://openaccess.thecvf.com/content/ICCV2025/supplemental/Gong_FE-CLIP_Frequency_Enhanced_ICCV_2025_supplemental.pdf)
|
| 28 |
+
|
| 29 |
+
> [!IMPORTANT]
|
| 30 |
+
> These are independently reproduced research checkpoints. They are not official checkpoints released by the FE-CLIP authors, and this repository is not affiliated with the original authors.
|
| 31 |
+
|
| 32 |
+
## Repository Contents
|
| 33 |
+
|
| 34 |
+
The trained checkpoints are distributed as a single archive:
|
| 35 |
+
|
| 36 |
+
```text
|
| 37 |
+
FE-CLIP.zip
|
| 38 |
+
```
|
| 39 |
+
|
| 40 |
+
Archive information:
|
| 41 |
+
|
| 42 |
+
| Property | Value |
|
| 43 |
+
|---|---:|
|
| 44 |
+
| Compressed size | 1,824,019,956 bytes |
|
| 45 |
+
| Displayed size | Approximately 1.82 GB |
|
| 46 |
+
| Uncompressed size | Approximately 1.85 GiB |
|
| 47 |
+
| PyTorch checkpoints | 18 |
|
| 48 |
+
| Training-history files | 2 |
|
| 49 |
+
| SHA-256 | `7821723A70AD54720F78D46F46D0E812F26B0D394280C8EAA5D8A76A19751499` |
|
| 50 |
+
|
| 51 |
+
The ZIP contains the following structure:
|
| 52 |
+
|
| 53 |
+
```text
|
| 54 |
+
FE-CLIP/
|
| 55 |
+
├── train_on_mvtec_seed_111/
|
| 56 |
+
│ ├── feclip_train_on_mvtec_epoch_01.pth
|
| 57 |
+
│ ├── feclip_train_on_mvtec_epoch_02.pth
|
| 58 |
+
│ ├── feclip_train_on_mvtec_epoch_03.pth
|
| 59 |
+
│ ├── feclip_train_on_mvtec_epoch_04.pth
|
| 60 |
+
│ ├── feclip_train_on_mvtec_epoch_05.pth
|
| 61 |
+
│ ├── feclip_train_on_mvtec_epoch_06.pth
|
| 62 |
+
│ ├── feclip_train_on_mvtec_epoch_07.pth
|
| 63 |
+
│ ├── feclip_train_on_mvtec_epoch_08.pth
|
| 64 |
+
│ ├── feclip_train_on_mvtec_epoch_09.pth
|
| 65 |
+
│ └── history.json
|
| 66 |
+
└── train_on_visa_seed_111/
|
| 67 |
+
├── feclip_train_on_visa_epoch_01.pth
|
| 68 |
+
├── feclip_train_on_visa_epoch_02.pth
|
| 69 |
+
├── feclip_train_on_visa_epoch_03.pth
|
| 70 |
+
├── feclip_train_on_visa_epoch_04.pth
|
| 71 |
+
├── feclip_train_on_visa_epoch_05.pth
|
| 72 |
+
├── feclip_train_on_visa_epoch_06.pth
|
| 73 |
+
├── feclip_train_on_visa_epoch_07.pth
|
| 74 |
+
├── feclip_train_on_visa_epoch_08.pth
|
| 75 |
+
├── feclip_train_on_visa_epoch_09.pth
|
| 76 |
+
└── history.json
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
Each checkpoint is approximately 105 MiB.
|
| 80 |
+
|
| 81 |
+
## Which Checkpoint Should I Use?
|
| 82 |
+
|
| 83 |
+
For normal evaluation, use the final epoch-9 checkpoint.
|
| 84 |
+
|
| 85 |
+
| Target dataset | Checkpoint to use |
|
| 86 |
+
|---|---|
|
| 87 |
+
| MVTec AD | `train_on_visa_seed_111/feclip_train_on_visa_epoch_09.pth` |
|
| 88 |
+
| VisA | `train_on_mvtec_seed_111/feclip_train_on_mvtec_epoch_09.pth` |
|
| 89 |
+
| Other zero-shot datasets | Start with the MVTec-trained epoch-9 checkpoint |
|
| 90 |
+
|
| 91 |
+
This direction is intentional. FE-CLIP follows a cross-dataset zero-shot anomaly-detection protocol:
|
| 92 |
+
|
| 93 |
+
- The MVTec-trained checkpoint is evaluated on VisA and other target datasets.
|
| 94 |
+
- The VisA-trained checkpoint is evaluated on MVTec AD.
|
| 95 |
+
- No training images from the target dataset should be used during zero-shot evaluation.
|
| 96 |
+
|
| 97 |
+
Epochs 1–8 are included for learning-curve analysis, ablation studies, checkpoint selection, and resuming experiments.
|
| 98 |
+
|
| 99 |
+
## Download and Extract
|
| 100 |
+
|
| 101 |
+
### Hugging Face CLI
|
| 102 |
+
|
| 103 |
+
Replace the repository name below with the actual repository ID:
|
| 104 |
+
|
| 105 |
+
```bash
|
| 106 |
+
hf download Parsagh1383/YOUR_REPOSITORY_NAME FE-CLIP.zip --local-dir .
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
Extract it with:
|
| 110 |
+
|
| 111 |
+
```bash
|
| 112 |
+
unzip FE-CLIP.zip
|
| 113 |
+
```
|
| 114 |
+
|
| 115 |
+
### Python
|
| 116 |
+
|
| 117 |
+
```python
|
| 118 |
+
from pathlib import Path
|
| 119 |
+
from zipfile import ZipFile
|