A Lightweight Forward-Looking Sonar Sensing Framework for Embedded Target Detection in Resource-Constrained Underwater Systems Authors: Hong Peng, Chaolin Yang, Chen He, Wei Ye, Renyou Yang Published: 2026 ABSTRACT Forward-looking sonar (FLS) is an important sensing modality for autonomous underwater vehicles and other marine robotic systems operating in turbid, low-visibility, and acoustically cluttered environments. Reliable target detection in FLS imagery remains challenging because target echoes are often weak, compact targets can be obscured by background clutter, and embedded processors impose strict limits on model size, latency, and computation. To address these issues, this study presents a lightweight FLS sensing framework for embedded target detection in resource-constrained underwater systems. The framework combines a compact detection architecture, difficulty-aware supervision, and teacher–student knowledge transfer. Specifically, FPN-Mix is developed as a lightweight backbone with a Conv-Mix module to improve contextual aggregation under limited computational budgets. A target-aware dynamic weighting loss is introduced to increase the supervision weight of difficult acoustic samples associated with weak echoes, ambiguous boundaries, and clutter interference. A multi-level knowledge distillation strategy is then adopted to transfer feature-level and prediction-level knowledge from an enhanced teacher model to the compact student detector. Experiments on the public UATD benchmark and the independently collected Zhanjiang Bay No.1 field dataset show that the proposed method achieves a favorable balance between detection accuracy and efficiency and remains competitive in a real marine aquaculture environment. The proposed model contains only 2.83 M parameters and requires 6.68 GFLOPs. After ONNX export and TensorRT FP16 acceleration, the model reaches 72.23 frames per second (FPS) on an NVIDIA Jetson Orin NX platform, supporting its practical use in embedded FLS sensing systems. 1. Introduction Forward-looking sonar (FLS) is an important sensing modality for autonomous underwater vehicles (AUVs) and other marine robotic platforms operating in turbid, low-visibility, and acoustically cluttered environments. Unlike optical cameras, FLS can provide stable scene perception when light attenuation, suspended particles, and water turbidity severely degrade visual sensing. This makes FLS highly valuable for underwater inspection, obstacle avoidance, seabed exploration, and autonomous navigation [1,2,3,4]. In these scenarios, target detection is not merely an isolated algorithmic task; rather, it is a core perception function within a complete sonar sensing system whose practical utility depends on both detection quality and deployability. Despite its sensing advantages, FLS imagery remains substantially more difficult to interpret than optical imagery. Acoustic targets often appear with weak signatures, blurred contours, sparse texture, heavy reverberation, and strong background clutter. Targets occupying limited image areas or presenting weak acoustic responses are especially vulnerable to missed detection, while background structures can easily trigger false alarms. Early sonar detection methods mainly relied on handcrafted features and rule-based processing. Representative examples include symbolic pattern analysis [5], texture-based discrimination of man-made objects [6], edge-guided segmentation [7], and multi-algorithm fusion schemes [8,9]. Although effective in constrained settings, these methods depend heavily on manually designed priors and empirical thresholds, which limits robustness across dynamic underwater environments. Recent progress in deep learning has substantially advanced target perception in optical imagery, with influential detector families such as R-CNN [10,11,12,13], YOLO [14,15], and transformer-based detectors [16,17]. Motivated by these successes, researchers have begun transferring deep models to sonar imagery. For example, Faster R-CNN has been adapted for wreckage detection in side-scan sonar (SSS), and comparative studies have confirmed the feasibility of convolutional neural network (CNN)-based sonar perception [18]. However, directly applying optical-image detectors to sonar data is often insufficient. Compared with optical images, FLS data exhibit lower contrast, stronger clutter, weaker target boundaries, and more severe noise interference, all of which reduce the reliability of off-the-shelf detection architectures. A second key challenge lies in the strict resource constraints of practical underwater sensing systems. In onboard AUV deployment, perception modules must simultaneously satisfy latency, memory, and power requirements. Large models may improve benchmark accuracy but are often unsuitable for real-time inference on embedded processors. Consequently, the objective is not only to improve detection accuracy, but also to design a framework that remains lightweight and deployable. This requirement is especially critical for FLS. Compared with SSS, FLS provides wider field-of-view sensing, greater angular flexibility, and more convenient integration with mobile robotic platforms, but typically at the cost of lower spatial resolution and weaker target details. Existing sonar studies still focus predominantly on accuracy-oriented detector design or on SSS imagery, whereas fewer works explicitly address the system-level need for lightweight FLS perception with validated embedded deployment. This gap is substantial because a practically useful FLS perception framework should demonstrate not only improved inference quality but also credible feasibility on real embedded hardware. This work treats FLS target detection as an embedded sensing problem rather than a desktop-only detection benchmark. The proposed framework is designed for practical sonar perception, where detection accuracy and computational cost must be considered together. Feature extraction, supervision design, and teacher–student transfer are jointly considered to maintain detection performance while reducing the burden of deployment. The main contributions of this work are summarized as follows:1.A lightweight FLS sensing framework is developed based on an FPN-Mix backbone and a Conv-Mix module. This design improves contextual modeling in cluttered FLS imagery while keeping the detector compact enough for embedded deployment.2.To improve training on weak and ambiguous acoustic targets, a target-aware dynamic weighting loss is introduced. This loss increases the contribution of difficult samples caused by weak echoes, unclear boundaries, and background clutter without adding inference cost.3.A multi-level teacher–student distillation strategy is designed to combine attention-guided feature transfer, task-level prediction supervision, and FPN-level distillation. This strategy enables the compact student detector to learn more discriminative representations from a stronger teacher model.4.The proposed framework is evaluated through benchmark testing, field validation, and embedded deployment. In addition to experiments on the public UATD benchmark, the method is further validated on the independently collected Zhanjiang Bay No.1 field dataset to examine its generalization ability in a real marine aquaculture environment. The model achieves a competitive accuracy–efficiency trade-off with 2.83 M parameters and 6.68 GFLOPs, and reaches 72.23 FPS after TensorRT FP16 deployment on an NVIDIA Jetson Orin NX platform. 1.A lightweight FLS sensing framework is developed based on an FPN-Mix backbone and a Conv-Mix module. This design improves contextual modeling in cluttered FLS imagery while keeping the detector compact enough for embedded deployment. A lightweight FLS sensing framework is developed based on an FPN-Mix backbone and a Conv-Mix module. This design improves contextual modeling in cluttered FLS imagery while keeping the detector compact enough for embedded deployment. 2.To improve training on weak and ambiguous acoustic targets, a target-aware dynamic weighting loss is introduced. This loss increases the contribution of difficult samples caused by weak echoes, unclear boundaries, and background clutter without adding inference cost. To improve training on weak and ambiguous acoustic targets, a target-aware dynamic weighting loss is introduced. This loss increases the contribution of difficult samples caused by weak echoes, unclear boundaries, and background clutter without adding inference cost. 3.A multi-level teacher–student distillation strategy is designed to combine attention-guided feature transfer, task-level prediction supervision, and FPN-level distillation. This strategy enables the compact student detector to learn more discriminative representations from a stronger teacher model. A multi-level teacher–student distillation strategy is designed to combine attention-guided feature transfer, task-level prediction supervision, and FPN-level distillation. This strategy enables the compact student detector to learn more discriminative representations from a stronger teacher model. 4.The proposed framework is evaluated through benchmark testing, field validation, and embedded deployment. In addition to experiments on the public UATD benchmark, the method is further validated on the independently collected Zhanjiang Bay No.1 field dataset to examine its generalization ability in a real marine aquaculture environment. The model achieves a competitive accuracy–efficiency trade-off with 2.83 M parameters and 6.68 GFLOPs, and reaches 72.23 FPS after TensorRT FP16 deployment on an NVIDIA Jetson Orin NX platform. The proposed framework is evaluated through benchmark testing, field validation, and embedded deployment. In addition to experiments on the public UATD benchmark, the method is further validated on the independently collected Zhanjiang Bay No.1 field dataset to examine its generalization ability in a real marine aquaculture environment. The model achieves a competitive accuracy–efficiency trade-off with 2.83 M parameters and 6.68 GFLOPs, and reaches 72.23 FPS after TensorRT FP16 deployment on an NVIDIA Jetson Orin NX platform. The remainder of the paper first reviews related studies on sonar target detection and KD. The proposed lightweight FLS sensing framework is then described in detail, followed by quantitative comparisons, ablation studies, generalization evaluation, qualitative visualization, and embedded deployment results. The paper concludes with a summary of the main findings and possible future directions. 2. Related Work Efficient FLS perception requires a careful balance between representation quality and computational cost, especially when the detector is intended to function as an embedded sensing module rather than a desktop-only benchmark model. This section reviews two groups of studies most relevant to this work: target detection in sonar imagery and KD for efficient detection. 2.1. Target Detection in Underwater Sonar Imagery With the rapid progress of optical object detection [11,12,13,14,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36], deep models have been increasingly transferred to sonar imagery. Early studies mainly adapted optical detectors to SSS data through multi-scale feature fusion, transfer learning, and task-specific refinement. Representative examples include improved YOLOv3 for small SSS datasets [37], Mask R-CNN variants for sonar target localization [38], lightweight residual backbones for parameter reduction [39], and noise-aware detection frameworks such as NFD-YOLO [40]. Other efforts further improved SSS detection through shadow-aware modeling [41], multi-scale attention mechanisms [42], anchor assignment refinement [43], graph-based channel attention [44], and unsupervised shadow detection [45]. However, most of these studies focus on SSS rather than FLS. Compared with SSS, FLS provides wider coverage and greater deployment flexibility, but usually suffers from lower spatial resolution, weaker target details, and heavier clutter interference. As a result, methods developed for SSS or optical imagery cannot be directly transferred to FLS perception without adaptation to acoustic imaging characteristics [46,47,48]. Recent FLS-oriented studies have explored hybrid CNN–Transformer architectures and lightweight detection models [49,50,51]. These methods have improved detection performance, but maintaining a reliable balance between accuracy and efficiency remains difficult under onboard deployment constraints. In addition, knowledge distillation tailored to FLS imagery remains relatively underexplored. These limitations motivate the development of a lightweight FLS detection framework that preserves detection accuracy while remaining deployable on resource-constrained underwater platforms. 2.2. Knowledge Distillation As discussed above, onboard deep models must balance detection accuracy and computational efficiency. Although large models usually achieve stronger representation capability and better detection performance, they also require substantially higher computational resources [52,53]. To address this issue, model compression techniques such as pruning have been widely studied. Knowledge distillation, originally proposed for image classification [54], transfers knowledge from a large teacher model to a lightweight student model and has become an effective paradigm for efficient model design. Subsequent studies extended KD to object detection. Chen et al. [55] demonstrated its effectiveness for compressing SSD detectors by introducing a hint-based loss on intermediate features. Wei et al. [56] further enabled student detectors to learn from both final predictions and intermediate representations, improving performance in compact models. Zhang et al. [57] applied KD to Faster R-CNN and achieved improved efficiency without sacrificing detection accuracy. Yang et al. [58] further applied a knowledge-distillation-based strategy to conveyor belt defect detection, demonstrating the applicability of KD in industrial defect detection scenarios. Zheng et al. [59] proposed localization distillation to transfer bounding-box localization knowledge, while Wang et al. [60] introduced CrossKD, which transfers intermediate features from the student’s detection head to the teacher’s head to alleviate the conflict between ground-truth supervision and teacher guidance. Despite these advances, knowledge distillation has been used only sparingly for underwater sonar target detection. Since compact detectors are needed for AUVs and other embedded underwater platforms, sonar-oriented distillation remains a useful direction for efficient FLS perception. 3. Proposed Method As shown in Figure 1, the proposed framework follows a teacher–student detection pipeline for embedded FLS sensing. The input FLS image is first processed by the backbone to extract hierarchical features, which are then fused by the feature pyramid network (FPN) and passed to decoupled detection heads for classification and localization. During training, the student detector is supervised by both the standard detection loss and the distillation losses from the teacher model. The framework is built on a one-stage detector and is designed to improve FLS feature representation while keeping the student model compact for embedded deployment. FPN-Mix is used to strengthen contextual feature extraction under weak and cluttered acoustic responses, TADW adjusts the learning emphasis on difficult samples, and multi-level teacher–student distillation helps compensate for the representation loss caused by lightweight model design. 3.1. Ultra-Lightweight Network Architecture 3.1.1. Multi-Scale Feature Integration Mixture Network FLS targets often appear with scale-varying acoustic responses and incomplete structural cues across different feature levels. A single local convolution branch can preserve fine details, but it is less effective at integrating multi-scale acoustic context when weak target responses are mixed with background reverberation. To improve feature aggregation under this condition, an FPN-Mix backbone equipped with the Conv-Mix module is introduced. The goal is to enhance multi-scale contextual representation while keeping the feature extraction process lightweight for embedded deployment. As illustrated in Figure 2, the FPN-Mix block uses a parallel structure that combines a baseline convolution branch and a Conv-Mix branch. The baseline branch preserves local spatial responses, whereas the Conv-Mix branch introduces region-aware contextual information. Their fusion allows the network to retain local acoustic details while improving the representation of target-related structures across different scales. Let F denote the input feature map to the FPN-Mix block. The two parallel branches are first fused as (1)Z=fconv-mix(F)⊕fbase(F), where ⊕ denotes element-wise addition, fconv-mix(·) denotes the Conv-Mix branch, and fbase(·) denotes the baseline convolution branch. To aggregate multi-scale information, the fused feature Z is pooled at four scales, resized to a common spatial size, and concatenated along the channel dimension:(2)Y=Cati=14Resizefpool(i)(Z), where fpool(i)(·) denotes the pooling operation at the i-th scale, Resize(·) denotes spatial alignment, and Cat(·) denotes channel-wise concatenation. The aggregated multi-scale representation is then refined by another branch-fusion operation:(3)Fmix=fconv-mix(Y)⊕fbase(Y). The fused features are finally propagated to three pyramid output levels with progressively reduced spatial resolutions, where H and W denote the input spatial dimensions and Ci denotes the channel dimension of the i-th output level. 3.1.2. Conv-Mix Module In FLS images, target-related acoustic responses are often distributed over small acoustic regions and are affected by fan-shaped imaging geometry, uneven echo intensity, and surrounding reverberation. A standard convolutional branch mainly aggregates information within fixed local neighborhoods. Such local aggregation is less effective at relating a response to its surrounding acoustic context, which can make the detector sensitive to isolated high-intensity background responses and less capable of preserving weak but structurally meaningful target cues. To address this issue, Conv-Mix introduces an efficient token-to-region interaction mechanism. Instead of performing dense global self-attention, the module first summarizes the feature map into a set of pooled regional descriptors and then allows spatial tokens to selectively interact with these descriptors. This design interprets local responses with reference to regional acoustic patterns while keeping the computation suitable for a lightweight embedded detector. And the architecture of the Conv-Mix module is illustrated in Figure 3. First, the spatial token representation, regional key representation, and regional value representation are generated as(4)P=reshape(WpX),C=reshapeWcPool(X),V=reshapeWvPool(X), where X∈RC×H×W denotes the input feature map, Wp, Wc, and Wv are 1×1 convolutional projections, Pool(·) denotes adaptive average pooling to regional summaries, and reshape(·) flattens the spatial dimensions. To reduce computation, the channel dimension is divided into M groups, and token-to-region interaction is computed independently within each group. For the m-th group, the contextual response is obtained by(5)O(m)=V(m)SoftmaxP(m)⊤C(m)⊤,m=1,…,M. Here, P(m)⊤C(m) measures the affinity between spatial tokens and regional summaries, while the row-wise softmax produces adaptive mixing weights. Through this operation, each spatial token is updated according to its affinity with pooled regional descriptors, allowing the module to suppress isolated clutter responses and retain target-related acoustic structures more effectively. The group-wise outputs are then concatenated, reshaped back to the spatial domain, and projected to form the final Conv-Mix output:(6)fconv-mix(X)=WoreshapeCatO(1),O(2),…,O(M), where Wo denotes the output projection and Cat(·) denotes channel-wise concatenation. The resulting Conv-Mix output combines local spatial responses with region-level acoustic cues, providing a compact alternative to full attention for embedded FLS perception. 3.2. Target-Aware Dynamic Weighting Loss In FLS detection, training samples often exhibit substantial differences in optimization difficulty. Many background regions are easy to classify, whereas foreground targets and target-like clutter tend to produce low-confidence predictions during training. If all samples are weighted uniformly, abundant easy background responses can dominate the loss, reducing the effective supervision for hard foreground regions and confusing background patterns. To address this issue, TADW is introduced to adaptively increase the supervision weight of difficult acoustic samples according to the evolving optimization state. TADWLoss Formulation Let p denote the predicted probability for a binary target label y. The standard compact notation pt is defined as(7)pt=p,y=1,1−p,y=0. A lower value of pt indicates a more difficult sample. To make the weighting process adaptive to the current training state, a smoothed confidence estimate is introduced as(8)p^t=β1t∑i=1tpi+(1−β)pt, where β=0.05 controls the balance between historical and current prediction confidence. Based on pt and p^t, two dynamic factors are defined as δt=−ln(pt) and ωt=−ln(p^t), where δt reflects sample-specific difficulty and ωt describes the smoothed training state. The final TADW loss is formulated as (9)LTADW=−(α−pt)δtlog(pt),pt<θ,−(1−pt)ωtlog(pt),pt≥θ, where θ is set to 0.5 by default, and α controls the reweighting strength for difficult samples. In this way, TADW adaptively increases the supervision weight of difficult acoustic samples without introducing additional inference-time complexity. Compared with standard focal loss, which uses a fixed modulation factor (1−pt)γ to down-weight easy samples, TADW introduces the dynamic factors δt and ωt to adjust the weighting strength according to the current prediction confidence and its smoothed historical estimate. Therefore, the sample weighting in TADW can vary with both sample difficulty and the evolving training state. This adaptive behavior is beneficial for FLS imagery, where target-like clutter, weak acoustic responses, and foreground–background ambiguity often lead to large variations in prediction confidence during training. 3.3. Multi-Level Knowledge Distillation Framework Lightweight detector design is necessary for embedded deployment, but aggressive model compression can reduce the representation capacity of the student model. This is especially problematic in FLS imagery, where targets often have weak responses and are easily confused with clutter. To reduce this loss of discrimination, a multi-level teacher–student distillation framework is introduced that transfers feature-level and prediction-level knowledge from a stronger teacher network to the lightweight student detector. Given a teacher network fT(x) and a student network fS(x), an asymmetric distillation design is used. Attention modules are retained in the teacher branch to improve feature refinement during training, while the student branch removes these modules to keep inference efficient. With this design, the teacher can provide stronger training guidance, whereas the deployed student does not incur additional inference cost. As illustrated in Figure 4, the teacher branch provides attention-enhanced feature representations, while the lightweight student learns from the teacher through both attention-guided feature distillation and prediction-level distillation over classification, localization, and objectness branches. 3.3.1. Attention-Guided Feature Distillation To transfer the teacher’s attention-enhanced representations to the student, the feature distillation loss is defined as(10)Lfeat=At⊙fT(x)−fS(x)22, where At denotes the attention map of the teacher model, fT(x) and fS(x) denote the teacher and student feature representations, respectively, and ⊙ represents element-wise multiplication. This term encourages the student to align with the attention-refined features learned by the teacher. 3.3.2. Prediction-Level Knowledge Alignment In addition to feature alignment, the teacher’s prediction knowledge is further distilled from the classification, bounding-box regression, and objectness branches. For classification distillation, the Kullback–Leibler (KL) divergence between the softened teacher and student predictions is minimized:(11)LKD-cls=∑k=1KpkT(x)logpkT(x)pkS(x), where K is the number of categories. The teacher probability is computed with a temperature parameter τ as(12)pT(x)=softmaxzT(x),τ=expzT(x)/τ∑j=1KexpzjT(x)/τ, where zT(x) denotes the logits produced by the teacher network for sample x. The student probability pS(x) is defined analogously. For bounding-box regression distillation, the mean squared error is used to align the teacher and student box predictions:(13)LKD-bbox=1N∑i=1NRegoutputT−RegoutputS2, where N is the number of bounding-box predictions. For objectness distillation, the binary cross-entropy loss is adopted:(14)LKD-obj=−1N∑i=1N[Objt(i)logObjs(i)+1−Objt(i)log1−Objs(i)], where Objs={Objs(i)}i=1N and Objt={Objt(i)}i=1N denote the student and teacher objectness predictions, respectively. 3.3.3. Multi-Level Distillation Across FPN Features Because FLS imagery often contains weak and scale-varying target responses embedded in cluttered backgrounds, multi-level distillation is applied across the FPN outputs to enhance the student’s representation capability at different semantic scales. Specifically, the prediction-level distillation losses for classification, bounding-box regression, and objectness are averaged over the three FPN levels, allowing the student to absorb discriminative teacher knowledge from coarse semantic cues to finer localization details. 3.3.4. Overall Distillation Objective Based on the above definitions, the soft distillation objective is written as(15)LKD-soft=λfeatLfeat+λclsLKD-clsmulti+λbboxLKD-bboxmulti+λobjLKD-objmulti where λfeat, λcls, λbbox, and λobj are balancing coefficients. The final training objective is then formulated as(16)Ltotal=Lhard+LKD-soft where Lhard denotes the standard detection loss of the student network. In this way, the student is optimized not only by ground-truth supervision but also by multi-level guidance from the teacher, which improves feature representation and detection robustness in challenging FLS scenes. 4. Experimental Results and Analysis 4.1. Dataset The proposed framework is evaluated on the 2022 Underwater Acoustic Target Detection (UATD) dataset, a public benchmark for FLS target detection released by Xie et al. [61]. The dataset provides a standardized fan-to-matrix conversion and contains more than 9000 images acquired with a Tritech Gemini 1200ik sonar (Tritech International Limited, Westhill, Aberdeenshire, United Kingdom), covering 10 target categories with raw sonar data and corresponding annotations. The original release defines three predefined subsets: UATD_Training, UATD_Test_1, and UATD_Test_2, including 7600 training images and two independent test subsets of 800 images each. This official split is followed without additional random re-splitting or redistribution: UATD_Training is used for model training, while UATD_Test_1 and UATD_Test_2 are used for independent evaluation. Figure 5 shows representative examples from the dataset, and Figure 6 shows the target-size distribution, where most bounding boxes occupy only about 10% of the full image area, reflecting the difficulty of detecting targets that occupy limited regions in FLS imagery. The standard COCO APsmall metric is not used as the primary scale-level metric in this study because the official UATD test subsets contain very few instances satisfying the COCO-defined small-object criterion of an area smaller than 32×32 pixels. Such a limited number of samples makes APsmall statistically unstable and sensitive to a few detections. Therefore, a dataset-specific compact-target evaluation is introduced according to the relative bounding-box area in the original FLS image. For each annotated target, the relative area is defined as (w×h)/(W×H), where w and h denote the width and height of the bounding box, and W and H denote the width and height of the original sonar image. According to the target-size distribution shown in Figure 6, targets with a relative area smaller than 0.3% are selected as compact targets. The corresponding compact-target AP is reported as APcompact. This evaluation better reflects the scale characteristics of FLS imagery, where detection difficulty is closely related to the fraction of the sonar image occupied by the acoustic response rather than only to the absolute pixel area. 4.2. Experimental Settings All comparative experiments were conducted on a desktop platform using PyTorch 2.5.0+cu124 and MMDetection with an NVIDIA RTX 3060 GPU. The batch size was set to 4, and the models were optimized using stochastic gradient descent (SGD) with a momentum of 0.9. The initial learning rate was set to 0.0003125 and updated using a cosine annealing schedule. Unless otherwise stated, the hyperparameter α in TADW was fixed at 1.5 in the main comparison experiments, while a separate sensitivity study was conducted to examine different α values. All models were trained for 12 epochs. All detectors followed the same dataset split, input resolution, batch size, training length, and evaluation metrics. The 12-epoch setting follows the standard MMDetection 1× training schedule and provides a common baseline for detector comparison under the adopted dataset scale and batch size. Classical detectors, including YOLOv5-S, YOLOv7-Tiny, EfficientDet-Lite-D1, NanoDet, RetinaNet, PAA, VFNet, TOOD, and Sparse R-CNN, were implemented using the MMDetection framework and its corresponding configuration files. Recent state-of-the-art detectors, including RF-DETR, Salience-DETR, FFCA-YOLO, and Hyper-YOLO-N, were evaluated using their publicly released official implementations provided by the original authors, with dataset paths, class numbers, input resolution, batch size, training epochs, and evaluation metrics adjusted to match the same experimental protocol. For quantitative evaluation, mAP@50, mAP@50:95, parameter count, GFLOPs, and inference speed are reported. Desktop-side benchmarking results, including parameter count, GFLOPs, and FPS, were obtained under the same software environment and input setting, and are used for fair comparison among different detectors. The corresponding desktop-side complexity and inference-speed results are reported later in the desktop-side complexity comparison. To evaluate embedded deployment, the proposed model was further exported to ONNX and accelerated with TensorRT FP16 inference on an NVIDIA Jetson Orin NX platform. The embedded results are reported separately in Section 4.7 and are used to verify the practical edge-side deployment capability of the proposed method rather than to replace the desktop-side comparison protocol. All detectors were trained under a unified data preprocessing pipeline. For each sample, the input image and the corresponding bounding-box annotations were loaded, and invalid annotations were filtered according to a minimum object-size criterion. The image was then resized while preserving its aspect ratio, normalized using backbone-compatible mean and standard deviation, converted to the required channel format, and padded according to the size divisor required by the FPN structure. During validation and testing, the same deterministic preprocessing pipeline was used, except that random operations were removed. All comparison models used the same lightweight augmentation strategy during training, consisting mainly of aspect-ratio-preserving resizing and random horizontal flipping with a probability of 0.5. Stronger augmentations, such as Mosaic, MixUp, aggressive random cropping, and heavy geometric transformations, were not used. FLS imagery is governed by acoustic imaging characteristics, and excessive augmentation may introduce unrealistic target-shadow relationships or distort the physical consistency of sonar echoes. 4.3. Quantitative Results Table 1 and Table 2 summarize the comparison results on the two UATD test subsets. The proposed method achieves the highest overall detection accuracy among the compared detectors while maintaining a compact model size and low computational cost. It obtains 95.5% mAP@50 on UATD-Test-1 and 97.5% mAP@50 on UATD-Test-2. Compared with Hyper-YOLO-N, the strongest baseline in this comparison, the proposed method improves mAP@50 by 8.8 and 10.7 percentage points on UATD-Test-1 and UATD-Test-2, respectively. These results indicate that applying general-purpose detectors to FLS imagery remains challenging without sufficient adaptation to acoustic imaging characteristics. In cluttered sonar scenes, background reverberation can be mistaken for valid targets, while weak target responses may lead to missed detections. Although transformer-based and two-stage detectors provide strong representation capacity, they often require higher computational cost or larger-scale labeled data. By adapting the architecture, loss design, and distillation strategy to FLS characteristics, the proposed framework achieves more stable performance across the two official UATD test subsets. The lightweight student detector is still less competitive on the cube category in UATD-Test-1, where Sparse R-CNN and TOOD obtain slightly higher AP values. This may be related to the limited spatial detail preserved by the compact architecture when handling weak and ambiguous cube-like acoustic signatures. Nevertheless, the overall results show that the proposed method maintains a favorable accuracy–efficiency trade-off. The comparison with RF-DETR further suggests that general-purpose detectors may require additional adaptation before being applied to FLS imagery. Table 3 reports the compact-target detection results on the two UATD test subsets. The proposed method obtains 59.19% APcompact on UATD-Test-1 and 57.53% APcompact on UATD-Test-2, giving the highest values among the compared methods under the same compact-target definition. These results indicate that the proposed framework remains effective for targets occupying only a small fraction of the FLS image. The compact-target results should be interpreted together with the design of TADW. TADW is not a scale-aware loss and does not directly assign weights according to object size. Its benefit for compact targets comes from difficulty-aware supervision. In FLS imagery, compact targets are often associated with weak echoes, ambiguous boundaries, and low-confidence predictions, which are emphasized by the proposed reweighting mechanism. Combined with contextual aggregation in FPN-Mix and multi-level knowledge distillation, this supervision helps improve the detection of compact acoustic targets in cluttered sonar scenes. The desktop-side complexity and inference-speed comparison is summarized in Table 4. 4.4. Visualization Results Figure 7 and Figure 8 show representative detection results on the UATD dataset. Red, purple, and orange circles denote true positives, false alarms, and missed detections, respectively. Compared with SSS imagery, the FLS images in this dataset have lower contrast, weaker structural details, and stronger background interference, which makes target discrimination more difficult. The visual results show that mainstream optical-image-oriented detectors still have limitations on FLS data. RetinaNet and Sparse R-CNN tend to miss complex underwater targets such as ROVs under cluttered conditions. TOOD can localize common sonar targets reasonably well, but it remains less reliable for weak-feature targets such as cylindrical structures. PAA also produces false alarms in background regions. These errors mainly arise from the mismatch between feature extraction mechanisms designed for optical images and the characteristics of FLS data, including multipath reflections, speckle noise, and weak low-contrast boundaries. As shown in Figure 9, the representative SOTA detectors detect many targets under nominal conditions, but they still produce errors on harder classes and cluttered backgrounds. This behavior reflects the domain shift between optical imagery and FLS imagery, where intensity-only backscatter, low SNR, and geometry-dependent highlights and shadows weaken shape cues learned from optical data. In comparison, the proposed distillation framework provides more stable detection results by transferring discriminative knowledge from the teacher model to the lightweight student detector. 4.5. Computational Complexity Analysis Table 4 reports the model complexity and desktop-side inference speed of different methods under a unified evaluation environment. The proposed method achieves a favorable trade-off between parameter count, computational cost, and detection accuracy. 4.6. Ablation Experiments Component-WiseAblation Study It is worth noting that the baseline loss used in this ablation study is the standard focal loss. Therefore, the comparisons in Table 5 and Table 6 directly reflect the effect of replacing focal loss with the proposed TADW loss under the same detector framework. The ablation results on UATD-Test-1 and UATD-Test-2 are reported in Table 5 and Table 6, respectively. The overall trend is consistent across both test sets and aligns with the characteristics of FLS imagery, where weak target echoes, blurred structural boundaries, and severe reverberation interference make optimization particularly challenging for lightweight detectors. Compared with the baseline detector, introducing TADW consistently improves the learning emphasis on difficult samples and alleviates the tendency of the model to be dominated by easy background responses. As a result, Baseline + TADW improves mAP@50 from 77.3% to 84.3% on UATD-Test-1 and from 77.6% to 83.2% on UATD-Test-2, confirming that adaptive sample reweighting is effective for suppressing background interference and enhancing weak-target discrimination in FLS imagery. KD provides an additional gain by transferring more discriminative semantic and localization knowledge from the teacher model to the lightweight student. This is particularly beneficial in FLS imagery, where target appearance is often unstable and easily affected by clutter and acoustic scattering. Accordingly, Baseline + KD achieves 92.3%/59.09% mAP@50/mAP@50:95 on UATD-Test-1 and 94.4%/60.09% on UATD-Test-2, indicating that teacher-guided supervision can substantially strengthen the representation capacity of the lightweight detector. When both modules are enabled, the Full Model achieves the best overall performance, reaching 95.5% mAP@50 and 60.0% mAP@50:95 on UATD-Test-1, and 97.5% mAP@50 and 61.1% mAP@50:95 on UATD-Test-2. These results indicate that TADW and KD are complementary for lightweight FLS target detection, jointly improving robustness to weak targets, clutter interference, and ambiguous sonar structures. For the main comparison experiments, α was fixed at 1.5 to maintain a consistent setting across different detectors. To examine the sensitivity of TADW to this hyperparameter, additional experiments were conducted with α∈{2,2.5,3,3.5,4}. As shown in Table 7 and Table 8, the detection performance varies with α, but the trend is not strictly monotonic. Compared with the default setting of α=1.5, moderate values around α=3 generally produce more favorable results on both test subsets. This suggests that an appropriate reweighting strength can help emphasize difficult acoustic samples without excessively disturbing the optimization process. When α is set too high, the performance shows a mild decline, indicating that overly strong reweighting may amplify hard or noisy samples and reduce training stability in cluttered FLS scenes. 4.7. Embedded Inference Benchmark on Jetson Orin NX To evaluate the embedded inference capability of the proposed method, the trained model was exported to ONNX and benchmarked on an NVIDIA Jetson Orin NX platform. TensorRT FP16 acceleration was enabled during deployment, and the available execution providers were TensorRTExecutionProvider, CUDAExecutionProvider, and CPUExecutionProvider. The hardware and software configuration is summarized in Table 9. For the ONNX/TensorRT deployment test, the model input size was read from the exported ONNX model and set to 416×416 in the benchmark. Each input image was resized while preserving its aspect ratio and padded to match the model input size. The image tensor was then converted to the required channel format and numerical precision before inference. The post-processing stage included confidence-based filtering, non-maximum suppression, and coordinate rescaling to map the predicted bounding boxes back to the original image size. For runtime evaluation, 100 input images were used. Before formal measurement, a warm-up stage of 20 iterations was performed to reduce startup-related fluctuations. Both pure inference performance and end-to-end performance are reported. The pure inference benchmark reflects the execution efficiency of the deployed model itself, whereas the end-to-end benchmark additionally includes preprocessing and other runtime overhead, thereby providing a more realistic estimate of practical onboard deployment. The benchmark results show that the proposed model achieves an average pure inference latency of 7.736 ms, corresponding to 129.26 FPS. When preprocessing and runtime overhead are included, the average end-to-end latency is 13.845 ms, corresponding to 72.23 FPS. These results indicate that the proposed lightweight framework maintains stable real-time performance on the Jetson Orin NX platform and is suitable for embedded FLS sensing scenarios under resource-constrained conditions. It should be noted that this experiment is intended to evaluate the on-device inference efficiency of the proposed method, rather than to provide a fully controlled cross-platform comparison against all baseline detectors. The desktop-side complexity and inference-speed comparison of different methods is reported separately in Table 4 under the same evaluation setting. The Jetson Orin NX benchmark is therefore used as an embedded deployment validation of the proposed model after ONNX export and TensorRT FP16 acceleration. The embedded runtime validation setup on the Jetson Orin NX platform is shown in Figure 10. The on-device resource usage and end-to-end runtime statistics are summarized in Table 10. 4.8. Generalization Evaluation on the Zhanjiang Bay No.1 Dataset An additional FLS dataset collected from the Zhanjiang Bay No.1 aquaculture platform is used to evaluate field generalization in a practical marine aquaculture environment. The dataset was constructed from long-duration sonar video streams and differs from the public UATD benchmark in sensing conditions, target distribution, background structure, and deployment setting. The aquaculture environment and the edge computing facility are shown in Figure 11. The sonar data were acquired using a Hanjie C750D forward-looking sonar (Shanghai Hanjie Technology Development Co., Ltd., Shanghai, China). operating in high-frequency mode with a sensing range of 20 m. Under this configuration, fish targets usually occupy a small region in the sonar image because the imaging range is large relative to the physical size of individual fish. This makes the dataset challenging for small-target detection. Fish in the Zhanjiang Bay No.1 platform also tend to stay close to the bottom region, producing bottom-concentrated target distributions. Cage structures, sediment background, acoustic reverberation, and clutter-like echoes further increase the difficulty of reliable detection. The data were collected through an NVR-based continuous video recording pipeline. The FLS stream was transmitted through the aquaculture platform monitoring network to a network video recorder (NVR), where the incoming sonar stream was encoded, timestamped, and stored as long-duration video files. Each source video typically lasted several hours, preserving the temporal continuity of underwater sensing and the natural variation in fish distribution, platform background, and acoustic interference. Compared with manually selected still images, this recording process better reflects the data encountered in long-term aquaculture monitoring. After data collection, the stored NVR videos were decoded frame by frame to obtain individual sonar images. Invalid frames, including frames with severe signal loss, transmission artifacts, or incomplete imaging regions, were removed during data screening. The final dataset contains approximately 20,000 valid sonar images. The dataset was divided into training, validation, and test subsets at a ratio of 6:2:2. Since the samples were extracted from continuous long-duration videos, the split was performed with temporal continuity in mind. Consecutive frames from the same temporal segment were assigned to the same subset rather than being randomly distributed across the training, validation, and test subsets. This protocol reduces the risk of data leakage caused by highly adjacent frames and makes the test set more suitable for evaluating model generalization under long-term monitoring conditions. The deployment setting was also considered in this evaluation. As shown in Figure 11b, the proposed algorithm has been deployed on the edge computing box of the Zhanjiang Bay No.1 platform. During operation, the edge device receives the sonar video stream, performs target detection, and pushes the processed video stream for remote monitoring. This setting matches the goal of this work: a lightweight FLS detection framework that can operate under complex acoustic conditions and embedded computing constraints. The proposed method is compared with four representative recent detectors on the Zhanjiang Bay No.1 dataset, including RF-DETR, Salience-DETR, FFCA-YOLO, and Hyper-YOLO. As reported in Table 11, the proposed method achieves 0.3940 mAP@50:95 and 0.7861 mAP@50, which are the highest values among the compared methods. The margin over Hyper-YOLO is limited, with gains of 0.0019 in mAP@50:95 and 0.0031 in mAP@50. Therefore, the result is better viewed as evidence of competitive field generalization rather than a substantial performance gap. Because the evaluation is conducted on an independently constructed field dataset containing approximately 20,000 sonar images from long-duration aquaculture monitoring videos, the result indicates that the proposed framework is not only fitted to the UATD benchmark but also remains effective under a different FLS data distribution. Figure 12 presents qualitative detection results on representative samples from the Zhanjiang Bay No.1 dataset. In comparison with the representative detectors, the proposed method detects more fish targets with fewer missed detections, especially in scenes characterized by bottom-concentrated fish distributions, weak acoustic responses, and cluttered aquaculture backgrounds. This indicates that the proposed framework improves target recall while maintaining more stable localization behavior under challenging field conditions. The qualitative results are consistent with the quantitative comparison reported in Table 11, providing further evidence of the effectiveness and practical applicability of the proposed method in real aquaculture scenarios. 5. Conclusions This paper presented a lightweight forward-looking sonar (FLS) sensing framework for embedded target detection in resource-constrained underwater systems. The framework integrates an FPN-Mix backbone with the Conv-Mix module for contextual representation, a target-aware dynamic weighting (TADW) loss for difficult acoustic samples, and a multi-level knowledge distillation strategy for transferring feature-level and prediction-level knowledge from a stronger teacher model to the lightweight student detector. Experiments on the public UATD benchmark demonstrate that the proposed method achieves a favorable accuracy–efficiency trade-off on both official test subsets. The model obtains 95.5% mAP@50 on UATD-Test-1 and 97.5% mAP@50 on UATD-Test-2, while requiring only 2.83M parameters and 6.68 GFLOPs. After ONNX export and TensorRT FP16 acceleration, the deployed model achieves 72.23 FPS in end-to-end inference on an NVIDIA Jetson Orin NX platform, supporting its feasibility for real-time embedded FLS deployment. Additional evaluation on the Zhanjiang Bay No.1 field dataset further indicates that the framework retains competitive generalization ability under a practical aquaculture sonar scenario. Overall, the proposed framework provides a compact and deployable solution for FLS target detection under resource-constrained conditions. Nevertheless, although both public benchmark data and real-world platform data are evaluated, the current validation is still limited to specific sonar devices, operating ranges, and application scenarios. Future work will further investigate robustness under more diverse sonar configurations, seabed conditions, water environments, and long-term dynamic field deployments, and will extend the framework toward fish-group monitoring and continuous aquaculture sonar perception.