لم يعد هذا الريبو يتم الحفاظ عليه. تمت إضافة تنفيذ 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-Abarghoei A. In: Jawahar C. ، Li H. ، Mori G. ، Schindler K. (eds) Computer Vision - ACCV 2018. ACCV 2018.