Skip to content

This repository contains the implementation of FAPM (2023 ICASSP).

License

Notifications You must be signed in to change notification settings

Yonsei-MVPLAB/FAPM_official

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FAPM_official

This repository contains the implementation of FAPM (2023 ICASSP).

https://arxiv.org/abs/2211.07381

PWC

We propose a new method called Fast Adaptive Patch Memory (FAPM) for real-time industrial anomaly detection. FAPM utilizes patch-wise and layer-wise memory banks that store the embedding features of images at the patch and layer level, respectively, which eliminates unnecessary repetitive computations. We also propose patch-wise adaptive coreset sampling for faster and more accurate detection.

Future work

  • Inference Code
  • Pretrained Memory
  • Training Code

Development setup

conda environment

git clone https://github.com/donghyung87/FAPM_official.git
conda create -n FAPM
conda activate FAPM

pip install -r requirements.txt

Dataset

Please download the MVTec dataset from this website.

Usage

Inference Code

python test.py --dataset_path=$DATASET_PATH --result_path=$RESULT_PATH --category=capsule --project_root_path=$PRETRAINED_MEMORY_DIRECTORY

You can download pretrained memory from this google link.

Citation

Cite as below if you find this repository is helpful to your project:

@article{kim2022fapm,
  title={FAPM: Fast Adaptive Patch Memory for Real-time Industrial Anomaly Detection},
  author={Kim, Donghyeong and Park, Chaewon and Cho, Suhwan and Lee, Sangyoun},
  journal={arXiv preprint arXiv:2211.07381},
  year={2022}
}

Acknowledgement

Some code snippets are borrowed from PatchCore_anomaly_detection and patchcore-inspection. I'm really appreciate to your great projects!!

About

This repository contains the implementation of FAPM (2023 ICASSP).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%