Skip to content

Latest commit

 

History

History
70 lines (46 loc) · 2.69 KB

TrainStyleGAN3Model.md

File metadata and controls

70 lines (46 loc) · 2.69 KB

Train StyleGAN model

The styleGAN3 model is trained on the Cedar platform. This model supports three configs: StyleGAN3-T (translation equiv.), StyleGAN3-R (translation and rotation equiv.), or StyleGAN2.

Refer to this documentation to prepare the image set for this training.

Start the training job

Step 1: Use rsync or other commands to transfer transformed Bliss images to Cedar

Step 2. Login to the Cedar and fetch stylegan3 source code

mkdir stylegan3
cd stylegan3
git clone https://github.com/NVlabs/stylegan3

Step 3. Creating a zip archive of Bliss images will lead to a better performance

cd stylegan3
python dataset_tool.py --source=../bliss_single_chars_final --dest=../datasets/bliss-256x256.zip

Step 4: Submit Job

cd ~/scratch
sbatch job_stylegan3.sh

Use sq to check the status of the job. Use scancel to cancel a running job.

The training result

The Bliss images were first trained using stylegan3-r config (translation and rotation equiv.). This job had to be cancelled after running 2.5 days because the cluster the job was running on is a shared resource that was waited by another team. Before the cancellation, the job had generated some training result that can be found at this repository.

reals.png is a collection of real Bliss symobles

fakes*.png are random image grids exported from the training loop at regular intervals.

training_options.json contains training options used for this round of training.

metric-fid50k_full.jsonl logs the result and records` FID evaluated by the training loop for every export.

Use a trained model to generate images

Looking at metric-fid50k_full.jsonl, network-snapshot-004160.pkl model has the lowest FID value. Run this command to submit a job to generate an image using this model:

sbatch job_stylegan3-t_gen_images.sh

job_stylegan3-t_gen_images.sh can be located here.

Conclusion

After studying the training results and images generated by a trained model. Generated images are not good enough for brainstorming new Bliss symbols. The decision is not to continue explore this model.