# Multi-Scale Deep Neural Network Based on Dilated Convolution for Spacecraft Image Segmentation
## 3 Methods
### Squeeze-and-Excitation Attention Module  
To enhance the effect of feature extraction, we add an attention mechanism in the network. Inspired by SENet [20], we designed the Squeeze-and-Excitation Module (SEM) in the network. SEM uses channel attention to enable the network to obtain the importance of each feature channel by learning automatically. Its schematic diagram is shown in Figure 5. We calibrate the high-level and the low-level features through SEM and then enter the decoder structure at the back of the network. We verify that attention modulation on two branches of different depths has better results than focusing only on the high-level features. SEM is a computing unit that can divide into three computing operations: Squeeze, Excitation, and Reweight, as shown in Figure 5. For a given image input \(\mathbf{X}\in\mathbb{R}^{H^{\prime}\times W^{\prime}\times C^{\prime}}\), the input is transformed into a feature map \(\mathbf{U}\in\mathbb{R}^{H\times W\times C}\) through the feature extraction process of \(\mathbf{F}_{tr}\). \(\mathbf{F}_{tr}\) can represent a convolution operation. \(\mathbf{V}=[\mathbf{v}_{1},\mathbf{v}_{2},\ \dots,\mathbf{v}_{C}]\) is represented as the set of convolution kernels. \(\mathbf{v}_{C}\) represents the parameter of the \(c\)-th kernel. \(\mathbf{x}^{c}\) denotes the \(s\)-th output. \(\mathbf{U}=[\mathbf{u}_{1},\mathbf{u}_{2},\ \dots,\mathbf{u}_{C}]\) as the output of this process. The transformation of the feature map can be expressed by the following formula:  
\[\mathbf{u}_{c}=\mathbf{v}_{c}*\mathbf{X}=\sum_{s=1}^{C^{\prime}}\mathbf{v}_{c}^ {s}*\mathbf{x}^{s} \tag{1}\]  
Here, \(*\) represents the convolution operation. \(\mathbf{v}_{c}=[\mathbf{v}_{c}^{1},\mathbf{v}_{c^{\prime}}^{2},\ \dots,\mathbf{v}_{C}^{C^{\prime}}]\), \(\mathbf{X}=[\mathbf{x}^{1},\mathbf{x}^{2},\ \dots,\mathbf{x}^{C^{\prime}}]\) and \(\mathbf{u}_{c}=\mathbb{R}^{H\times W}\). \(\mathbf{v}_{c}^{s}\) represents a single channel in \(\mathbf{v}_{c}\), corresponding to the input \(\mathbf{X}\). After the feature map \(\mathbf{U}\) is generated, the network officially enters the SEM. The first is the Squeeze operation. SEM uses global average pooling to compress the feature graph \(\mathbf{U}\) along the spatial dimension \(H\times W\), turning each two-dimensional feature channel into a real number. Figure 4: The gridding artifacts are caused by dilated convolution. (**a**) represents the input of a point pixel. (**b**) represents a layer of dilated convolution. (**c**) represents the output after dilated convolution. A single point pixel is mapped into multiple. Figure 5: The schematic diagram of SEM. In this operation, the input of \(H\times W\times C\) is transformed into the output \(\mathbf{z}\in\mathbb{R}^{C}\) of \(1\times 1\times C\) through the process of \(\mathbf{F}_{sq}\). \(\mathbf{z}\) is the set of real numbers corresponding to channel number \(C\). \(z_{c}\) represents the \(c\)-th element of \(\mathbf{z}\), and its calculation formula is as follows:  
\[z_{c}=\mathbf{F}_{sq}(\mathbf{u}_{c})=\frac{1}{H\times W}\sum_{i=1}^{H}\sum_{j =1}^{W}\mathbf{u}_{c}(i,j) \tag{2}\]  
This real number can be regarded as having a global receptive field, and the dimension of the output matches the number of feature channels of the input. It characterizes the global distribution of the response over the feature channels and makes the global receptive field available for the layers close to the input. Next is the excitation operation. SEM uses two fully connected layers to fuse the feature map information of each channel and then uses the ReLU function and the sigmoid function so that the network can learn the dependencies between channels through end-to-end training. That enables full capture of channel-wise dependencies. SEM takes the result \(\mathbf{z}\) obtained by the Squeeze operation as input and transforms it into \(\mathbf{s}\) through the process of \(F_{ex}\).