Yann-CV / vintage-models

Pytorch personal implementation of the most famous neural network models
GNU General Public License v3.0
0 stars 0 forks source link

vintage-models

Hey lucky people, you have probably lost yourself to end up here.

Anyway, welcome to my vintage-models repository. Here you will find some personal implementations of few (I do not know yet how many) of the most famous neural network models allowing to process images.

These implementations are made from my personal understanding of the scientific papers introducing these models. Thus, some implementation/architecture choices can be (are probably) wrong. Even though the likelihood that one of you will use some code from here is really small, please accept my deep apologies for that.

Beside better understanding these models behavior, I am also using this repository as a road to better learn how to use PyTorch. Thus, in addition of questionable model architecture, these implementations are probably weak version of "more official" ones.

Implemented models

The list as been created from prompting OpenAI ChatGpt regarding the most famous models.

Convolutional Neural Networks

Transformers

Autoencoder

Adversarial

How to run the code

Install Python (on Ubuntu)

# Install pyenv and pyenv-virtualenv
curl https://pyenv.run | bash

# Configure bash
# see https://github.com/pyenv/pyenv/issues/1906
echo >> ~/.bashrc 'export PATH="$HOME/.pyenv/bin:$PATH"'
echo >> ~/.bashrc 'eval "$(pyenv init --path)"'
echo >> ~/.bashrc 'eval "$(pyenv init -)"'
echo >> ~/.bashrc 'eval "$(pyenv virtualenv-init -)"'

# Reload bash's configuration
source ~/.bashrc

# Prepare your Ubuntu for building Python
sudo apt install build-essential libz-dev libssl-dev libbz2-dev libreadline-dev libsqlite3-dev libffi-dev

# Install Python
pyenv install 3.10.9

Install the requirements

pyenv virtualenv 3.10.9 vintage-models
pyenv activate vintage-models
pip install -r requirements.txt

Activate Pre-commits validation

Then activate the pre-commit hooks:

pre-commit install --allow-missing-config

Warning: if you have aliases for python or pip, it will break pyenv. Please verify that you are running the version of Python controlled by pyenv by running which python. If the output does not contain the string pyenv, something is wrong with your install

Not exhaustive list of could be implemented models

The list as been created from prompting OpenAI ChatGpt regarding the most famous models.

Convolutional Neural Networks

Transformers

Diffusion models

Vision Language Models