Implementation of a paper that uses geometric transformations to extract features of an image without requiring these images to be labeled.
Paper: https://arxiv.org/pdf/1803.07728.pdf
pip3 install vitrualenv
(if not already installed)
virtualenv venv
source venv/bin/activate
pip3 install -r requirements.txt
To deactivate the environment you are in run:
source deactivate
Most of the code is written in the data.py, resnet.py, and rotnet.py.
Rotnet.py
contains the training loop and the basic graph for the model.
Resnet.py
contains the implementation of the resnet model
Data.py
contains all the data loading functions.
You can start training by running main.py
with the following command:
python3 main.py --config config.yaml --train --data_dir ./data/cifar-10-batches-py/ --model_number 1
config.yaml
contains the configuration file with all the hyperparameters.
You can read more about the CIFAR-10 dataset here: https://www.kaggle.com/c/cifar-10
- Go to this link https://www.cs.toronto.edu/~kriz/cifar.html
- Right click on "CIFAR-10 python version" and click "Copy Link Address"
- Go to your CLI and go into the
data
directory. - Run this cURL command to start downloading the dataset:
curl -O <URL of the link that you copied>
- To extract the data from the .tar file run:
tar -xzvf <name of file>
(typeman tar
in your CLI to see the different options for running the tar command). NOTE: Each file in the directory contains a batch of images in CIFAR-10 that have been serialized using python's pickle module. You will have to first unpickle the data before loading it into your model.