Skip to content

An reimplement of liif(Learning Continuous Image Representation with Local Implicit Image Function) using lightning+hydra

License

Notifications You must be signed in to change notification settings

Luciennnnnnn/liif-lightning-hydra

Repository files navigation

LIIF with Lightning + Hydra

PyTorch Lightning Config: Hydra

Description

An reimplement of Learning Continuous Image Representation with Local Implicit Image Function using lightning and hydra based on this awesome template.

How to run

Install dependencies

# clone project
git clone git@github.com:LuoXin-s/liif-lightning-hydra.git
cd liif-lightning-hydra

# [OPTIONAL] create conda environment
conda env create -f conda_env_gpu.yaml -n your_env_name
conda activate your_env_name

# install requirements
pip install -r requirements.txt

Train model with default configuration (train on DIV2K with visible GPUs)

python run.py

# specify used GPUs
python run.py trainer.gpus=[0, 2, 5]

# use cpu
python run.py trainer.gpus=0

Train model with chosen experiment configuration

# experiment configurations are placed in folder `configs/experiment/`
python run.py +experiment=exp_example_simple

# train on CelebAHQ
python run.py +experiment=train_on_CelebAHQ_32_256
python run.py +experiment=train_on_CelebAHQ_64_128

Test model

# test pretrained model on DIV2K
python run.py train=false

You can override any parameter from command line like this

python run.py trainer.max_epochs=20 optimizer.lr=0.0005

About

An reimplement of liif(Learning Continuous Image Representation with Local Implicit Image Function) using lightning+hydra

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published