# Development of Artificial Intelligence-Based Dual-Energy Subtraction for Chest Radiography
## 2 Materials and Methods
### AI-DES Development
#### 2.1.2 Weighted Image Subtraction  
We assumed that raw data of monochromatic low- and high-energy images in direct-conversion flat-panel detector (d-FPD) systems have pixel values of \(P_{L}\) and \(P_{H}\), respectively as expressed by [11; 39]  
\[\log_{10}(P_{L})=-(\mu_{B}(L)\cdot t_{B}+\mu_{S}(L)\cdot t_{S}), \tag{4}\]  
\[\log_{10}(P_{H})=-(\mu_{B}(H)\cdot t_{B}+\mu_{S}(H)\cdot t_{S}), \tag{5}\]  
where \(\mu_{B}\) and \(\mu_{S}\) are the linear attenuation coefficients of bone and soft tissues at low (\(L\)) or high (\(H\)) energy, respectively; \(t_{B}\) and \(t_{S}\) denote the thicknesses of bone and soft tissues, respectively; and \(P_{L}\) and \(P_{H}\) are proportional to low- and high-energy X-ray intensity transmitted through the tissues, respectively, since d-FPD systems have a linear response to X-ray intensity. The weighted subtraction of Equations (4) and (5) is given by:  
\[K_{H}\cdot\log_{10}(P_{H})-K_{L}\cdot\log_{10}(P_{L})=(K_{L}\cdot\mu_{B}(L)-K_ {H}\cdot\mu_{B}(H))t_{B}+(K_{L}\cdot\mu_{S}(L)-K_{H}\cdot\mu_{S}(H))t_{S}, \tag{6}\]  
where \(K_{L}\) and \(K_{H}\) are weight factors.  
When \((K_{L}\cdot\mu_{B}(L)-K_{H}\cdot\mu_{B}(H))\) equals zero, Equation (6) represents the emphasized difference in logarithmically amplified data of X-ray intensity transmitted through soft  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline  & **Type** & **Normalization** & **Activation** & **Input Shape 1** & **Output Shape 1** \\ \hline Layer1 & & – & & 1024 \(\times\) 1024 \(\times\) 6 & 512 \(\times\) 512 \(\times\) 64 \\ Layer2 & Conv2d (4,2,1) & & & 512 \(\times\) 512 \(\times\) 64 & 256 \(\times\) 256 \(\times\) 128 \\ Layer3 & & BN & & 256 \(\times\) 256 \(\times\) 128 & 128 \(\times\) 128 \(\times\) 256 \\ Layer4 & & & & 128 \(\times\) 128 \(\times\) 256 & 127 \(\times\) 127 \(\times\) 512 \\ Layer5 & & – & – & 127 \(\times\) 127 \(\times\) 512 & 126 \(\times\) 126 \(\times\) 1 \\ \hline \hline \end{tabular}  
* Width \(\times\) height \(\times\) channel.  
\end{table}
Table 2: Discriminator architecture in AI-DES.  
Figure 3: Discriminator network used in AI-DES. The network comprises five convolutional neural network layers. It takes either a pair of real high-energy and virtual low-energy images or a pair of real high-energy and low-energy images as input. The network then outputs a feature map that determines whether the pair is real or fake.  
tissues at low and high energies. Finally, it corresponds to the pixel values (\(P_{sub}\)) of the specific tissue-enhanced images, as expressed by  
\[P_{sub}=K_{H}\cdot\log_{10}(P_{H})-K_{L}\cdot\log_{10}(P_{L}). \tag{7}\]  
Apart from the raw data, such as \(P_{L}\) and \(P_{H}\), \(P_{sub}\) denotes the pixel values for viewing, where log-amplified X-ray intensity distribution is exhibited.  
Here, the weight factor (\(\omega_{S}\)) for soft-tissue-enhanced image generation is given by:  
\[\omega_{S}=\frac{K_{H}}{K_{L}}=\frac{\mu_{B}(L)}{\mu_{B}(H)}. \tag{8}\]  
Similarly, the weight factor (\(\omega_{B}\)) for bone-enhanced images is given by:  
\[\omega_{B}=\frac{K_{H}}{K_{L}}=\frac{\mu_{S}(L)}{\mu_{S}(H)}. \tag{9}\]  
It should be noted that \(\omega_{S}\) and \(\omega_{B}\) in Equations (8) and (9) represent theoretical values. In this study, we obtained the \(P_{sub}\) of soft-tissue- and bone-enhanced images by using the raw data of real high-energy and virtual low-energy images, as expressed by  
\[P_{sub}=\omega\cdot\log_{10}(P_{H})-\log_{10}(P_{L}), \tag{10}\]  
where \(\omega\) is a weight factor. We adjusted the value of \(\omega\) for each test case to most selectively emphasize the target tissues. We focused on generating soft-tissue- and bone-enhanced images to compare the performance with that of an existing DES system. However, the AI-DES can provide the option of arbitrarily targeting specific tissues for enhancement by adjusting the weight factor.