# Multi-Feature Fusion with Convolutional Neural Network for Ship Classification in Optical Images
## 3 Proposed Ship Classification Method
### Feature Extraction Based on Improved CNN
#### 3.1.2 Improved CNN  
Based on the above analysis, the detailed architecture of the proposed improved CNN described in this paper has been depicted in Figure 5. Table 2 describes specific parameters. As described in Figure 5 and Table 2, the proposed network comprises of four convolution layers, two max pooling layers, two fully connected layers, and the Softmax layer. After preprocessing (refer Section 3.1.3), the size of ship images equaled \(56\) pixels \(\times\)\(56\) pixels. The first convolution layer (i.e., Conv1) filters the processed image with \(32\) convolution kernels of size \(5\times 5\) with a stride equal to \(1\), thereby generating \(32\) feature maps of size \(52\times 52\). The kernel size of the first pooling layer (i.e., Max Pooling1) equaled \(2\times 2\) with stride equal to \(2\). Upon completion of the pooling operation, \(32\) feature maps of size \(26\times 26\) were generated. The second convolution layer (i.e., Conv2) took the output of the first pooling layer as input and filtered it with \(64\) convolution kernels of size \(3\times 3\) with a stride equal to \(1\), thereby generating \(64\) feature maps of size \(24\times 24\). The kernel size of the second pooling layer (i.e., Max Pooling2) again equaled \(2\times 2\) with a stride equal to \(2\). Upon completion of the second pooling operation, \(64\) feature maps of size \(12\times 12\) were generated. Likewise, the third and fourth convolution layers (i.e., Conv3 and Conv4) used \(32\) and \(64\) convolution kernels of size \(3\times 3\) and \(5\times 5\), respectively, to perform convolution operation with a stride equal to \(1\), thereby generating \(32\) and \(64\) feature maps each of size \(10\times 10\) and \(6\times 6\), respectively. Since the output size after convolution was relatively small, the number of max pooling layers need not be increased. The number of convolution kernels in the fourth convolution layer was considered twice in the previous layer to facilitate improvement in the overall feature-extraction result. [PERSON] et al. (2018) has proved that the number of neural units in the fully connected layer has little impact on the classification results. Therefore, the first fully connected layer (i.e., FC1) connects all feature maps generated by the fourth convolutional layer to obtain a \(384\)-dimensional feature vector; likewise, the second fully connected layer (i.e., FC2) comprises of a \(192\)-dimensional feature vector. Few weights need to be learnt to avoid overfitting. The last layer (i.e., Softmax layer) employed the Softmax function to obtain output decision classes. The self-built dataset contained four output classes, whereas the VAIS dataset contained six classes. The number of output classes identified was found to be consistent with the number of ship classes contained within the ship dataset. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Layer** & **Kernel Size** & **Filter Number** & **Stride** & **\#Parameters** \\ \hline Conv1 & \(5\times 5\) & 32 & 1 & 2432 \\ Max Pooling1 & \(2\times 2\) & - & 2 & 0 \\ Conv2 & \(3\times 3\) & 64 & 1 & 18,496 \\ Max Pooling2 & \(2\times 2\) & - & 2 & 0 \\ Conv3 & \(3\times 3\) & 32 & 1 & 18,464 \\ Conv4 & \(5\times 5\) & 64 & 1 & 51,264 \\ FC1 & 384 & - & - & 884,736 \\ FC2 & 192 & - & - & 73,729 \\ Softmax & 4 & - & - & 769 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Details concerning proposed CNN architecture. Figure 5: Structure of the proposed improved CNN. The activation function used in the convolution and fully connected layers was the ReLU function, which offers one-sided suppression and sparse characteristics. Additionally, it is more efficient compared to the sigmoid function and is capable of accelerating convergence speeds up to a certain extent. A dropout function has been added in FC1 to avoid overfitting, and the corresponding drop parameter was set to 0.5.