CR-Gjx / SCC

Pytorch implementation of "Alleviating Semantics Distortion in Unsupervised Low-Level Image-to-Image Translation via Structure Consistency Constraint." (CVPR 2022).
19 stars 1 forks source link

The SCC+CycleGAN model is generating random noise with negative with SCC loss values #7

Open Cinex10 opened 4 months ago

Cinex10 commented 4 months ago

Hello, I have attempted to train the SCC + CycleGAN model on the GTA to Cityscapes dataset which contains +22K images, and after approximately 200 training steps, the model starts generating noise images that bear no resemblance to the input (in both directions of translation). It's worth noting that I'm observing negative SCC loss values, which sometimes explode and reach values as low as -3000. Additionally, I've noticed that the identity losses (both A and B) exhibit high values after a certain number of training steps from the beginning of the training process. Below is the complete configuration of the training process:

batch_size:6 beta1:0.5 bf16:false continue_train:false crop_size:256 dataset_mode:"unaligned" direction:"AtoB" display_env:"main" display_freq:400 display_id:1 display_ncols:4 display_port:8,097 display_server:http://localhost/ display_winsize:256 epoch:"latest" epoch_count:1 gan_mode:"lsgan" init_gain:0.02 init_type:"normal" input_nc:3 isTrain:true lambda_A:10 lambda_B:10 lambda_GAN_A:1 lambda_GAN_B:1 lambda_identity:0.5 lambda_SCC:0.9 load_iter:0 load_size:256 lr:0.0002 lr_decay_iters:50 lr_policy:"linear" max_dataset_size:∞ model:"scc_cycle_gan" n_epochs:40 n_epochs_decay:10 n_layers_D:3 name:"gta2city_scc_cycle_train_fp32" ndf:64 netD:"basic" netG:"resnet_9blocks" ngf:64 no_dropout:true no_flip:false no_html:false norm:"instance" num_threads:4 output_nc:3 phase:"train" pool_size:50 preprocess:"scale_width" print_freq:100 save_by_iter:false save_epoch_freq:5 save_latest_freq:5,000 serial_batches:false update_html_freq:1,000 use_wandb:true verbose:false wandb_project_name:"gta2city"

Screenshot from 2024-05-09 18-20-11

Cinex10 commented 4 months ago

I have experimented with setting lambda_SCC to 9, but I encountered the same issue.