This is an implementation of Barlow Twins: Self-Supervised Learning via Redundancy Reduction.
I borrow from the original repo and mostly refactor to make configurable (via hydra), loggable via wandb, and integrate the timm library for fast experimentation.
Install dependencies into a virtualenv:
$ python -m venv env
$ source env/bin/activate
(env) $ pip install -r requirements.txt
Written with python version 3.8.11
Custom datasets can be placed in the data/
dir. Edits should be made to the conf/data/default.yaml
file to reflect the correct properties of the data. All other configuration hyperparameters can be set in the hydra configs.
Once properly configured, a model can be trained via python train.py
.
@misc{zbontar2021barlow,
title={Barlow Twins: Self-Supervised Learning via Redundancy Reduction},
author={Jure Zbontar and Li Jing and Ishan Misra and Yann LeCun and Stéphane Deny},
year={2021},
eprint={2103.03230},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
@misc{rw2019timm,
author = {Ross Wightman},
title = {PyTorch Image Models},
year = {2019},
publisher = {GitHub},
journal = {GitHub repository},
doi = {10.5281/zenodo.4414861},
howpublished = {\url{https://github.com/rwightman/pytorch-image-models}}
}