Generator + Discriminator model
- GANomaly-Pytorch
- Requirement
- implement
- Train-on-custom-dataset
- Train
- Test
- Lose-value-distribution
- Reference
pip install -r requirements.txt
-
Encoder--Decoder--Encoder
-
loss function
-
Encoder/Decoder : Use paper network, conv--batchnorm--leakyrelu
-
Discriminator (2022/08/30 updated)
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
python train.py --img-dir "[train dataset dir]" --batch-size 64 --img-size 32 --epoch 20
python test.py --nomal-dir "[test normal dataset dir]" --abnormal-dir "[test abnormal dataset dir]" --view-img --img-size 32
Example : Train dataset : factory line only
dataset :factory line , top: input images, bottom: reconstruct images

dataset :factory noline , top: input images, bottom: reconstruct images

Blue : normal dataset
Orange : abnormal dataset

