Imbalance-Robust and Sampling-Efficient Continuous Conditional GANs via Adaptive Vicinity and Auxiliary Regularization
October 30, 2025 ยท View on GitHub
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}
}
To do list:
- 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!
Software Requirements
| 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.
Datasets
RC-49 (64x64)
RC-49_64x64_OneDrive_link
RC-49_64x64_BaiduYun_link
RC-49-I (64x64)
RC-49-I_64x64_OneDrive_link
RC-49-I_64x64_BaiduYun_link
The preprocessed UTKFace Dataset (h5 file)
UTKFace (64x64)
UTKFace_64x64_Onedrive_link
UTKFace_64x64_BaiduYun_link
UTKFace (128x128)
UTKFace_128x128_OneDrive_link
UTKFace_128x128_BaiduYun_link
UTKFace (192x192)
UTKFace_192x192_OneDrive_link
UTKFace_192x192_BaiduYun_link
UTKFace (256x256)
UTKFace_256x256_OneDrive_link
UTKFace_256x256_BaiduYun_link
The Steering Angle dataset (h5 file)
Steering Angle (64x64)
SteeringAngle_64x64_OneDrive_link
SteeringAngle_64x64_BaiduYun_link
Steering Angle (128x128)
SteeringAngle_128x128_OneDrive_link
SteeringAngle_128x128_BaiduYun_link
Steering Angle (256x256)
SteeringAngle_256x256_OneDrive_link
SteeringAngle_256x256_BaiduYun_link
Preparation (Required!)
Download the evaluation checkpoints (zip file) from OneDrive or BaiduYun, then extract the contents to ./CcGAN-AVAR/evaluation/eval_ckpts.
Training
(1) Auxiliary regression model training
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.
(2) CcGAN-AVAR training
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.
Sampling and Evaluation
(1) SFID, Diversity, and Label Score
After the training, the sampling usually automatically starts. Ensure that the --do_eval flag is enabled.
(2) NIQE
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