An reimplement of Learning Continuous Image Representation with Local Implicit Image Function using lightning and hydra based on this awesome template.
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