# Scale-Adaptive Deep Matching Network for Constrained Image Splicing Detection and Localization
## 3 Method
### Scale-Adaptive Correlation Computation  
As for previous studies, they can not handle arbitrary-sized images. Such as the process of matching response using cross-correlation in DMVN, it uses all pixels of the feature map relative to the size of the image. Similarly, DMAC and AttentionDM continued to use this approach. So, they are all restricted by the size of images. Therefore, distinctly accounting for image scale is essential for improving the model's ability to process low-resolution and high-resolution images. In order to address this defect, [PERSON] et al. proposed a sliding window-based matching strategy to process high-resolution images, but it causes high computational complexity [9]. In this paper, we employ correlation computation with SE blocks and truncation operations to boost our model's ability to process arbitrary-sized images. \(\mathbf{F}_{3}^{(k)}\), \(\mathbf{F}_{4}^{(k)}\), \(\mathbf{F}_{5}^{(k)}\) (\(k\in\{1,\,2\}\)) are extracted from the feature extractor, and then each feature map has to go through the L2-normalization, SE blocks and truncation operations. At last, we utilize ReLU and L2-normalization to produce the final two correlation maps. (1) SE blocks  
For each channel of the convolution feature, SE blocks model their interdependencies explicitly. Specifically, SE blocks take each channel of feature map as a feature detector, then they utilize global information to emphasize informative features or suppress unuseful ones selectively. Before the SE blocks, L2-normalization is conducted:  
\[\tilde{f}^{(k)}(i_{k},j_{k})=\frac{\tilde{f}^{(k)}(i_{k},j_{k})}{||\tilde{f}^ {(k)}(i_{k},j_{k})||_{2}} \tag{2}\]  
where \(\mathbf{F}^{(k)}\in\mathbb{R}^{\ h\times w\times c}\), \(k\in\{1,\,2\}\), \(\tilde{f}^{(1)}(i_{1},j_{1})\in\mathbf{F}^{(1)}\), \(\tilde{f}^{(2)}(i_{2},j_\[z_{c}^{(k)}=\mathbf{F}_{sq}(\vec{f}_{c}^{(k)})=\frac{1}{H\times W}\sum_{i=1}^{H} \sum_{j=1}^{W}\vec{f}_{c}^{(k)}(i,j) \tag{3}\]  
This operation, global average pooling, is the simplest aggregation technique to collect local descriptors that can express the whole image. The second step is to capture channelwise dependencies, which consists of a ReLU and a sigmoid activation as a gating mechanism:  
\[\mathbf{s}=\mathbf{F}_{ex}(\mathbf{z}^{(k)},\mathbf{W})=\sigma(\mathbf{W}_{2} \delta(\mathbf{W}_{1}(\mathbf{z}^{(k)})) \tag{4}\]  
where \(\delta\) refers to the ReLU function, \(\mathbf{W}_{1}\in\mathbb{R}^{\frac{C}{7}\times C}\) and \(\mathbf{W}_{2}\in\mathbb{R}^{\frac{C\times C}{7}}\). The third step is to weight the characteristics of each channel, with the weight obtained above. The final output is computed with:  
\[\tilde{\mathbf{F}}^{(k)}=\mathbf{F}_{scale}(\vec{f}_{c}^{(k)},s_{c}) \tag{5}\]  
where \(\tilde{\mathbf{F}}^{(k)}=[\vec{f}_{1}^{(k)},\vec{f}_{2}^{(k)},\cdots,\vec{f}_ {c}^{(k)}]\) and \(\mathbf{F}_{scale}(\vec{f}_{c}^{(k)},s_{c})\) indicate the channelwise multiplication between the scalar \(s_{c}\) and the feature map \(\vec{f}^{(k)}\in\mathbb{R}^{H\times W}\). (2) Correlation-computation with truncation operations  
The process of this part is shown in Figure 3. \(\mathbf{F}^{(1)}\) and \(\mathbf{F}^{(2)}\) refer to the feature maps computed from the SE blocks, \(\vec{f}^{(1)}(i_{1},j_{1})\in\tilde{\mathbf{F}}^{(1)},\vec{f}^{(2)}(i_{2},j_{ 2})\in\tilde{\mathbf{F}}^{(2)}\).