## 3 Methods  
We propose the AASNet, a network specifically designed to address the challenges of complex underwater environments and extreme data imbalance. The entire model integrates detection and segmentation modules, leveraging specialized loss functions to optimize performance. This network architecture consists of three components: the backbone, head, and loss modules, as illustrated in Figure 1, which work in concert to achieve precise object localization and instance segmentation.  
To begin, the backbone extracts rich feature information from the input image through a series of convolutional layers, progressively enhancing the expression of high-level semantic information. During this process, the spatial resolution is reduced while the number of channels in the feature map increases. This enables the network to better capture object features within the image and provides multi-scale feature maps for subsequent detection and segmentation tasks.  
Next, the head network receives the feature maps output by the backbone and processes them for detection and segmentation tasks. Although these two tasks have different output objectives, they share features and some structural components through an inheritance relationship, enabling effective collaboration. The detection task localizes objects by regressing their bounding boxes, while the segmentation task refines the target regions and generates precise segmentation masks. Both tasks share the high-level features extracted by the backbone and use independent modules to perform task-specific processing. Specifically, the detection part regresses the object locations, while the segmentation part extracts pixel-level information from the bounding boxes to generate segmentation masks. This design not only enhances computational efficiency but also optimizes overall performance, allowing the network to effectively handle instance segmentation tasks.  
Finally, the loss calculation module measures the discrepancy between the network's predictions and the ground truth labels, guiding the network training through loss optimization. The inputs to the loss module primarily include the predicted classification results, bounding box regression outcomes, segmentation masks, and their corresponding target labels. Specifically, the classification loss is calculated based on the error between the  
Figure 1: AASNet consists of three main parts: the backbone network, the head network, and the loss module. In the backbone network, we integrate the LCA module at the P4 layer of the GELAN [18] architecture to optimize semantic feature extraction for similar objects. The head network performs multi-scale predictions to generate refined segmentation results. The final output includes class predictions for 7 instance categories, predicted bounding boxes, and instance segmentation masks. The loss module computes the overall network loss, with the classification loss utilizing our designed DAFL to address the extreme data imbalance in underwater datasets.  
predicted class scores and the true object categories, the bounding box loss is derived from the difference between the predicted and true bounding boxes, and the segmentation loss measures the discrepancy between the predicted segmentation masks and the ground truth masks, ensuring pixel-level accuracy. These losses are weighted using different strategies and collectively contribute to the network's optimization process, enabling the model to effectively improve the accuracy of object detection and segmentation during training.