Check python version 3.7.6
pip3 install virtualenv
virtualenv venv --python=python3
source venv/bin/activate
pip3 install -r requirements.txt
Running data/stl10_input.py will download the stl10 dataset and save it to disk. This script is from https://github.com/mttk/STL10. It also contains various utils for loading the dataset in python.
To train, run 'self-train.py --experiment=binary --subset=1 --self_train=True --epochs=20 --batch=1000 --threshold=.75'. The experiment can be changed to train different versions of the model. self-train.py has added documentation for clarity. The possible experiments are: Binary - Train binary classifier with two classes, animal and machine Animal - Train animal classifier on the 6 animal classes. Machine - Train machine classifier on the 4 machine classes. Default - Train 10 class classifier on all 10 classes. Disagreement - Train animal classifier with an additional "machine class", and a machine classifier with an additional "animal class". There are several variations on this file with minor changes.
To evaluate save models, use evaluate.py for evaluating saved binary, default, animal, or machine models. User evaluate_disagreement.py for evaluating the disagreement models for animal and machine.
util.py contains common functions for evaluation and training.
Our best results were generated by running self-train.py --experiment=binary --subset=1 --self_train=False --epochs=60 --batch=100