In traffic scenes, pedestrian target detection faces significant issues of misdetection and omission due to factors such as crowd density and obstacle occlusion. To address these challenges and enhance detection accuracy, we propose an improved CCW-YOLO algorithm. The algorithm first introduces a lightweight convolutional layer using GhostConv and incorporates an enhanced C2f module to improve the network’s detection performance. Additionally, it integrates the Coordinate Attention module to better capture key points of the targets. Next, the bounding box loss function CIoU loss at the output of YOLOv5 is replaced with WiseIoU loss to enhance adaptability to various detection scenarios, thereby further improving accuracy. Finally, we develop a pedestrian count detection system using PyQt5 to enhance human–computer interaction. Experimental results on the INRIA public dataset showed that our algorithm achieved a detection accuracy of 98.4%, representing a 10.1% improvement over the original YOLOv5s algorithm. This advancement significantly enhances the detection of small objects in images and effectively addresses misdetection and omission issues in complex environments. These findings have important practical implications for ensuring traffic safety and optimizing traffic flow.
To address the challenges of synthetic aperture radar (SAR) ship detection in complex port environments, including strong background clutter, large-scale variations, and frequent missed detections of small vessels, this paper proposes a lightweight attention-guided multi-scale fusion detector, termed LAMFDet, based on YOLOv8. The proposed framework enhances the baseline architecture from three complementary perspectives: multi-scale feature enhancement, lightweight adaptive feature extraction, and efficient feature reconstruction. Specifically, a multi-scale feature enhancement module (SPPFSENetV2) integrating spatial pyramid pooling with channel attention is designed to strengthen scale-aware contextual representations. A lightweight adaptive extraction (LAE) module is introduced to improve small-target perception while maintaining computational efficiency. Furthermore, an efficient upsampling convolution block (EUCB) is incorporated to preserve structural details and enhance feature fusion quality across feature levels. Extensive experiments on two public SAR ship datasets, HRSID and SSDD, demonstrate the effectiveness and generalization capability of LAMFDet. On HRSID, LAMFDet achieves 94.79% Precision and 71.53% mAP@0.5:0.95, surpassing YOLOv8n by 2.81% and 14.92%, respectively. On SSDD, it further attains 99.65% Precision and 82.05% mAP@0.5:0.95, indicating strong robustness under diverse SAR imaging conditions. These results confirm that LAMFDet effectively improves detection completeness and localization accuracy for small and densely distributed vessels while maintaining favorable efficiency, highlighting its practical potential for real-time port monitoring and maritime surveillance.
Synthetic aperture radar (SAR) ship detection in complex maritime environments remains challenging due to severe background clutter, large-scale variations, and the frequent omission of small and densely distributed vessels. To address these challenges, this paper proposes an attention-guided multi-scale feature learning framework for robust SAR ship detection. The proposed approach focuses on enhancing scale-aware feature representation, adaptive feature refinement, and cross-level feature reconstruction within a unified learning paradigm. Specifically, a multi-scale contextual modeling mechanism is introduced to capture scale-aware dependencies and improve target–background separability in cluttered scenes. An adaptive feature refinement strategy is further developed to enhance the representation of small and weak targets by strengthening shallow feature responses. In addition, an efficient feature reconstruction scheme is designed to improve cross-level feature integration during decoding, thereby enhancing localization accuracy under speckle-contaminated SAR imagery. Extensive experiments on public datasets demonstrate the effectiveness of the proposed method. On the HRSID dataset, the method achieves 94.30% mAP@0.5 and 71.53% mAP@0.5:0.95, showing clear improvements over representative detectors. On the SSDD dataset, it reaches 99.50% mAP@0.5, indicating strong generalization under different imaging conditions. Meanwhile, the proposed framework maintains high computational efficiency with over 100 FPS and low model complexity. Ablation studies further validate the effectiveness of each component and their complementary contributions. The proposed framework provides a robust and efficient solution for SAR-based maritime monitoring and can be extended to other small-object detection tasks in complex environments.