Old is Gold: Redefining the Adversarially Learned One-Class Classifier Training Paradigm (CVPR 2020)
CVPR Presentation || Paper || CVPR CVF Archive || Supp material zip file || Ped2 Results Video
- Python2.7
- torch 1.2.0
- torchvision 0.4.0
Previously, the code was built using Python3.5, but as the version has reached its EOL, this code is verified on Python 2.7 now.
- Train.py is the entry point to the code.
- Place training and testing images under the directory 'data' by following the instructions provided in 'dataset.txt' file.
- Set necessary options in opts.py for phase one and opts_fine_tune_discriminator.py for phase two.
- Execute Train.py
Previously, only test codes were provided for which test.py file was needed to run the evaluation. For that, the instructions can be found below. Note that, for the current version. test.py is not required as the code calls the test function every iteration from within to visualize the performance difference between the baseline and the OGNet.
- Download trained generator and discriminator models from here and place inside the directory ./models/
- Download datasets here and place test images in the subdirectories of ./data/test/
- Example:
- All images from inlier class (*.png) should be placed as ./data/test/0/*.png
- Similarly, all images from outlier class (* *.png) should be placed as ./data/test/1/* *.png
- Example:
- run test.py
The models provided are trained on the training set of '0' class in MNIST dataset. For evaluation, the test dataset provided contains all test images from class '0' as inliers, whereas 100 images each from all other classes as outliers.
[17.6.2020] For the time being, test code (and some trained models) are being made available. Training code will be uploaded in some time.
[05.3.2021] A mockup training code is uploaded which can be used for training and evaluation of the model.
For any queries, please feel free to contact Zaigham through mzz . pieas @ gmail . com
If you find this code helpful, please cite our paper:
@inproceedings{zaheer2020old,
title={Old is Gold: Redefining the Adversarially Learned One-Class Classifier Training Paradigm},
author={Zaheer, Muhammad Zaigham and Lee, Jin-ha and Astrid, Marcella and Lee, Seung-Ik},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={14183--14193},
year={2020}
}