# Deep Fusion Feature Based Object Detection Method for High Resolution Optical Remote Sensing Images
## 5 Deep Feature Extraction with Context Scene Feature Fusion and Detection
### Training of CNN and Transfer Learning  
#### 5.4.1 The Training Process of CNN  
The training process of the CNN is shown in Figure 15. It was mainly carried out by iterative updating of the forward propagation and back propagation stages. Specifically, the first stage randomly selected a sample \((X_{b},Y_{b})\) from the training set and input \(X_{b}\) to the network for feedforward calculation, then obtained the predicted output \(O_{b}\). At this stage, the data were transformed step-by-step from the input layer through a series of hidden layer levels and finally transmitted to the output layer, which is essentially the process of input multiplication with the weight matrix for each layer, as in Formula (15):  
\[O_{b}=\ F_{n}\left(\cdots\left(F_{2}\left(F_{1}\left(X_{b}W^{1}\right)W^{2} \right)\ldots\right)W^{n}\right) \tag{15}\]  
In the second stage, namely backward propagation stages: first, we calculated the error between predicted output \(O_{b}\) and real label \(Y_{b}\), and then, we continued to pass the error back to the front layer, and each layer updated its weight matrix by minimizing the error of small methods according to the current error situation. For the CNN, the weights usually are updated by the mini-batch gradient descent method, which is an optimization algorithm between the batch gradient descent and the stochastic gradient descent method. When the data volume is large, the mini-batch preserves the advantages of speed in the stochastic gradient descent method, while avoiding the problem of severe congestion the stochastic gradient descent method. The mini-batch gradient descent method updates the parameters iteratively by randomly selecting small batches of data, as shown in Formula (16), where \(m\) represents the number of training samples per iteration in parallel, which is limited by the memory size. For an objNet network, the size of the input sample is small and the network structure is relatively simple, so the value was 1024, and for the seeNet network, it was 64 in the experimental environment used in this section.  
\[\begin{split}&\omega_{k}\rightarrow\omega_{k}^{{}^{\prime}}= \omega_{k}-\frac{\eta}{m}\sum_{j}\frac{\partial\text{C}_{X_{j}}}{\partial \omega_{k}}\\ & b_{l}\to b_{l}^{{}^{\prime}}=b_{l}-\frac{\eta}{m}\sum_{j} \frac{\partial\text{C}_{X_{j}}}{\partial b_{l}}\end{split} \tag{16}\]  
Figure 15: The training process of CNN.  
where \(\omega_{k}\) and \(b_{l}\) are weight parameters and bias parameters in the network, respectively; \(\eta\) is the learning rate; \(C_{X_{j}}\) is the cost loss of the sample \(X_{j}\).  
Before training the network, appropriate training data should be found. For the scene feature extraction network seeNet, we needed to use the remote sensing scene classification data to train. For the remote sensing scene classification, there are two standard datasets: UCMerced-LandUse [29] and WHU-RS [30]. To increase the training set, this paper combined the two datasets, and a detailed description of this dataset can be seen in Section 5.4.1. For the object feature extraction network objNet, we needed to use the sub-images containing the object as the positive sample and the sub-images without the object as the negative sample. In order to make the training process and detection process the same distribution, the network used the pBING algorithm's output on the training set as the training data, in which a candidate window having an \(\geq\)0.5 intersection-over-union (IoU) overlap with a ground-truth box was labeled as the positive sample and the rest as the negative sample.