# Dark Spot Detection in SAR Images of Oil Spill Using Segnet
## 2 Study Area and Data Sets
### Sampling Process  
The Vapnik-Chervonenkis (VC) dimension is usually used to predict the probability of testing errors of models. [PERSON] (1965) proves that the probability of the upper bound of the testing error is given by (1):  
\[\Pr\left(testingerror\leq trainingerror+\sqrt{\frac{1}{N}\left[D\left(\log \left(\frac{2N}{D}\right)+1\right)-\log\left(\frac{\eta}{4}\right)\right]} \right)=1-\eta \tag{1}\]  
where \(D\) is the VC dimension of the classification model. \(N\) is the number of training samples. \(\sqrt{\frac{1}{N}\left(\left[D\left(\log\left(\frac{2N}{D}\right)+1\right)- \log\left(\frac{\eta}{4}\right)\right]\right)}\) is also called the model complexity penalty. When the testing error is less than the training error plus the model complexity penalty, the probability is \(1-\eta\). The bigger the \(D\), the bigger the model complexity penalty, and the bigger the \(N\), the smaller the model complexity penalty. Generally speaking, a deep learning model needs enough samples. Otherwise, the generalization of the model would be limited, i.e., over-fitting.  
The proposed method was applied to a data set of 4200 samples from five original SAR images of oil spill. Here, the data set was processed by the following steps and was called the OIL_SPILL_DATASET:  
1. In order to ensure that each sampling window includes oil slicks and seawater, the window size cannot be too small or too large, and the window sizes were selected to be \(500\times 500\), \(1000\times 1000\), \(1500\times 1500\), and \(2000\times 2000\) for each scene of the quad-polar SAR image, respectively. Samples, including oil slicks and seawater, were selected from those sub-images, 420 samples were selected from each scene data, totaling 2100 samples. The boundary complexity and weak boundary were the main factors affecting the segmentation accuracy. The boundary complexity and boundary strength of 420 samples selected from each scene data are shown in detail in Table 2.
2. To ensure the balance of the sample distribution, 105 samples (21 samples in each scene) in 2100 samples were added with multiplicative noise and additive noise, respectively, among which multiplicative noise had 10 levels (peak signal-to-noise ratio (PSNR) was between 50 and 30) and additive noise had 10 levels (PSNR was between 50 and 30). A total of 20 different levels of noise were applied to each sample. In this way, the number of samples per scene was extended from 420 to 840, and the total number of samples was up to 4200.
3. Due to the limitation of the graphics processing unit (GPU) capabilities, the samples with different sizes obtained in Steps (1) and (2) were resized into \(256\times 256\).
4. Segnet is a supervised pre-training process, and a label should be made for each sample. In Figure 2b, the black area represents the background (seawater) and the red region represents the target (oil slicks or lookalikes).
5. 4200 samples were randomly divided into a testing set or a training set according to the ratio of 1:6. To ensure the same distribution of data in the training set and the testing set, 15 samples were selected from 105 samples added with noise, of which three were contained in each oil slick  
Figure 2: Label for each sample. (**a**) An input image; (**b**) the label of the image.  
scene. 300 samples of each noise level corresponding to the 15 test samples were selected from the remaining 2100 noisy samples. The testing set contained 600 samples and the training set contained 3600 samples.