caiyuanhao1998 / Retinexformer

"Retinexformer: One-stage Retinex-based Transformer for Low-light Image Enhancement" (ICCV 2023) & (NTIRE 2024 Challenge)
https://arxiv.org/abs/2303.06705
MIT License
828 stars 64 forks source link

推理结果产生黑块 #68

Closed MulitiByte closed 4 months ago

MulitiByte commented 4 months ago

您好,我在使用RetinexFormer_LOL_v2_real.yml配置进行训练时,推理图像产生了随机的黑块,请问这是什么原因? 以下是我的具体配置

general settings

name: Enhancement_RetinexFormer_LOL_v2_real model_type: ImageCleanModel scale: 1 num_gpu: 4 # set num_gpu: 0 for cpu mode manual_seed: 100

dataset and data loader settings

datasets: train: name: TrainSet type: Dataset_PairedImage dataroot_gt: /mnt/lustre/GPU4/home/wuzhiqi/workspace/lol_train_gt dataroot_lq: /mnt/lustre/GPU4/home/wuzhiqi/workspace/lol_train_lq geometric_augs: true

filename_tmpl: '{}'
io_backend:
  type: disk

# data loader
use_shuffle: true
num_worker_per_gpu: 8
batch_size_per_gpu: 16

### ------- Training on single fixed-patch size 128x128---------
mini_batch_sizes: [8]   
iters: [300000]
gt_size: 256   
gt_sizes: [256]
### ------------------------------------------------------------

dataset_enlarge_ratio: 1
prefetch_mode: ~

val: name: ValSet type: Dataset_PairedImage dataroot_gt: /mnt/lustre/GPU4/home/wuzhiqi/workspace/lol_val_gt dataroot_lq: /mnt/lustre/GPU4/home/wuzhiqi/workspace/lol_val_lq io_backend: type: disk

network structures

network_g: type: RetinexFormer in_channels: 3 out_channels: 3 n_feat: 40 stage: 1 num_blocks: [1,2,2]

path

path: pretrain_network_g: ~ strict_load_g: true resume_state: ~

training settings

train: total_iter: 150000 warmup_iter: -1 # no warm up use_grad_clip: true

Split 300k iterations into two cycles.

1st cycle: fixed 3e-4 LR for 92k iters.

2nd cycle: cosine annealing (3e-4 to 1e-6) for 208k iters.

scheduler: type: CosineAnnealingRestartCyclicLR periods: [46000, 104000]
restart_weights: [1,1] eta_mins: [0.0003,0.000001]

mixing_augs: mixup: true mixup_beta: 1.2 use_identity: true

optim_g: type: Adam lr: !!float 2e-4

weight_decay: !!float 1e-4

betas: [0.9, 0.999]

losses

pixel_opt: type: L1Loss loss_weight: 1 reduction: mean

validation settings

val: window_size: 4 val_freq: !!float 1e3 save_img: true rgb2bgr: true use_image: false max_minibatch: 8

metrics: psnr: # metric name, can be arbitrary type: calculate_psnr crop_border: 0 test_y_channel: false

logging settings

logger: print_freq: 500 save_checkpoint_freq: !!float 1e3 use_tb_logger: true wandb: project: low_light resume_id: ~

dist training settings

dist_params: backend: nccl port: 29500