# Improved Ship Detection Algorithm from Satellite Images Using YOLOv7 and Graph Neural Network
## 3 Dataset and Our Method
### Our Approach  
Based on the YOLOv4, Scaled YOLOv4, and YOLO-R YOLO model architectures, the YOLOv7 architecture was developed.  
The YOLOv7, an Extended Efficient Layer Aggregation Network (E-ELAN) architecture, is a framework that enables the continuous improvement of the learning capabilities of the network by implementing various features such as shuffle, expand, and merge cardinality. This allows the network to maintain its learning performance even when the gradient route is changed.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Satellite** & **Resolution** & **No. of Images** & **No. of Ships** \\ \hline Sentinel-1B & 3 & 99 & 13,471 \\ TerraSAR-X & 3 & 31 & 2924 \\ TerraSAR-X & 0.5 & 4 & 190 \\ TerraSAR-X & 1 & 1 & 280 \\ TanDEM & 1 & 1 & 86 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Information of the images from the HRSID dataset.  
Figure 1: (a,b) A few images of 800 \(\times\) 800 pixels from the HRSID dataset.  
Compound model scaling is a process that involves modifying the characteristics of a model to improve its performance in various applications. For instance, it can help to improve the model's depth, width, and resolution. Different scaling considerations in conventional techniques with concatenation-based architectures (such as ResNet or PlainNet) must be taken into account collectively rather than separately. For instance, increasing model depth will affect the ratio between a transition layer's input and output channels, which may result in less hardware being used by the model. For a concatenation-based model, YOLOv7 introduces compound model scaling as shown in Figure 2. The compound scaling method can preserve the model's original design elements. It can be used to modify the output channel and depth factor of a computational block. This process can be performed in order to maintain the model's ideal structure. For instance, changing the block's depth factor can affect the output channel.  
Despite being an excellent VGG architecture, the planned re-parameterized version of RepConv loses significant accuracy when applied to either DenseNet or ResNet. In Figure 3, YOLOv7, the architecture is presented without an identity connection. Concatenation or residual is used to replace a previously created layer with a re-parameterized convolutional layer.  
A head, a neck, and a backbone are parts of a YOLO architecture as shown in Figure 4. The projected model outputs are located in the head. YOLOv7 is suitable for lead loss and auxiliary. The aim of this paper is to create a neural network that is capable of training various types of neural networks. It is inspired by deep supervision, a method that involves training a neural network. The generation of final product is the responsibility of the lead head, whereas the auxiliary head supports middle-layer training. Figure 5 demonstrates the general flow of the ship detection model from satellite images. In the dataset preprocessing step in Figure 5, first, the division of the dataset is made with a ratio of 6:4 for training set and testing set. For the identification of the ship, we consider the area of the bounding box and aspect ratio of the bounding box. The shape of the bounding box matches the aspect ratio of the bounding box, which is helpful in adopting an anchor for generating the bounding boxes.  
Figure 2: Working of YOLOv7: compound model scaling [21].