# Detection of Marine Oil Spill from PlanetScope Images Using CNN and Transformer Models
## 3 Method
### Deep Learning Semantic Segmentation  
The growth of datasets and the evolution of graphics processing units (GPUs) have significantly advanced the field of neural networks. These advancements have enabled neural networks to process large amounts of data, learn complex relationships, and perform  
Figure 2: Flowchart of this study, illustrating the processes of labeling, modeling, optimization, and evaluation using the DeepLabV3+, Swin-UPerNet, and Mask2 Former models [23; 24; 25].  
excellent generalizations, thereby making substantial contributions to various computer vision tasks. As [PERSON] and [PERSON] (2019) mentioned, deep learning-based semantic segmentation is a technique that classifies pixels into specific object classes, making it a crucial step in image interpretation and analysis tasks [26]. In this study, we employed DeepLabV3+, Swin-UPerNet, and Mask2 Former as representative CNN and Transformer-based models, chosen for their strong performance in satellite remote sensing and their ability to handle complex image features for environmental monitoring.  
The DeepLab model utilizes atrous convolution to facilitate more efficient semantic image segmentation. The DeepLabV1 model introduced atrous convolution, while DeepLabV2 implemented the Atrous Spatial Pyramid Pooling (ASPP) technique for multi-scale context, allowing for the parallel processing of multiple atrous convolutions from the feature map and the subsequent merging of the results. In DeepLabV3, atrous convolution was integrated into the existing ResNet architecture to produce a denser feature map. DeepLabV3+ further advanced this approach by incorporating atrous separable convolution, a combination of separable convolution and atrous convolution. Atrous convolution increases the field of view (FOV) by creating additional space within the filter while maintaining a computational cost comparable to that of the original convolution. The receptive field, defined as the area of the input image covered by a single pixel in the feature map, is a crucial factor influencing the performance of semantic image segmentation [23].  
A novel approach, known as the Vision Transformer technique, has recently been developed. This technique applies the Transformer model, originally designed for sequence processing, to image recognition, thereby enhancing accuracy. It achieves this by efficiently selecting and focusing on input information through the self-attention mechanism [27]. The self-attention mechanism, which selectively references the most relevant regions and channels from images, was further refined in the Swin Transformer, proposed by Microsoft ([PERSON], WA, USA) in 2021. This model demonstrates superior performance compared to conventional CNN and Vision Transformer models. Its effectiveness lies in its ability to locally apply self-attention within a hierarchical shifted windows structure, where input values are processed sequentially and alternately shifted by the window size set in overlapping blocks [24].  
Mask2 Former, a recent advancement in instance segmentation, builds upon the Transformer model to adapt it effectively for object segmentation in images. This model leverages a masked attention mechanism to focus on specific regions with fine granularity, improving segmentation accuracy. Unlike traditional instance segmentation models, Mask2 Former treats segmentation as a mask prediction task, using a unified approach across tasks such as instance, semantic, and panoptic segmentation. By dynamically refining masks through each Transformer layer, Mask2 Former achieves higher accuracy and efficiency, surpassing conventional models in handling complex scenes [25].