이 저장소는 더 이상 유지 관리되지 않습니다. Ganomaly 구현은 즉시 사용 가능한 딥 러닝 이상 탐지 알고리즘 및 벤치 마크 데이터 세트의 가장 큰 공개 컬렉션 인 Anomalib에 추가되었습니다.
이 저장소는 다음 논문의 Pytorch 구현이 포함되어 있습니다. Ganomaly : 적대 훈련을 통한 반 감독 이상 탐지 [1]
git clone https://github.com/samet-akcay/ganomaly.git
conda create -n ganomaly python=3.7
conda activate ganomaly
conda install -c intel mkl_fft
pip install --user --requirement requirements.txt
MNIST 및 CIFAR10 데이터 세트 용 논문의 결과를 복제하려면 다음 명령을 실행하십시오.
# MNIST
sh experiments/run_mnist.sh
# CIFAR
sh experiments/run_cifar.sh # CIFAR10 인수를 나열하려면 다음 명령을 실행하십시오.
python train.py -h
주어진 이상 클래스에 대한 MNIST 데이터 세트의 모델을 훈련 시키려면 다음을 실행하십시오.
python train.py
--dataset mnist
--niter <number-of-epochs>
--abnormal_class <0,1,2,3,4,5,6,7,8,9>
--display # optional if you want to visualize
주어진 이상 클래스에 대한 CIFAR10 데이터 세트의 모델을 교육하려면 다음을 실행하십시오.
python train.py
--dataset cifar10
--niter <number-of-epochs>
--abnormal_class
<plane, car, bird, cat, deer, dog, frog, horse, ship, truck>
--display # optional if you want to visualize
사용자 정의 데이터 세트에서 모델을 교육하려면 데이터 세트를 ./data 디렉토리로 복사해야하며 다음 디렉토리 및 파일 구조가 있어야합니다.
Custom Dataset
├── test
│ ├── 0.normal
│ │ └── normal_tst_img_0.png
│ │ └── normal_tst_img_1.png
│ │ ...
│ │ └── normal_tst_img_n.png
│ ├── 1.abnormal
│ │ └── abnormal_tst_img_0.png
│ │ └── abnormal_tst_img_1.png
│ │ ...
│ │ └── abnormal_tst_img_m.png
├── train
│ ├── 0.normal
│ │ └── normal_tst_img_0.png
│ │ └── normal_tst_img_1.png
│ │ ...
│ │ └── normal_tst_img_t.png
그런 다음 모델 교육은 MNIST 또는 CIFAR10 데이터 세트 교육과 동일합니다.
python train.py
--dataset <name-of-the-data>
--isize <image-size>
--niter <number-of-epochs>
--display # optional if you want to visualize
더 많은 교육 옵션을 보려면 python train.py -h 실행하십시오.
이 저장소를 사용하거나 논문을 참조하려면 다음 Bibtex 항목을 사용하십시오.
@inproceedings{akcay2018ganomaly,
title={Ganomaly: Semi-supervised anomaly detection via adversarial training},
author={Akcay, Samet and Atapour-Abarghouei, Amir and Breckon, Toby P},
booktitle={Asian Conference on Computer Vision},
pages={622--637},
year={2018},
organization={Springer}
}
[1] Akcay S., Atapour-Abarghouei A., Breckon TP (2019) Ganomaly : 대적 훈련을 통한 반 감독 이상 탐지. 에서 : Jawahar C., Li H., Mori G., Schindler K. (eds) 컴퓨터 비전 - Accv 2018. Accv 2018. 컴퓨터 과학 강의 노트, Vol 11363. Springer, Cham