A Method for Inland Vessel Object Detection Based on PEW-YOLOv8
-
摘要: 内河船舶目标检测中,众多检测对象属于小目标范畴,其在图像中的像素占比有限,且由于水域环境干扰等问题,导致检测精度不足,误检、漏检现象频发,为此研究了PEW-YOLOv8(YOLOv8+P2检测层+EfficientNetV2+WIoUinner)目标检测算法。新增160×160分辨率的P2浅层次小目标检测层,通过32维特征空间重构实现多尺度特征的动态权重分配,设计高低层特征的双向交互机制,增强对小型船舶目标的特征提取能力;为应对多层次目标检测头导致的模型训练参数量增加的难题,采用改进的EfficientNetV2高效架构优化策略,引入Stems模块采用GELU激活函数避免梯度爆炸和训练不稳定,训练阶段保留扩展4倍的通道数,简化卷积结构显著加速训练过程,同时保证模型训练质量;设计动态非单调聚焦机制的WIoUinner损失函数,构建具有一定尺度差异的辅助预测框,加速边界框收敛速度,使模型在预测框与真实框重合良好时更注重中心点之间的距离,减轻几何度量的惩罚,从而提升模型的泛化能力。通过融合公开的Seaships数据集与自建数据集形成的数据集进行算法与实验验证,结果表明:同YOLOv10相比,PEW-YOLOv8平均检测精度达到94.8%,提升了3%,计算复杂度显著降低,FLOPs优化至3.7 G,降幅达43.1%,展现了在内河船舶目标检测精度和效率方面的优势;热力图分析进一步凸显了模型能有效聚焦内河船舶特征,验证了算法在复杂内河场景下的检测鲁棒性。Abstract: In inland vessel object detection, many targets fall into the category of small objects, occupying limited pixels in images. Additionally, interference from complex environments often leads to insufficient detection accuracy, frequent false positives, and missed detections. To address these challenges, this study proposes an object detection algorithm based on PEW-YOLOv8, which integrates YOLOv8 with a P2 detection layer, EfficientNetV2, and the WIoUinner loss function. A new P2 shallow detection layer with a resolution of 160×160 is introduced to enhance small target detection. A 32-dimensional feature space reconstruction is employed to achieve dynamic weight allocation across multi-scale features. Furthermore, a bidirectional interaction mechanism between high- and low-level features is designed to improve feature extraction for small vessel objects. To address the increased parameter burden caused by multi-level detection heads, an improved EfficientNetV2 architecture is adopted, which incor-porates a GELU-activated Stem module to mitigate gradient explosion and unstable training. During training, the channel count is expanded fourfold while simplifying the convolutional structure, significantly accelerating the training process without sacrificing model quality. Besides, the WIoUinner loss function with a dynamic non-monotonic focusing mechanism is designed, which introduces auxiliary prediction boxes with varying scales to accelerate the convergence of bounding boxes. When the predicted and ground truth boxes are closed aligned, the model places greater emphasis on the distance between center points, reducing the penalty from geometric metrics and improving generalization capability. The algorithm is validated using a dataset that combines the publicly available Seaships dataset with a self-constructed inland vessel dataset. Experimental results demonstrate that compared to YOLOv10, PEW-YOLOv8 achieves an average detection accuracy of 94.8%, a 3% improvement. Computational complexity is significantly reduced, with FLOPs optimized to 3.7 G, representing a 43.1% reduction, which demonstrates the model's advantages in both accuracy and efficiency for inland vessel detection tasks. Heatmap analysis further confirms the model's ability to effectively focus on inland vessel features, demonstrating robust detection performance in complex inland waterway scenarios.
-
Key words:
- intelligent ships /
- inland vessels /
- PEW-YOLO /
- object detection /
- WIoU
-
表 1 消融实验结果
Table 1. Results of ablation experiment
网络模型 mAP0.5/% mAP0.5:0.95/% FLOPs/G 参数量/M YOLOv8 90.8 76 8.7 3.0 YOLOv8+P2 93.7 79 17.2 3.2 YOLOv8+EfficientNetV2 92.2 77 2.6 2.4 YOLOv8+P2+EfficientNetV 93.8 79 3.7 2.2 YOLOv8+P2+EfficientNetV+WIoUinner 94.8 81 3.7 2.2 表 2 目标检测模型性能对比
Table 2. Performance comparison of object detection models
网络模型 mAP0.5/% mAP0.5:0.95/% FLOPs/G 参数量/M YOLOv5n 89.5 73 7.6 5.8 YOLO v6 91.2 74 8.1 6.1 YOLOv7-tiny 90 75 10.1 7 YOLOv8n 90.8 76 8.3 6.2 YOLOv10n 91.8 78 6.5 2.3 MBC-YOLO 92.1 80 9.0 2.6 PEW-YOLOv8 94.8 81 3.7 2.2 -
[1] 马勇, 王雯琦, 严新平. 面向新一代航运系统的船舶智能航行技术研究进展[J]. 中国科学: 技术科学, 2023, 53(11): 1795-1806.MA Y, WANG W Q, YAN X P. Research progress of vessel intelligent navigation technology for the new generation of waterborne transportation system[J]. Scientia Sinica Technologica, 2023, 53(11): 1795-1806. (in Chinese) [2] GUO J D, FENG H, XU H X, et al. D3-Net: integrated multi-task convolutional neural network for water surface deblurring, dehazing and object detection[J]. Engineering Applications of Artificial Intelligence, 2023, 117: 105558. doi: 10.1016/j.engappai.2022.105558 [3] 马浩为, 张笛, 李玉立, 等. 基于改进YOLOv5的雾霾环境下船舶红外图像检测算法[J]. 交通信息与安全, 2023, 41 (1): 95-104.MA H W, ZHANG D, LI Y L, et al. A ship detection algorithm for infrared images under hazy environment based on an improved YOLOv5 algorithm[J]. Journal of Transport Information and Safety, 2023, 41(1): 95-104. (in Chinese) [4] CHEN X Q, WEI C X, XIN Z G, et al. Ship detection under low-visibility weather interference via an ensemble generative adversarial network[J]. Journal of Marine Science and Engineering, 2023, 11(11): 2065. doi: 10.3390/jmse11112065 [5] 赵永强, 饶元, 董世鹏, 等. 深度学习目标检测方法综述[J]. 中国图象图形学报, 2020, 25(4): 629-654.ZHAO Y Q, RAO Y, DONG S P, et al. Survey on deep learning object detection[J]. Journal of Image and Graphics, 2020, 25 (4): 629-654. (in Chinese) [6] REDMON J, DIVVALA S, GIRSHICK R, et al. You only look once: unified, real-time object detection[C]. The IEEE Conference On Computer Vision and Pattern Recognition, Seattle, American: IEEE, 2016. [7] ZHAO, Q J, TAO S, WANG Y T, et al. M2det: a single-shot object detector based on multi-level feature pyramid network[C]. 9th AAAI Symposium on Educational Advances in Artificial Intelligence, Honolulu, American: AAAI. 2019. [8] CHENG M, BAI J N, LI L Y, et al. Tiny-Retina Net: a onestage detector for real-time object detection[C]. 11th International Conference on Graphics and Image Processing, Hangzhou, China: SPIE. 2020. [9] ADARSH P, RATHI P, KUMAR M, et al. YOLO v3-Tiny: object detection and recognition using one stage improved model[C]. The 6th International Conference on Advanced Computing and Communication Systems, Coimbatore, India: ICACCS. 2020. [10] 林凯瀚, 赵慧民, 吕巨建, 等. 基于Mask R-CNN的人脸检测与分割方法[J]. 计算机工程, 2020, 46(6): 274-280.LIN K H, ZHAO H M, LV J J, et al. Face detection and segmentation method based on Mask R-CNN[J]. Computer Engineering, 2020, 46(6): 274-280. (in Chinese) [11] LI Y H, CHEN Y T, WANG N Y, et al. Scale-aware trident networks for object detection[C]. The IEEE/CVF International Conference on Computer Vision, Seoul, Korea: IEEE. 2019. [12] SHEN L Y, LANG B H, SONG Z X. DS-YOLOv8-based object detection method for remote sensing images[J]. IEEE Access, 2023, 11: 125122-125137. doi: 10.1109/ACCESS.2023.3330844 [13] CHEN Z, LIU C, FILARETOV V F, et al. Multi-scale ship detection algorithm based on YOLOv7 for complex scene SAR images[J]. Remote Sensing, 2023, 15(8): 2071. doi: 10.3390/rs15082071 [14] JI S J, LING Q H, HAN F. An improved algorithm for small object detection based on YOLO v4 and multi-scale contextual information[J]. Computers and Electrical Engineering, 2023, 105: 108490. doi: 10.1016/j.compeleceng.2022.108490 [15] JIANG X, CAI J, WANG B. YOLOSeaShip: a lightweight model for real-time ship detection[J]. European Journal of Remote Sensing, 2024, 57(1): 2307613. doi: 10.1080/22797254.2024.2307613 [16] LIU K, PENG L, TANG S. Underwater object detection using TC-YOLO with attention mechanisms[J]. Sensors, 2023, 23(5): 2567. doi: 10.3390/s23052567 [17] ZHANG L, LIU Y, ZHAO W, et al. Frequency-adaptive learning for SAR ship detection in clutter scenes[J]. IEEE Transactions on Geoscience and Remote Sensing, 2023, 61: 1-14. [18] LI J F, CHEN M X, HOU S Y, et al. An improved S2A-Net algorithm for ship object detection in optical remote sensing images[J]. Remote Sensing, 2023, 15(18): 4559. doi: 10.3390/rs15184559 [19] 高新波, 莫梦竟成, 汪海涛, 等. 小目标检测研究进展[J]. 数据采集与处理, 2021, 36(3): 391-417.GAO X B, MO M J C, WANG H T, et al. Recent advances in small object detection[J]. Journal of Data Acquisition and Processing, 2021, 36(3): 391-417. (in Chinese) [20] YI H, LIU B, ZHAO B, et al. Small object detection algorithm based on improved YOLOv8 for remote sensing[J]. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 2023, 17: 1734-1747. [21] WANG F, WANG H, QIN Z, et al. UAV target detection algorithm based on improved YOLOv8[J]. IEEE Access, 2023, 11: 116534-116544. doi: 10.1109/ACCESS.2023.3325677 [22] LIU C, WANG K G, LI Q, et al. Powerful-IoU: more straightforward and faster bounding box regression loss with a nonmonotonic focusing mechanism[J]. Neural Networks, 2024, 170: 276-284. doi: 10.1016/j.neunet.2023.11.041 [23] 王海群, 魏培旭, 解浩龙, 等. 基于改进YOLOv8的红外船舶检测[J]. 电光与控制, 2025, 32(1): 61-67.WANG H Q, WEI P X, XIE H L, et al. Infrared ship detection based on improved YOLOv8[J]. Electronics Optics & Control, 2025, 32(1): 61-67. (in Chinese) -