byol-pytorch

πŸ“ˆ BYOL (Bootstrap Your Own Latent) – From Scratch Implementation in PyTorch

PyTorch Python Jupyter Notebook License GitHub Stars

Welcome to the BYOL (Bootstrap Your Own Latent) repository! This project provides a comprehensive, from-scratch implementation of BYOL, a revolutionary self-supervised learning algorithm. Whether you’re a researcher, developer, or enthusiast, this repository offers valuable insights into state-of-the-art unsupervised feature learning.

If you find this project useful, please star this repository! ⭐


πŸš€ Key Highlights


🧠 What is BYOL?

Bootstrap Your Own Latent (BYOL) is a self-supervised learning algorithm that breaks new ground by learning from positive pairs (different augmentations of the same image) without relying on negative samples. This simplicity leads to faster training and competitive results across a range of benchmarks.

✨ Key Features:

BYOL Model Overview

BYOL Model Architecture


πŸ“Š Experimental Results

We evaluated our implementation using the STL10 Dataset, showcasing the impact of BYOL pretraining:

Training Method Accuracy
Without Pretraining 84.58%
With BYOL Pretraining 87.61%

This demonstrates how BYOL can effectively enhance feature learning, even with relatively few epochs.


πŸ“ Dataset: STL10

The STL10 Dataset is designed for unsupervised and self-supervised learning models, making it a perfect fit for BYOL.

STL10 Dataset Sample

STL10 Dataset Example


πŸ”§ Getting Started

Prerequisites

Clone the repository and install the required dependencies


πŸ“š Citations

@inproceedings{NEURIPS2020_f3ada80d,
  author = {Grill, Jean-Bastien and Strub, Florian and Altch\'{e}, Florent and Tallec, Corentin and Richemond, Pierre and Buchatskaya, Elena and Doersch, Carl and Avila Pires, Bernardo and Guo, Zhaohan and Gheshlaghi Azar, Mohammad and Piot, Bilal and kavukcuoglu, koray and Munos, Remi and Valko, Michal},
  booktitle = {Advances in Neural Information Processing Systems},
  editor = {H. Larochelle and M. Ranzato and R. Hadsell and M.F. Balcan and H. Lin},
  pages = {21271--21284},
  publisher = {Curran Associates, Inc.},
  title = {Bootstrap Your Own Latent - A New Approach to Self-Supervised Learning},
  url = {https://proceedings.neurips.cc/paper_files/paper/2020/file/f3ada80d5c4ee70142b17b8192b2958e-Paper.pdf},
  volume = {33},
  year = {2020}
}

🧾 License

This project is licensed under the MIT License. See the LICENSE file for details.