GitHub

Create conda environment

You need anaconda/miniconda to create a proper environment by:

conda env create --file=environment.yml && conda activate brics_release

Dataset

To prepare dataset of FFHQ and LSUN-Church, please refer to this link. We would construct the dataset to a zip file.

For the Webvid-Frames200k dataset we construct from Webvid-10M. We use a modified script webvid_frames_download.py to download frames.

RES=256 SAVE_IMG_DIR=$SAVE_FOLDER_NAME python webvid_frames_download.py --csv_path $CSV_FILE --partitions 1 --part 0 --data_dir $ROOT_OF_DATA_DIR --processes 8

Please check the original Webvid-10M repository to get the csv file for different partions.

Training

Reconstruction Stage

Run following script to train the autoencoder model of reconstruction.

bash run.sh $EXP_NAME $NUM_GPU $BATCH_SIZE $DATASET_FILE --gamma=4 --table_size_log2=18 --level_dim=4 --feat_coord_dim=4 --img_snap=2 --init_res=64 --style_dim=512 --img_size=256 --table_num=16 --res_min=16 --init_dim=512 --tile_coord=true --encoder_flag=true --mini_linear_n_layers=3 --disable_patch_gan=true --feat_coord_dim_per_table=1 --num_downsamples=2 --additional_decoder_conv=true --use_kl_reg=false --noise_perturb=true --attn_resolutions 64 --grid_type="tile"
Args Symbol in the paper
level_dim

Read the original on github.com ↗