# Saliency Guided DNL-Yolo for Optical Remote Sensing Images for Off-Shore Ship Detection
## 2 Methodology
### Scene Classification Using DPC Algorithm  
In general, the width of remote sensing images is relatively large, so their scenes are local. Therefore, the original remote sensing image needs to be divided into sub-blocks to accurately detect targets in different scenes. Meanwhile, in order to avoid a ship being cut in half, the sub-block cutting needs to be overlapped. After obtaining the image block set, different scene images need to be classified according to certain characteristics. Furthermore, for panchromatic images, grayscale intensity distribution can accurately reflect different sea scene characteristics according to the height and position of the peaks [42]. However, the statistics-based method is not accurate enough and requires further improvement. Density peak clustering approach, proposed on science in 2014 [14], is an algorithm that can accomplish efficient clustering of a data set. The basic idea of the algorithm is that the local density of the data cluster center is larger than that of adjacent data points, and it is far away from other data cluster centers.  
The grayscale histograms of each sub-blocks were written as the input vector of clustering algorithm \(h(i)=[h_{0},h_{1},\ldots,h_{k},\ldots,h_{n-1}]^{T}\), where \(h_{k}\) is the quantity of pixels with each grayscale value. DPC algorithm needs to introduce 3 key parameters, namely \(d_{ij}\) (the distance between vectors), \(\rho_{i}\) (the local density), and \(\delta_{i}\) (the reference distance). The distance \(d_{ij}\) between vectors are used to measure the similarity of two vectors. The more similar the two vectors, the smaller the \(d_{ij}\) is. There are different methods to calculate the distance between vectors, including Euclidean distance and Manhattan distance, etc. In contrast, we chose the Manhattan distance due to its better stability in describing similarity features and better intuitiveness in describing larger data feature differences.  
\[d_{ij}=\sqrt{\left|h(i)-h(j)\right|^{\prime}\sum^{-1}\left|h(i)-h(j)\right|} \tag{1}\]  
The local density \(\rho_{i}\) was defined as follows:  
\[\rho_{i}=\sum_{j\
eq i}\chi(d_{ij}-d_{c}) \tag{2}\]  
where \(\chi(\cdot)=1\) when \((\cdot)<0\), otherwise \(\chi(\cdot)=0\). \(d_{c}\) is a cut-off distance, defining the scope of points to be counted. In fact, \(\rho_{i}\) is the number of data points within the cut-off distance around the currently counted point. Thus, \(\rho_{i}\) can measure how much data is clustered around that point.  
The reference distance \(\delta_{i}\) was defined as follows:  
\[\delta_{i}=\min_{\left\{\rho_{i}\right\}>\rho_{i}}(d_{ij}) \tag{3}\]  
Figure 2: The overall flowchart of proposed saliency tuned YOLONet for ship detection. First, we utilized the grayscale histograms of each block to classify scenes. Second, the saliency maps were regarded as third channels. Finally, they were separately fed into the YOLO network adjusted by the DNL module.  
The meaning of \(\delta_{i}\) is the distance between data point \(h(i)\) and \(h(j)\) with bigger local density \(\rho_{j}\) and smallest distance \(d_{ij}\). Note that for the data point with biggest global density h(m), its reference distance was defined as follows:  
\[\delta_{m}=\max_{j}(d_{ij}) \tag{4}\]  
We noticed that the necessary and sufficient condition for a data point to become the center of the data cluster is that the reference distance and local density are both large. In this way, isolated data points with small \(\rho\) and large \(\delta\) and similar point families with a large \(\rho\) and small \(\delta\) were excluded. After clustering, we divided the marine scene sub-blocks into five categories: big wave area, no wave area, thick cloud area, thin cloud area, and scattered clouds area as shown in Figure 3. For different marine scenes, we use different methods to perform the next step of saliency preprocessing in order to enhance the characteristics of the ship target.