Imbalance-Robust and Sampling-Efficient Continuous Conditional GANs via Adaptive Vicinity and Auxiliary Regularization
If you use this code, please cite
@article{ding2025imbalance,
title={Imbalance-Robust and Sampling-Efficient Continuous Conditional GANs via Adaptive Vicinity and Auxiliary Regularization},
author={Ding, Xin and Chen, Yun and Wang, Yongwei and Zhang, Kao and Zhang, Sen and Cao, Peibei and Wang, Xiangxue},
journal={arXiv preprint arXiv:2508.01725},
year={2025}
}
- Support training CcGAN and CcGAN-AVAR on multiple datasets with a unified framework.
- Support DCGAN, SNGAN, SAGAN, BigGAN and BigGAN-deep architectures.
- Support three types of label embeeding: CcGAN's ILI, Sinusoidal, and Gaussian Fourier.
- Support mixed precision training based on Accelerate.
- Support Exponential Moving Average (EMA). Not compatible with self-attention in SAGAN and BigGAN!
| Item | Version |
|---|---|
| OS | Ubuntu 22.04 |
| CUDA | 12.8 |
| MATLAB | R2021 |
| Python | 3.12.7 |
| numpy | 1.26.4 |
| scipy | 1.13.1 |
| h5py | 3.11.0 |
| matplotlib | 3.9.2 |
| Pillow | 10.4.0 |
| torch | 2.7.0 |
| torchvision | 0.22.0 |
| accelearate | 1.6.0 |
All 256x256 experiments need to be conducted with torch>=2.8.
RC-49_64x64_OneDrive_link
RC-49_64x64_BaiduYun_link
RC-49-I_64x64_OneDrive_link
RC-49-I_64x64_BaiduYun_link
UTKFace_64x64_Onedrive_link
UTKFace_64x64_BaiduYun_link
UTKFace_128x128_OneDrive_link
UTKFace_128x128_BaiduYun_link
UTKFace_192x192_OneDrive_link
UTKFace_192x192_BaiduYun_link
UTKFace_256x256_OneDrive_link
UTKFace_256x256_BaiduYun_link
SteeringAngle_64x64_OneDrive_link
SteeringAngle_64x64_BaiduYun_link
SteeringAngle_128x128_OneDrive_link
SteeringAngle_128x128_BaiduYun_link
SteeringAngle_256x256_OneDrive_link
SteeringAngle_256x256_BaiduYun_link
Download the evaluation checkpoints (zip file) from OneDrive or BaiduYun, then extract the contents to ./CcGAN-AVAR/evaluation/eval_ckpts.
Before training CcGAN-AVAR, first train the auxiliary ResNet18 regression model by executing the .sh scripts in ./config/aux_reg. Ensure the root path and data path are correctly configured.
We provide the .sh file for training CcGAN-AVAR-S or CcGAN-AVAR-H on each dataset in ./config. Ensure the root path and data path are correctly configured.
After the training, the sampling usually automatically starts. Ensure that the --do_eval flag is enabled.
To enable NIQE calculation, set both --dump_fake_for_niqe and --niqe_dump_path to output generated images to your specified directory. Implementation details are available at: https://github.com/UBCDingXin/CCDM