# Deep Learning Realizes Photoacoustic Imaging Artifact Removal
## 3 Results
### Evaluation Metrics  
In this study, we comprehensively evaluate the performance of deep learning image reconstruction and segmentation models. These commonly used indicators include peak \begin{table}
\begin{tabular}{c c} \hline \hline
**Type** & **Parameter** \\ \hline CPU & Intel(R) Core(TM) i7-10700 \\ RAM & 32 GB \\ GPU & NVIDIA Quadro P2200 \\ Programming language & Python 3.10 \\ Deep learning framework & PyTorch 2.2.1, CUDA 12.1 \\ Dependency library & Numpy 1.26.4, tqdm 4.66.2, tensorboard 2.16.2, \\  & opencv-python 4.9.0.80 \\ \hline \hline \end{tabular} The hyperparameter settings for the algorithm are presented in Table 2.  
\end{table} 
Table 1: Experimental environment. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Network** & **Main Hyperparameters** & **Specific Values** \\ \hline \multirow{6}{*}{YOLOv8} & Batch size & 16 \\  & Image size & 640 \\  & Optimiser & Adam \\  & Momentum & 0.937 \\  & Initial learning rate & 0.01 \\  & epoch & 300 \\ \hline \multirow{6}{*}{Pix2 Pix} & Batch\_size & 1 \\  & Momentum & 0.5 \\ \cline{1-1}  & Optimiser & Adam \\ \cline{1-1}  & Loss function & cGAN \\ \cline{1-1}  & Initial learning rate & 0.0002 \\ \cline{1-1}  & epoch & 200 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: The main hyperparameters of the network. signal-to-noise ratio (PSNR), structural similarity index (SSIM), accuracy, recall rate, accuracy, intersection ratio (IoU), mean BFScore, and Dice coefficient. During the evaluation, the calculation of PSNR is based on the actual range of reconstructed images, and takes into account thermal noise, electronic noise and background noise in photoacoustic imaging. SSIM evaluation covers the brightness, contrast, structural fidelity of photoacoustic images and the accuracy of the spatial distribution of photoacoustic sources. These dimensions of comprehensive assessment enable us to more fully understand the deep learning model in the performance of image reconstruction and segmentation task. The model evaluation measures are calculated according to Formulas (4)-(12). \[PSNR=10\times log_{10}\left(\frac{MAX^{2}}{MSE}\right) \tag{4}\]  
\[MSE=\frac{1}{N}{\sum_{i=0}^{N}}\left(I_{i}-\hat{I}_{i}\right)^{2} \tag{5}\]  
_MAX_ is the maximum pixel value of the reconstructed image and \(MSE\) is the mean square error, which reflects the degree of difference between the reconstructed image and the original image. In photoacoustic imaging, the value of PSNR is affected by thermal, electronic, and background noise. A higher PSNR value usually means that the reconstructed image shows little difference from the original image and the reconstruction is of high quality. \[SSIM(x,y)=\frac{\left(2\mu_{x}\mu_{y}+c_{1}\right)\left(2\sigma_{xy}+c_{2} \right)}{\left(\mu_{x}{}^{2}+\mu_{y}{}^{2}+c_{1}\right)\left(\sigma_{x}{}^{2} +\sigma_{y}{}^{2}+c_{2}\right)} \tag{6}\]  
Among them, \(\mu_{x}\) and \(\mu_{y}\) are the mean values of the original image x and the reconstructed image y, \(\sigma_{x}{}^{2}\) and \(\sigma_{y}{}^{2}\) are their variances and \(\sigma_{xy}\) is their covariance. \(c_{1}\) and \(c_{2}\) are two constants used for stability calculation. SSIM takes into account brightness, contrast and fidelity of structure, and comprehensively evaluates the characteristics of photoacoustic imaging images. \[precision=\frac{TP}{TP+FP} \tag{7}\]  
\[recall=\frac{TP}{TP+FN} \tag{8}\]  
\[Accuracy=\frac{TP+TN}{TP+FP+TN+FN} \tag{9}\]  
\[IoU=\frac{TP}{TP+FP+FN} \tag{10}\]  
\[Mean\ BFScore=\frac{\text{Area of Overlap}}{\text{Total number of Pixels}} \tag{11}\]  
\[Dice=\frac{2\times\text{TP}}{2\times\text{TP}+\text{FP}+\text{FN}} \tag{12}\]  
Among them, _TP_, _FP_, _TN_, and _FN_ represent 'True Positive', 'False Positive', 'True Negative', and 'False Negative', respectively. N denotes the number of categories. In Equation (11), the \"overlap region\" represents the overlap between the predicted segmentation and the ground truth, and the \"total number of pixels\" represents the number of pixels present in the image.