diff --git a/Scripts/options/train_default_options_paired_finetune.yml b/Scripts/options/train_default_options_paired_finetune.yml index 6a0b1b8c..5e6dcd72 100644 --- a/Scripts/options/train_default_options_paired_finetune.yml +++ b/Scripts/options/train_default_options_paired_finetune.yml @@ -145,11 +145,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/ATD/ATD_OTF_finetune.yml b/options/train/ATD/ATD_OTF_finetune.yml index fa736621..ec0cb9d8 100644 --- a/options/train/ATD/ATD_OTF_finetune.yml +++ b/options/train/ATD/ATD_OTF_finetune.yml @@ -197,11 +197,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/ATD/ATD_finetune.yml b/options/train/ATD/ATD_finetune.yml index cf197840..98f63465 100644 --- a/options/train/ATD/ATD_finetune.yml +++ b/options/train/ATD/ATD_finetune.yml @@ -143,11 +143,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/ArtCNN/ArtCNN_OTF_finetune.yml b/options/train/ArtCNN/ArtCNN_OTF_finetune.yml index 93adc8a1..b0fa6c8a 100644 --- a/options/train/ArtCNN/ArtCNN_OTF_finetune.yml +++ b/options/train/ArtCNN/ArtCNN_OTF_finetune.yml @@ -200,11 +200,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/ArtCNN/ArtCNN_finetune.yml b/options/train/ArtCNN/ArtCNN_finetune.yml index 3e92eb55..77841c01 100644 --- a/options/train/ArtCNN/ArtCNN_finetune.yml +++ b/options/train/ArtCNN/ArtCNN_finetune.yml @@ -146,11 +146,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/Compact/Compact_OTF_finetune.yml b/options/train/Compact/Compact_OTF_finetune.yml index f42e75ab..2e73f35c 100644 --- a/options/train/Compact/Compact_OTF_finetune.yml +++ b/options/train/Compact/Compact_OTF_finetune.yml @@ -197,11 +197,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/Compact/Compact_finetune.yml b/options/train/Compact/Compact_finetune.yml index bd50a027..d6070e48 100644 --- a/options/train/Compact/Compact_finetune.yml +++ b/options/train/Compact/Compact_finetune.yml @@ -143,11 +143,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/DAT/DAT_OTF_finetune.yml b/options/train/DAT/DAT_OTF_finetune.yml index c4c08680..82888b02 100644 --- a/options/train/DAT/DAT_OTF_finetune.yml +++ b/options/train/DAT/DAT_OTF_finetune.yml @@ -197,11 +197,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/DAT/DAT_finetune.yml b/options/train/DAT/DAT_finetune.yml index 157ab9fb..57745127 100644 --- a/options/train/DAT/DAT_finetune.yml +++ b/options/train/DAT/DAT_finetune.yml @@ -143,11 +143,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/DRCT/DRCT_OTF_finetune.yml b/options/train/DRCT/DRCT_OTF_finetune.yml index 411a5193..ede30a43 100644 --- a/options/train/DRCT/DRCT_OTF_finetune.yml +++ b/options/train/DRCT/DRCT_OTF_finetune.yml @@ -197,11 +197,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/DRCT/DRCT_finetune.yml b/options/train/DRCT/DRCT_finetune.yml index 0a4c893d..bcc48f9a 100644 --- a/options/train/DRCT/DRCT_finetune.yml +++ b/options/train/DRCT/DRCT_finetune.yml @@ -143,11 +143,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/ESRGAN/ESRGAN_OTF_finetune.yml b/options/train/ESRGAN/ESRGAN_OTF_finetune.yml index 92299a69..d8875c80 100644 --- a/options/train/ESRGAN/ESRGAN_OTF_finetune.yml +++ b/options/train/ESRGAN/ESRGAN_OTF_finetune.yml @@ -197,11 +197,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/ESRGAN/ESRGAN_finetune.yml b/options/train/ESRGAN/ESRGAN_finetune.yml index 4432b452..0c346491 100644 --- a/options/train/ESRGAN/ESRGAN_finetune.yml +++ b/options/train/ESRGAN/ESRGAN_finetune.yml @@ -143,11 +143,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/HAT/HAT_OTF_finetune.yml b/options/train/HAT/HAT_OTF_finetune.yml index 66ab5eda..88cf72e4 100644 --- a/options/train/HAT/HAT_OTF_finetune.yml +++ b/options/train/HAT/HAT_OTF_finetune.yml @@ -197,11 +197,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/HAT/HAT_finetune.yml b/options/train/HAT/HAT_finetune.yml index 94b46ca4..71113246 100644 --- a/options/train/HAT/HAT_finetune.yml +++ b/options/train/HAT/HAT_finetune.yml @@ -143,11 +143,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/HiT-SR/HiT-SR_OTF_finetune.yml b/options/train/HiT-SR/HiT-SR_OTF_finetune.yml index 14ab2dbf..9df38dd3 100644 --- a/options/train/HiT-SR/HiT-SR_OTF_finetune.yml +++ b/options/train/HiT-SR/HiT-SR_OTF_finetune.yml @@ -197,11 +197,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/HiT-SR/HiT-SR_finetune.yml b/options/train/HiT-SR/HiT-SR_finetune.yml index c639ed57..97ff90b5 100644 --- a/options/train/HiT-SR/HiT-SR_finetune.yml +++ b/options/train/HiT-SR/HiT-SR_finetune.yml @@ -143,11 +143,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/LMLT/LMLT_OTF_finetune.yml b/options/train/LMLT/LMLT_OTF_finetune.yml index 6c6fa4a1..11196cbb 100644 --- a/options/train/LMLT/LMLT_OTF_finetune.yml +++ b/options/train/LMLT/LMLT_OTF_finetune.yml @@ -197,11 +197,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/LMLT/LMLT_finetune.yml b/options/train/LMLT/LMLT_finetune.yml index 83284527..c784cbbe 100644 --- a/options/train/LMLT/LMLT_finetune.yml +++ b/options/train/LMLT/LMLT_finetune.yml @@ -143,11 +143,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/MoSR/MoSR_OTF_finetune.yml b/options/train/MoSR/MoSR_OTF_finetune.yml index 73767ead..c17c1409 100644 --- a/options/train/MoSR/MoSR_OTF_finetune.yml +++ b/options/train/MoSR/MoSR_OTF_finetune.yml @@ -199,11 +199,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/MoSR/MoSR_finetune.yml b/options/train/MoSR/MoSR_finetune.yml index 38a53bc4..e0494046 100644 --- a/options/train/MoSR/MoSR_finetune.yml +++ b/options/train/MoSR/MoSR_finetune.yml @@ -145,11 +145,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/OmniSR/OmniSR_OTF_finetune.yml b/options/train/OmniSR/OmniSR_OTF_finetune.yml index 988b2445..070d3992 100644 --- a/options/train/OmniSR/OmniSR_OTF_finetune.yml +++ b/options/train/OmniSR/OmniSR_OTF_finetune.yml @@ -197,11 +197,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/OmniSR/OmniSR_finetune.yml b/options/train/OmniSR/OmniSR_finetune.yml index 7fcf3610..278b4db0 100644 --- a/options/train/OmniSR/OmniSR_finetune.yml +++ b/options/train/OmniSR/OmniSR_finetune.yml @@ -143,11 +143,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/PLKSR/PLKSR_OTF_finetune.yml b/options/train/PLKSR/PLKSR_OTF_finetune.yml index 129b59a7..17b55000 100644 --- a/options/train/PLKSR/PLKSR_OTF_finetune.yml +++ b/options/train/PLKSR/PLKSR_OTF_finetune.yml @@ -197,11 +197,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/PLKSR/PLKSR_finetune.yml b/options/train/PLKSR/PLKSR_finetune.yml index 8c1af9f0..da52a9b7 100644 --- a/options/train/PLKSR/PLKSR_finetune.yml +++ b/options/train/PLKSR/PLKSR_finetune.yml @@ -143,11 +143,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/RGT/RGT_OTF_finetune.yml b/options/train/RGT/RGT_OTF_finetune.yml index 59bfa51d..3cf31057 100644 --- a/options/train/RGT/RGT_OTF_finetune.yml +++ b/options/train/RGT/RGT_OTF_finetune.yml @@ -197,11 +197,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/RGT/RGT_finetune.yml b/options/train/RGT/RGT_finetune.yml index f9c3a683..b35048df 100644 --- a/options/train/RGT/RGT_finetune.yml +++ b/options/train/RGT/RGT_finetune.yml @@ -143,11 +143,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/RealCUGAN/RealCUGAN_OTF_finetune.yml b/options/train/RealCUGAN/RealCUGAN_OTF_finetune.yml index 41aefc1d..65322223 100644 --- a/options/train/RealCUGAN/RealCUGAN_OTF_finetune.yml +++ b/options/train/RealCUGAN/RealCUGAN_OTF_finetune.yml @@ -199,11 +199,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/RealCUGAN/RealCUGAN_finetune.yml b/options/train/RealCUGAN/RealCUGAN_finetune.yml index d7d3c9cc..8dca57af 100644 --- a/options/train/RealCUGAN/RealCUGAN_finetune.yml +++ b/options/train/RealCUGAN/RealCUGAN_finetune.yml @@ -145,11 +145,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/RealPLKSR/RealPLKSR_OTF_finetune.yml b/options/train/RealPLKSR/RealPLKSR_OTF_finetune.yml index cd0e2d99..3ff289d8 100644 --- a/options/train/RealPLKSR/RealPLKSR_OTF_finetune.yml +++ b/options/train/RealPLKSR/RealPLKSR_OTF_finetune.yml @@ -198,11 +198,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/RealPLKSR/RealPLKSR_finetune.yml b/options/train/RealPLKSR/RealPLKSR_finetune.yml index 3f47caf7..3bed04d0 100644 --- a/options/train/RealPLKSR/RealPLKSR_finetune.yml +++ b/options/train/RealPLKSR/RealPLKSR_finetune.yml @@ -144,11 +144,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/SCUNet_aaf6aa/SCUNet_aaf6aa_OTF_finetune.yml b/options/train/SCUNet_aaf6aa/SCUNet_aaf6aa_OTF_finetune.yml index a5497a0d..033eb4fd 100644 --- a/options/train/SCUNet_aaf6aa/SCUNet_aaf6aa_OTF_finetune.yml +++ b/options/train/SCUNet_aaf6aa/SCUNet_aaf6aa_OTF_finetune.yml @@ -197,11 +197,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/SCUNet_aaf6aa/SCUNet_aaf6aa_finetune.yml b/options/train/SCUNet_aaf6aa/SCUNet_aaf6aa_finetune.yml index 96eb2bae..78e155c0 100644 --- a/options/train/SCUNet_aaf6aa/SCUNet_aaf6aa_finetune.yml +++ b/options/train/SCUNet_aaf6aa/SCUNet_aaf6aa_finetune.yml @@ -143,11 +143,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/SPAN/SPAN_OTF_finetune.yml b/options/train/SPAN/SPAN_OTF_finetune.yml index b110a31d..97313da8 100644 --- a/options/train/SPAN/SPAN_OTF_finetune.yml +++ b/options/train/SPAN/SPAN_OTF_finetune.yml @@ -198,11 +198,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/SPAN/SPAN_finetune.yml b/options/train/SPAN/SPAN_finetune.yml index d2ea9e1e..c75fb06b 100644 --- a/options/train/SPAN/SPAN_finetune.yml +++ b/options/train/SPAN/SPAN_finetune.yml @@ -144,11 +144,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/SPANPlus/SPANPlus_OTF_finetune.yml b/options/train/SPANPlus/SPANPlus_OTF_finetune.yml index 5905f5ef..e28a3b96 100644 --- a/options/train/SPANPlus/SPANPlus_OTF_finetune.yml +++ b/options/train/SPANPlus/SPANPlus_OTF_finetune.yml @@ -197,11 +197,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/SPANPlus/SPANPlus_finetune.yml b/options/train/SPANPlus/SPANPlus_finetune.yml index cecd0134..8898c4d3 100644 --- a/options/train/SPANPlus/SPANPlus_finetune.yml +++ b/options/train/SPANPlus/SPANPlus_finetune.yml @@ -143,11 +143,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/SRFormer/SRFormer_OTF_finetune.yml b/options/train/SRFormer/SRFormer_OTF_finetune.yml index d302af5e..854b128b 100644 --- a/options/train/SRFormer/SRFormer_OTF_finetune.yml +++ b/options/train/SRFormer/SRFormer_OTF_finetune.yml @@ -197,11 +197,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/SRFormer/SRFormer_finetune.yml b/options/train/SRFormer/SRFormer_finetune.yml index feadf111..82799a34 100644 --- a/options/train/SRFormer/SRFormer_finetune.yml +++ b/options/train/SRFormer/SRFormer_finetune.yml @@ -143,11 +143,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/SwinIR/SwinIR_OTF_finetune.yml b/options/train/SwinIR/SwinIR_OTF_finetune.yml index d09e5e4d..79db8703 100644 --- a/options/train/SwinIR/SwinIR_OTF_finetune.yml +++ b/options/train/SwinIR/SwinIR_OTF_finetune.yml @@ -197,11 +197,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/SwinIR/SwinIR_finetune.yml b/options/train/SwinIR/SwinIR_finetune.yml index 84ac114a..4269458b 100644 --- a/options/train/SwinIR/SwinIR_finetune.yml +++ b/options/train/SwinIR/SwinIR_finetune.yml @@ -143,11 +143,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/TSCUNet/TSCUNet_OTF_finetune.yml b/options/train/TSCUNet/TSCUNet_OTF_finetune.yml index 713f3d9f..fabc511c 100644 --- a/options/train/TSCUNet/TSCUNet_OTF_finetune.yml +++ b/options/train/TSCUNet/TSCUNet_OTF_finetune.yml @@ -198,11 +198,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/options/train/TSCUNet/TSCUNet_finetune.yml b/options/train/TSCUNet/TSCUNet_finetune.yml index fd8d9059..59bfbd6f 100644 --- a/options/train/TSCUNet/TSCUNet_finetune.yml +++ b/options/train/TSCUNet/TSCUNet_finetune.yml @@ -145,11 +145,15 @@ train: # Additional losses - disabled by default. # To enable, change the loss_weight from 0 to the recommended loss_weight which appears as a comment next to the loss weight. # For example to enable DISTS loss, change the loss weight from 0 to 0.25; to enable color loss change loss weight from 0 to 1. - # DISTS loss + # DISTS perceptual loss dists_opt: type: DISTSLoss # DISTSLoss, ADISTSLoss use_input_norm: true - loss_weight: 0 #0.3 + loss_weight: 0 # 0.3 + # DINOv2 perceptual loss + dinov2_opt: + type: DinoV2Loss + loss_weight: 0 # 0.02 # Mix of Augmentations (MoA) use_moa: false # Whether to enable mixture of augmentations, which augments the dataset on the fly to create more variety and help the model generalize. diff --git a/traiNNer/losses/dinov2_loss.py b/traiNNer/losses/dinov2_loss.py index 150f71d3..1784721a 100644 --- a/traiNNer/losses/dinov2_loss.py +++ b/traiNNer/losses/dinov2_loss.py @@ -39,4 +39,4 @@ def __init__( self.loss = FelixLoss(extractor) def forward(self, x: Tensor, gt: Tensor) -> tuple[Tensor | None, Tensor | None]: - return self.loss(x, gt) + return self.loss(x, gt) * self.loss_weight diff --git a/traiNNer/losses/felix.py b/traiNNer/losses/felix.py index c83e2b30..6a2b91bb 100644 --- a/traiNNer/losses/felix.py +++ b/traiNNer/losses/felix.py @@ -87,10 +87,13 @@ def __init__( self.loss = loss def forward(self, x: Tensor, y: Tensor) -> Tensor: - x = self.extractor(x) - y = self.extractor(y) - loss = torch.tensor(0, device=x.device) - for i in range(len(x)): - loss += self.loss(x[i], y[i].detach()) * self.extractor.weights[i] + loss = torch.tensor(0.0, device=x.device) + x_extracted: list[Tensor] = self.extractor(x) + y_extracted: list[Tensor] = self.extractor(y) + for i in range(len(x_extracted)): + loss += ( + self.loss(x_extracted[i], y_extracted[i].detach()) + * self.extractor.weights[i] + ) return loss