Skip to content

cgrabows-ml/self-training-image-rec

Repository files navigation

self-training-image-rec

Setup:

Check python version 3.7.6

pip3 install virtualenv
virtualenv venv --python=python3
source venv/bin/activate
pip3 install -r requirements.txt

Get Data

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.

Training

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.

Evaluation

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

util.py contains common functions for evaluation and training.

Results

Our best results were generated by running self-train.py --experiment=binary --subset=1 --self_train=False --epochs=60 --batch=100

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages