Image Denoising Using DnCNN
Created on March 30|Last edited on March 31
Comment
Run set
8
Descriptions of the Runs:
Run1
Patch Size - 50, Stride - 50, Total Images = 128 x 23, Batch Size - 128, LR - 1e-4 with decay of 0.99 times per epoch
Intermediate Layers Channel Dimension = 64, Depth = 20
- Best Val PSNR - 24.52 , Converges after Epochs ~ 45
- Best Running Avg Val PSNR - 24.07
- Best Val SSIM ~ 0.72
- Runtime - 34 mins
Run2
Patch Size - 50, Stride - 20, Total Images = 128 x 131, Batch Size - 128, LR - 1e-4 with decay of 0.99 times per epoch
Intermediate Layers Channels Dimension= 64, Depth = 20
- Best Val PSNR - 27.07, Converges after Epochs ~ 47
- Best Running Avg Val PSNR - 26.83
- Best Val SSIM ~ 0.777
- Runtime - 3h 20m
Run3
Patch Size - 50, Stride - 25, Total Images = 128 x 85, Batch Size - 128, LR - 1e-4 with decay of 0.99 times per epoch
Intermediate Layers Channels Dimension = 64, Depth = 20
- Best Val PSNR - 26.687, Converges after Epochs ~ 50
- Best Running Avg Val PSNR - 26.54
- Best Val SSIM ~ 0.76799
- Runtime - 2h 9m
Run4
Patch Size - 50, Stride - 25, Total Images = 128 x 85, Batch Size - 128, LR - 1e-4 with decay of 0.99 times per epoch
Intermediate Layers Channels Dimension = 64, Depth = 17
- Best Val PSNR - 26.92, Converges after Epochs ~ 44
- Best Running Avg Val PSNR - 26.89
- Best Val SSIM ~ 0.7866
- Runtime - 2h 10m
Run5
Patch Size - 50, Stride - 50, Total Images = 128 x 23, Batch Size - 64, LR - 1e-4 with decay of 0.99 times per epoch
Intermediate Layers Channels = 64, Depth = 20
- Best Val PSNR - 24.68, Converges after Epochs ~ 44
- Running Avg Val PSNR - 24.62
- Best Val SSIM ~ 0.66966
- Runtime - 53m
Run6
Patch Size - 50, Stride - 25, Total Images = 128 x 85, Batch Size - 128, LR - 1e-4 with decay of 0.99 times per epoch
Intermediate Layers Channels = 128, Depth = 20
- Best Val PSNR - 27.79, Converges after Epochs ~ 50
- Best Running Avg Val PSNR - 27.78
- Best Val SSIM ~ 0.84031
- Runtime - 2h 32m
Run7
Patch Size - 50, Stride - 25, Total Images = 128 x 85, Batch Size - 64, LR - 1e-4 with decay of 0.99 times per epoch
Intermediate Layers Channels = 128, Depth = 20
- Best Val PSNR - 28.05, Converges after Epochs ~ 50
- Best Running Avg Val PSNR - 28.0485
- Best Val SSIM ~ 0.85253
- Runtime - 2h 35m
Run8
Patch Size - 50, Stride - 25, Total Images = 64 x 169, Batch Size - 64, LR - 1e-4 with decay of 0.99 times per epoch
Intermediate Layers Channels = 128, Depth = 17
- Best Val PSNR - 28.09373, Converges after Epochs ~ 50
- Best Running Avg Val PSNR - 28.09373
- Best Val SSIM ~ 0.85315
- Runtime - 2h 27m
Hyperparameter Analysis
The best performance is achieved in Runs 6, 7, and 8—with the highest quality metrics coming from runs that use a stride of 25 and increased channel capacity. Run 8, in particular, with 128 channels and a depth of 17, yields the highest reported PSNR (28.09) and SSIM (0.85315) while keeping the runtime under 2.5 hours.
1. Patch Extraction (Stride)
Stride 50:
Runs 1 and 5 use a stride equal to the patch size. This results in a very low number of patches (e.g., Run 1 has only 128×23 patches) which leads to faster runtime (34 minutes for Run 1 and 53 minutes for Run 5) but poorer performance (PSNR in the range of ~24.5 and lower SSIM values). The limited overlap may result in insufficient training data diversity.
Stride 20:
Run 2 uses a stride of 20, generating a much larger set of patches (128×131). This dense sampling provides a richer training set and results in a significant performance boost (best PSNR ~27.07 and SSIM ~0.777) but at the cost of a much longer runtime (3 hours 20 minutes).
Stride 25:
Runs 3, 4, 6, 7, and 8 use a stride of 25, yielding an intermediate number of patches (roughly 128×85 or a comparable total count). This choice appears to be a good compromise. For instance, Run 4 with stride 25 and a network depth of 17 achieves PSNR ~26.92 and SSIM ~0.7866 in about 2 hours 10 minutes, while Run 6 with increased channels (128) and stride 25 yields even better performance (PSNR ~27.79, SSIM ~0.8403) with runtime around 2.5 hours.
2. Network Architecture
Intermediate Layers – Channel Dimension:
64 Channels:
Runs 1–5 use 64 channels. Their performance in PSNR (24.5–27.07) and SSIM (around 0.67–0.78) is noticeably lower.
128 Channels:
Runs 6–8 increase the channel dimension to 128, which provides a clear performance benefit. For example, Run 6 achieves a PSNR of 27.79 and an SSIM of 0.8403, and Run 7/8 push PSNR above 28 and SSIM above 0.85. This indicates that a higher channel capacity allows the network to better capture image details.
Depth:
Depth of 20 vs. 17:
Runs 1, 2, 3, 5, 6, and 7 use a depth of 20, while Runs 4 and 8 use a depth of 17. The shallower networks (depth 17) in Runs 4 and 8 deliver competitive, sometimes slightly improved, SSIM scores.
- For instance, Run 4 (64 channels, depth 17, stride 25) gives PSNR ~26.92 and SSIM ~0.7866, whereas Run 3 (64 channels, depth 20, stride 25) delivers slightly lower PSNR/SSIM.
- Run 8 (128 channels, depth 17, stride 25) reaches the highest reported PSNR (28.09) and SSIM (0.85315) with a similar runtime to Run 7 (128 channels, depth 20, stride 25)
3. Batch Size and Training Efficiency
Batch Size:
Most runs use a batch size of 128, which appears to be effective.
Runs 8 and 7 use a smaller batch size (64). Although the PSNR/SSIM improvements are marginal (with Run 7/8 outperforming Run 6 in PSNR/SSIM), the runtime is somewhat increased or comparable.
Learning Rate:
All runs use an initial learning rate of 1e-4, with a decay factor of 0.99 per epoch. The chosen LR and decay schedule appear sufficient for convergence in roughly 44–50 epochs.
5. Runtime Considerations
Trade-offs:
There is a clear trade-off between the number of training patches and runtime.
- Using a very dense patch extraction (stride 20) substantially increases runtime (3h20m in Run 2) but provides moderate performance improvements.
- Using stride 25 offers a significant performance boost over stride 50 while keeping runtime at a more acceptable level (around 2–2.5 hours).
Based on the analysis:
- Use a patch size of 50 with a stride of 25.
- Increase the intermediate channels to 128.
- Depth 17 can provide faster convergence while still delivering high quality
- A batch size of 128/64 is optimal for training efficiency, assuming hardware constraints allow.
- Maintain the initial learning rate at 1e-4 with a decay of 0.99 per epoch, as this schedule has been effective in all runs.
Add a comment