lyh-18 / DegAE_DegradationAutoencoder

Codes for CVPR2023 paper "DegAE: A New Pretraining Paradigm for Low-level Vision"
60 stars 1 forks source link

Unable to reproduce the results in the image deraining. #5

Open jkhu29 opened 3 months ago

jkhu29 commented 3 months ago

Thank you for your amazing work on pre-training in image restoration! However, I encountered some issues when testing DegAE using the weights you provided. As indicated in the log below, DegAE (Restormer) only has 36.70dB on the Y channel on Rain100L, but in the article, this indicator is as high as 38.83 dB. I assume this is due to a discrepancy in the data we used. Could you please provide your test dataset so that everyone may duplicate the results described in the article?

24-05-13 14:44:04.273 - INFO:   name: Test_DegAE_Finetune_Derain_Restormer
  suffix: None
  model: ddg_encoder_decoder_mse
  distortion: sr
  scale: 1
  crop_border: 0
  gpu_ids: []
  datasets:[
    test_0:[
      name: Rain100L_test
      mode: LQGT
      dataroot_GT: /DerainDataset/Derain/Rain100L/norain
      dataroot_LQ: /DerainDataset/Derain/Rain100L/rainy
      phase: test
      scale: 1
      data_type: img
    ]
  ]
  network_DDE:[
    which_model_DDE: Restormer_Backbone
    inp_channels: 3
    out_channels: 64
    dim: 48
    num_blocks: [4, 6, 6, 8]
    num_refinement_blocks: 4
    heads: [1, 2, 4, 8]
    ffn_expansion_factor: 2.66
    bias: False
    LayerNorm_type: WithBias
    dual_pixel_task: False
    global_residual: False
    scale: 1
  ]
  network_DDG:[
    which_model_DDG: One_Conv_Head
    in_nc: 64
    out_nc: 3
    upscale: 1
    modul_channels: 512
    require_modulation: False
  ]
  path:[
    pretrain_model_Encoder: /DegAE_DegradationAutoencoder/DegAE_Restormer_Finetune/ComplexDerain/Restormer_Derain_Encoder.pth
    pretrain_model_Decoder1: /DegAE_DegradationAutoencoder/DegAE_Restormer_Finetune/ComplexDerain/Restormer_Derain_Decoder.pth
    strict_load: True
    root: /DegAE_DegradationAutoencoder
    results_root: /DegAE_DegradationAutoencoder/results/Test_DegAE_Finetune_Derain_Restormer
    log: /DegAE_DegradationAutoencoder/results/Test_DegAE_Finetune_Derain_Restormer
  ]
  is_train: False

24-05-13 14:44:04.285 - INFO: Dataset [LQGTDataset - Rain100L_test] is created.
24-05-13 14:44:04.285 - INFO: Number of test images in [Rain100L_test]: 100
GR:  False
Head: One_Conv_Head
24-05-13 14:44:05.824 - INFO: Network netGenerator structure: DataParallel - One_Conv_Head, with parameters: 38,659
24-05-13 14:44:05.824 - INFO: One_Conv_Head(
  (conv_last): Conv2d(64, 3, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
  (HRconv): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1))
  (lrelu): LeakyReLU(negative_slope=0.1, inplace=True)
)
24-05-13 14:44:05.824 - INFO: Loading model for Encoder 
24-05-13 14:44:06.528 - INFO: Loading model for Decoder1 
[global_residual: ] None
24-05-13 14:44:06.539 - INFO: Model [DDGModel] is created.
24-05-13 14:44:06.539 - INFO: 
Testing [Rain100L_test]...
crop_border:  0
24-05-13 14:45:43.207 - INFO: ----Average PSNR/SSIM results for Rain100L_test----
        PSNR: 35.389230 dB; SSIM: 0.972801; NIQE: 4.7687

24-05-13 14:45:43.208 - INFO: ----Y channel, average PSNR/SSIM----
        PSNR_Y: 36.702214 dB; SSIM_Y: 0.976221