repo นี้ไม่ได้รับการดูแลอีกต่อไป การใช้งาน Ganomaly ได้ถูกเพิ่มเข้าไปในความผิดปกติซึ่งเป็นคอลเลกชันสาธารณะที่ใหญ่ที่สุดของอัลกอริทึมการตรวจจับความผิดปกติที่มีการเรียนรู้อย่างลึกซึ้งและชุดข้อมูลมาตรฐาน
พื้นที่เก็บข้อมูลนี้มีการใช้งาน 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
สำหรับตัวเลือกการฝึกอบรมเพิ่มเติม Run 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) Vision คอมพิวเตอร์ - ACCV 2018. ACCV 2018 บันทึกการบรรยายในวิทยาศาสตร์คอมพิวเตอร์ฉบับที่ 11363 Springer, Cham