## 3 Training
### Training Parameters and Evaluation Metrics  
The training was conducted on a workstation equipped with an Intel i7-8700K CPU, NVIDIA GeForce RTX 2080 Ti GPU, and 112 GB of RAM. The network was implemented in Keras using Python 3.7.13. Training and testing procedures for WPD-Net are illustrated in Figure 4. Each synthetic dataset consisted of 5000 wrapped-phase images (size \(256\times 256\)), with phase values distributed in a range of \([-5\pi,5\pi]\). These datasets were designed to simulate three different noise conditions:  
1. Gaussian noise dataset--Phase images were corrupted by Gaussian noise with a normal distribution, defined by SNR ranging from 10 dB to 0 dB. 2. Speckle noise dataset--Images were degraded by speckle noise, with variance ranging between 0.05 and 0.1. 3. Mixed Noise Dataset--Phase images were affected by a combination of Gaussian noise (SNR ranging from 5 dB to 0 dB) and speckle noise (variance between 0.08 and 0.1), simulating more challenging and realistic noise conditions. Out of 5000 images in each dataset, 4000 (80%) were used for training, 400 (10% of the training set) were held out as a validation set for early stopping and model selection, and 1000 (20%) were reserved for final testing. A consistent random selection method was applied to ensure reproducibility across experiments. Training was performed for 200 epochs using the Adam optimizer with an initial learning rate of 0.0001 and a batch size of 4. The learning rate was reduced by a factor of 0.5 every 50 epochs. The validation set was used for early stopping and model selection, with the final model chosen based on the lowest validation loss. Paired data: noisy wrapped-phase images \"\(\rm I_{N}\)\" and their corresponding clean noise-free images \"\(\rm I_{NF}\)\" were used for supervised training. To quantitatively evaluate the performance of the network, we used MSE, PSNR, and SSIM as metrics. Each predicted denoised wrapped-phase image (\(\rm I_{DN}\)) was compared with its ground truth noise-free wrapped-phase image (\(\rm I_{NF}\)). MSE measures the average of the squared difference between the predicted and the ground truth wrapped-phase images. It provides an indication of reconstruction accuracy. Figure 3: Example of synthetically generated data. The true phase image is presented (**a**) without noise, (**b**) with speckle noise, and (**c**) with Gaussian noise. The corresponding wrapped-phase images are shown (**d**) without noise, (**e**) with speckle noise (variance = 0.1), and (**f**) with Gaussian noise (SNR 5 dB). Each image consists of \(256\times 256\) pixels. \[\text{MSE}= \frac{1}{\text{M}\times\text{N}}\sum_{\text{i}=1}^{\text{M}}\sum_{ \text{j}=1}^{\text{N}}[\text{I}_{\text{D}\text{N}}(\text{i},\text{j})-\text{I}_ {\text{NF}}(\text{i},\text{j})]^{2}. \tag{18}\]  
where M and N represent the number of pixels in the image. A lower MSE indicates better denoising performance. PSNR measures the quality of the denoised image by assessing the error between I\({}_{\text{D}\text{N}}\) and I\({}_{\text{NF}}\), and defined using MSE as:  
\[\text{PSNR}=10\text{log}_{10}\Bigg{(}\frac{\text{MAX}^{2}}{\text{MSE}}\Bigg{)}. \tag{19}\]  
The parameter MAX is the maximum possible pixel value, set to 255 for grayscale images. A higher PSNR value indicates better image quality with less residual noise. The SSIM evaluates the structural similarity between I\({}_{\text{D}\text{N}}\) and I\({}_{\text{NF}}\) by considering brightness, contrast, and structural differences.