The code for image generation using C3 is minimally adapted from Lafite. Wandb was integrated for logging.
Please refer to the instructions to prepare MSCOCO from the Lafite official repo. We directly use their preprocessed training and validation sets.
For all our experiments, we finetune Lafite pre-trained on Google CC3M.
Create conda environment
conda env create -f environment.yml
Compute embedding means
python3 compute_embed_mean.py
Scripts for C1, C21, C22, C3 and Lafite (baseline) have been provided in scripts
.
To run C3,
bash ./scripts/train_c3.sh
Images can be generated using the notebook generate.ipynb
.