## 3 Methods
### Oil Sheen Prediction Neural Network (OS-Net)  
To build a deep neural network with better performance on oil sheep detection, we use residual block as basic element to overcome the vanishing gradient problem. To further improve the accuracy with limited oil sheep dataset, we use transfer learning strategies and explore the performance of different learning strategy on oil sheep detection.  
The OS-Net includes 18 convolutional layers with 8 residual blocks (Figure 3), which is a deep while easy-to-train neural network with a more powerful learning capacity.  
OS-Net has a traditional classification network architecture (see Figure 3). OS-Net has the first convolutional layer with 64 kernels (size = 7 \(\times\) 7, stride = 2), followed by a maximum pooling layer (size = 3 \(\times\) 3, stride = 2) to reduce the input oil sheep image size from 224 \(\times\) 224 to a feature matrix of 56 \(\times\) 56. The model backbone consists of 4 stages. Each stage consists of 2 residual blocks and each residual block has two 3 \(\times\) 3 convolutional layers with skip connection. The penultimate layer is an average pooling layer to down  
Figure 3: OS-Net architecture.  
Figure 2: Example of surface water in the OS-SS setup showing a (**a**) “with sheen” image and a (**b**) “no sheen” image used to create the surface sheep image library for the CNN model development.  
sample the detection of features in feature maps. The last fully connected layer is also the output layer, which provides the classification prediction. We use Softmax to obtain the binary prediction result ('No sheen' or 'With sheen').  
To accelerate the training and achieve higher accuracy, we use transfer learning strategy, which borrowed the learned general visual feature extraction knowledge from a larger dataset. The model starts with the pre-trained parameters using the ImageNet dataset and then adjusts these parameters to suit the oil sheen prediction task instead of starting the learning process from scratch with random parameter initialization. We explore the effectiveness of different strategies of transfer learning to gain the best OS-Net. These three strategies all used the same initial OS-Net architecture (Figure 3), but each model was trained differently and compared to the case without transfer learning. (Case A) OS-Net Without Transfer Learning. The model was trained from scratch on close-proximity oil sheen image dataset with random initialized parameters. (Case B) OS-Net With Transfer Learning Feature Extraction Strategy. We used the pre-trained model as a feature extractor to transfer the similar feature extraction ability learned from ImageNet to our model. Specifically, we pre-trained our OS-Net on ImageNet, modified the fully connected layers as shown in Figure 3, froze all the networks except the final layer, and then trained the model on our dataset. (Case C) OS-Net With Transfer Learning Fine-tuning Strategy. We used the pre-trained model as the starting point of training, then fine tuned all parameters for the target task. Specifically, we pre-trained our OS-Net on ImageNet, modified the fully connected layers, unfree all layers, then trained the model on our oil sheen dataset.  
In the training process, cross entropy was used as a loss function to update model weights w. The cross-entropy function is given in Equation (1) [40],  
\[L=-\frac{1}{M}\sum_{i=1}^{M}p(x)\log(q(x)) \tag{1}\]  
where \(M\) represents the number of classes, true probability \(p\) is the true label (no oil or with oil), and \(q\) is the predicted value of the current model.  
The model was trained using the stochastic gradient descent (SGD) optimization algorithm [40,41]. The SGD updates the network parameters (weights and biases) to minimize the loss function. This algorithm is defined as:  
\[w_{t+1}=w_{t}-\alpha\frac{\partial L_{t}}{\partial w_{t}} \tag{2}\]  
where \(w\) donates any trainable variable (W or B), \(t\) is the current time step (algorithm iteration), and \(\alpha\) is the learning rate.