# Transmission Removal from a Single OSN-Shared Glass Mixture Image
## 3 Proposed Method
### Transformer-Based Image Feature Enhancement Network  
(1) Network architecture  
Compared with the traditional CNN architecture, a transformer architecture can represent the global features obtained from the shallow layer based on the attention mechanism. However, the standard transformer calculates the global self-attention between all tokens, which results in a very large amount of computation, especially for high-resolution images. At the same time, a transformer is weak at capturing local context information. In this way, a locally-enhanced window (LeWin) is introduced into the overall U-shaped structure [23]. In this paper, we pay more attention to the estimation associated with the original image, as well as the edges in terms of features, so we adopt a different architecture for these two parts. Figure 5 illustrates the feature enhancement operation for the input image. It can be seen that we use two different decoders as the output architecture of the augmented network, and at the same time, these two parts are different in their specific implementation process. The network is mainly reflected in the application of features and the constraints on the generated results. For the enhanced image features, it is not realistic to impose too many constraints on the spatial structure, because the enhanced image itself is applied to the information of the input image. On the other hand, since the global structure of the image is weakened after the input image has been processed by the OSN platform, the loss of structure is of less significance. Figure 6 illustrates in detail the architecture of the modules included in the enhancement network. As shown in Figure 6a, window multi-head self attention (W-MSA) [24] is different from the global self-attention of the standard transformer. We perform self-attention in a non-overlapping local window, which can effectively reduce the amount of calculation. Specifically, for a two-dimensional input feature \(X(C\times H\times W)\), we first split \(X\) into non-overlapping blocks of size \(M\times M\), represented as \(X=\{X^{1},X^{2},X^{3},\dots,X^{N}\}\), where \(N=HW/M^{2}\) is the number of blocks. Next, self-attention is performed on all of these window features. The \(k\)-th header calculation process can be described as \(Y_{k}^{i}=\text{Attention}\left(X^{i}W_{k}^{Q},X^{i}W_{k}^{K},X^{i}W_{k}^{V}\right)\), where \(i=1,2,\dots,N\). Finally, this is combined to obtain the final result \(\hat{X}_{k}=Y_{k}^{1},Y_{k}^{2},\dots,Y_{k}^{N}\). Considering the limitation of the feedforward network in the transformer for capturing local contextual information and the importance of neighboring pixels to the overall restoration of the image and partial contour information, depth convolution is added to the feedforward network to capture local context information. The structure is shown in Figure 6b. In the feedforward network, a layer of convolution operation is added to capture the local context information of the input features. Specifically, each token is first  
Figure 5: Feature-level image enhancement network. processed with fully-connected convolution to increase the number of channels, and then the token is re-converted into a 2D feature map using a 3 \(\times\) 3 convolution to capture local information. The 2D feature map is then re-pulled into a 1D token, and the number of channels is re-decreased using fully-connected convolution, to make this consistent with the number of channels before input. (2) Loss function  
The regenerated image \(\hat{f}(\mathbf{R})\) is used as the input for the next stage of the network, which needs to be made closer to the ground-truth scene image in the regeneration process.