# WMNet: A Lossless Watermarking Technique Using Deep Learning for Medical Image Authentication
## 3 Proposed Method  
In the previous section, we introduced a lossless watermarking system that can be used to extract the watermark from the suspected medical image during authentication, which then allows the information in the watermark to be used to authenticate image ownership. However, if the extracted watermark is severely distorted, the interpretation of information from that watermark becomes extremely subjective. Therefore, WMNet was designed to determine objectively whether the information in the watermark can be used to prove ownership of the image after watermark extraction. In this study, a model for copyright verification based on CNN, known as WMNet, was designed. Generally, to build a CNN model, a large number of training datasets needs to be prepared. The proposed method involved the generation of several distorted watermark images by simulation, but not all distorted watermarks can provide copyright information reasonably. These watermarks were divided into two categories, namely \"Correct\" and \"Incorrect\", based on the set restrictions so that they can generate WMNet to distinguish users' copyrights. Finally, WMNet was designed to determine objectively whether the information in the watermark can be used to prove the ownership of the image after watermark extraction. The WMNet flow chart is shown in Figure 2, and the detailed steps are discussed below. With regard to a binary watermark \(W\) of size \(m_{1}\times m_{2}\) that is prepared by the user for registration, a simulated \(W\), distorted dataset \(\alpha\) needs to be constructed before constructing a WMNet that is specific to \(W\). Therefore, the function \(\Psi(W,i)^{\tau}\) is defined, where \(1\leq i\leq m_{1}\times m_{2}\). The role of \(\Psi(W,i)^{\tau}\) is to generate \(\tau\) copies of distorted watermarks \(\widetilde{W}^{\tau}\) that are of size \(W\), with the \(i\)th pixel values randomly chosen from each \(\widetilde{W}^{\tau}\) using the NOT Boolean operation so that \(i\) random pixels in \(\widetilde{W}^{\tau}\) are the opposite of \(W\). Next, to simulate the actual situation, \(\alpha\) is \(\left\{\Psi(W,\ 1)^{\tau},\ \Psi(W,\ 2)^{\tau},\ \cdots,\ \Psi(W,\ 2)^{\tau}\right\}\), where \(z=1,\ 2,\ \cdots,\ (m_{1}\times m_{2})\times 0.7\). After the processing described above, \(\alpha\) has \(\tau\times(m_{1}\times m_{2})\times 0.7\) distorted watermarks. For example, if \(W\) is a watermark of size \(64\times 64\) with \(\tau\) set to \(5\), \(\alpha\) will have 14,336 distorted watermarks. After generating \(\alpha\), the distorted watermarks are categorized as \"Correct\" and \"Incorrect.\" NC is used to assess the similarities between these distorted watermarks and the original watermark. For example, Figure 3 presents the results of different NC values. Figure 3a is the original image. Figure 3b-d are distorted watermarks with the corresponding NC values being 0.87, 0.77, and 0.67. It can be seen that different NC values correspond to different degrees of similarity between the distorted and original watermarks. The threshold value \(T_{c}\) is defined to provide training categories to WMNet. If the NC value of the distorted watermark is greater than the threshold value \(T_{c}\), it is categorized as \"Correct\". Otherwise, it is categorized as \"Incorrect\". After the simulated distorted dataset is generated, it can be segmented into the training, validation, and testing datasets. The WMNet framework shown in Table 1 is used for the design. WMNet is based on the design of CNN. Table 1 shows the type, input size, filter size, and output size for each layer. The padding and stride of each layer, which are not listed in the table, were set as \"same\" and 2, respectively. In addition, the learning rate was set as 0.0005, batch size as 40, and epoch as 50, and the filter numbers of the two convolution layers were set as 16 and 32, respectively. Finally, after the WMNet is complete,  
Figure 3: Distorted watermark images with different normalized correlation (NC) values.