A Ship Detection Model Based on Dynamic Convolution and an Adaptive Fusion Network for Complex Maritime Conditions
Abstract
:1. Introduction
- We propose an improved real-time ship detection model based on YOLOv7 (YOLO-Vessel), specifically designed to address ship detection challenges in the complex sea conditions mentioned above.
- A backbone network called Efficient Layer Aggregation Networks and Omni-Dimensional Dynamic Convolution (ELAN-ODConv) with strong feature extraction capability is designed to reduce false and missed detections. Then, a network termed Efficient Layer Aggregation Networks Head and Space-to-depth and Convolution (ELANH-SPDC) is introduced at the head to achieve fine-grained detection and identification of ships. In addition, a new prediction network structure named ASFFPredict is designed, which adaptively learns each feature layer’s weights and can fuse each scale’s feature information more efficiently.
- To adapt ship detection under different adverse weather conditions, this paper proposes a ship dataset under adverse weather conditions, which is then artificially synthesized using physical haze, rain, snow, and low light algorithms, and experiments are conducted in real scenarios to verify the detection accuracy and operation efficiency of this model.
2. Related Work
3. Proposed Detection Framework
3.1. Backbone Network
3.2. Head Network
3.3. Prediction Network
4. Experiments
4.1. Dataset Preparation and Data Augmentation
- Rain patterns with different tilt angles of −45, 0, and 45 degrees are randomly added to the preprocessed image to synthesize the rain ship image. The expressions of synthetic rain are as follows:
- The haze can significantly degrade image quality during detection. To simulate ship scenes in such conditions, we employ an atmospheric scattering model to synthesize hazy sky images. The formula for creating artificial haze is as follows:
- As depicted in Figure 7c, the snowflake texture is randomly added to the original image by adjusting the snow amount value to synthesize a ship image on a snowy day. The expression of the synthesized snowflake is as follows:
- Dawn weather tends to cause low brightness, low contrast, and detail loss in the image. The ship image under dawn weather is synthesized using the retinex algorithm, as shown in Figure 7d, where the attenuation coefficient changes the image brightness value. The expression of the synthesized dawn image is as follows:
4.2. Experimental Environment
4.3. Experimental Setup
4.4. Evaluation Index
4.5. Experimental Results and Analysis
4.5.1. Impact of SPDC Integration on Network Performance
4.5.2. Results of Replacing Standard Convolution with ODConv
4.5.3. Ablation Experiment
- YOLO-Vessel is the best performer in the YOLO series regarding mAP. Compared with the original YOLOv7, its mAP performance improved by 2.3%. It can be observed that the original YOLOv7 has the lowest mAP value and unsatisfactory detection results. Compared with the original YOLOv7 model, all three improved network models have improved mAP. Among them, the overall mAP values for ship detection increased by 1.6%, 1.7%, and 2.3%, respectively. The analysis shows that YOLO-ES demonstrates higher accuracy in recognizing cruise ships. Additionally, the improved models offer better recognition performance for small to medium-sized sailboats, yachts, and fishing boats. Compared to YOLOv7, YOLO-ES exhibits improved recognition of fishing boats, with an increase in AP value by 0.9%, indicating that the ELANH-SPDC structure can enhance the feature information for low-resolution targets during feature fusion, demonstrating exemplary performance in detecting low-resolution targets in complex backgrounds. Continuing to introduce the ODConv structure into the model, YOLO-OS is more advantageous in fishing boat detection accuracy, with AP values improved by 1.0% compared to YOLO-ES. This demonstrates that combining the ELAN-ODConv and ELANH-SPDC structures enhances the model’s performance in detecting small targets. YOLO-Vessel surpasses YOLOv7, YOLO-ES, and YOLO-OS in detecting fishing boats, highlighting the ASFF network’s effectiveness in improving detection performance for the IDetect head. In addition, YOLO-Vessel also demonstrates an advantage in detecting large-scale vessels such as bulk carriers and container ships. Its AP values for these categories are improved by 3.7% and 2.7%, respectively, compared to YOLOv7. This indicates that the combination of ELANH-SPDC structure, ELAN-ODConv structure, and ASFFPredict structure can fully learn more visual features of ships and thus improve the model’s performance of ship detection in adverse weather, especially detecting critical hull parts and reducing the number of false alarms. The final YOLO-Vessel has good performance for overall ship detection and can significantly improve the accuracy of ship detection under adverse weather conditions at sea.
- In terms of inference speed, the YOLO-ES model achieves the fastest detection speed. However, with the introduction of the ELAN-ODConv module, the network’s inference speed slightly decreases, but the model’s accuracy improves. Therefore, the YOLO-Vessel model trades off accuracy and inference speed, compensating for the slight reduction in speed to enhance detection accuracy.
- Regarding model computation, compared to the original model, YOLO-ES, YOLO-OS, and YOLO-Vessel reduced GFLOPS by 8.4, 10.7, and 2.4, respectively. The significant reduction in computational demands alleviates the computational burden on the machine. Furthermore, the YOLO-Vessel model incorporates adaptively spatial feature fusion and dynamic convolution techniques for ship detection, enhancing detection performance. It achieves the highest F1 score in ship image detection, surpassing the original model by 3%.
4.5.4. Comparison with Other Algorithms
4.5.5. Experiments on Realistic Ship Detection
- As shown in the rain of Figure 17, YOLOv7 mistakenly identifies the house building background as a ship in a rainy environment; in the same case, as shown in the snow in Figure 17, YOLOv7 incorrectly detects street light as some other vessels in snowy weather, while YOLO-Vessel can correctly detect the ship category and location with 94% confidence, which solves the complex background interference problem.
- As shown in the haze of Figure 17, under hazy weather conditions, YOLOv7 successfully detected large bulk carriers and cruise ships near the shore but failed to detect small target vessels in the distance. In contrast, YOLO-Vessel significantly improved recognition of small ships in haze weather, effectively reducing the probability of missed detections.
- As shown in the dawn of Figure 17, in the dawn environment, YOLOv7 only detects one ship, and the YOLO-Vessel model avoids missed detection and detects all the cruise ships and bulk carrier in the picture.
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Xu, Q.; Li, Y.; Zhang, M.; Li, W. COCO-Net: A Dual-Supervised Network with Unified ROI-Loss for Low-Resolution Ship Detection from Optical Satellite Image Sequences. IEEE Trans. Geosci. Remote Sens. 2022, 60, 5629115. [Google Scholar] [CrossRef]
- Liu, R.W.; Yuan, W.; Chen, X.; Lu, Y. An enhanced CNN-enabled learning method for promoting ship detection in maritime surveillance system. Ocean. Eng. 2021, 235, 109435. [Google Scholar] [CrossRef]
- Feng, J.; Li, B.; Tian, L.; Dong, C. Rapid ship detection method on movable platform based on discriminative multi-size gradient features and multi-branch support vector machine. IEEE Trans. Intell. Transp. Syst. 2020, 23, 1357–1367. [Google Scholar] [CrossRef]
- Shi, Z.; Yu, X.; Jiang, Z.; Li, B. Ship detection in high-resolution optical imagery based on anomaly detector and local shape feature. IEEE Trans. Geosci. Remote Sens. 2013, 52, 4511–4523. [Google Scholar]
- Zhu, C.; Zhou, H.; Wang, R.; Guo, J. A novel hierarchical method of ship detection from spaceborne optical image based on shape and texture features. IEEE Trans. Geosci. Remote Sens. 2010, 48, 3446–3456. [Google Scholar] [CrossRef]
- Zhu, Q.; Zhang, Y.; Li, Z.; Yan, X.; Guan, Q.; Zhong, Y.; Zhang, L.; Li, D. Oil spill contextual and boundary-supervised detection network based on marine SAR images. IEEE Trans. Geosci. Remote Sens. 2021, 60, 5213910. [Google Scholar] [CrossRef]
- Chen, M.; Sun, J.; Aida, K.; Takefusa, A. Weather-aware object detection method for maritime surveillance systems. Future Gener. Comput. Syst. 2024, 151, 111–123. [Google Scholar] [CrossRef]
- Chen, X.; Wei, C.; Xin, Z.; Zhao, J.; Xian, J. Ship Detection under Low-Visibility Weather Interference via an Ensemble Generative Adversarial Network. J. Mar. Sci. Eng. 2023, 11, 2065. [Google Scholar] [CrossRef]
- Song, R.; Li, T.; Li, T. Ship detection in haze and low-light remote sensing images via colour balance and DCNN. Appl. Ocean Res. 2023, 139, 103702. [Google Scholar] [CrossRef]
- Liu, T.; Zhang, Z.; Lei, Z.; Huo, Y.; Wang, S.; Zhao, J.; Zhang, J.; Jin, X.; Zhang, X. An approach to ship target detection based on combined optimization model of dehazing and detection. Eng. Appl. Artif. Intell. 2024, 127, 107332. [Google Scholar] [CrossRef]
- Escorcia-Gutierrez, J.; Gamarra, M.; Beleño, K.; Soto, C.; Mansour, R.F. Intelligent deep learning-enabled autonomous small ship detection and classification model. Comput. Electr. Eng. 2022, 100, 107871. [Google Scholar] [CrossRef]
- Yu, M.; Han, S.; Wang, T.; Wang, H. An approach to accurate ship image recognition in a complex maritime transportation environment. J. Mar. Sci. Eng. 2022, 10, 1903. [Google Scholar] [CrossRef]
- Li, M.; Lin, S.; Huang, X. SAR Ship Detection Based on Enhanced Attention Mechanism. In Proceedings of the 2021 2nd International Conference on Artificial Intelligence and Computer Engineering (ICAICE), Hangzhou, China, 5–7 November 2021; pp. 759–762. [Google Scholar]
- Guo, Y.; Lu, Y.; Liu, R.W. Lightweight deep network-enabled real-time low-visibility enhancement for promoting vessel detection in maritime video surveillance. J. Navig. 2022, 75, 230–250. [Google Scholar] [CrossRef]
- Guo, J.; Feng, H.; Xu, H.; Yu, W.; Shuzhi, G.S. D3-Net: Integrated multi-task convolutional neural network for water surface deblurring, dehazing and object detection. Eng. Appl. Artif. Intell. 2023, 117, 105558. [Google Scholar] [CrossRef]
- Yao, Z.; Chen, X.; Shi, C. Research on Surface Environment Perception via Camera-LiDAR Sensor Fusion. In Proceedings of the 2023 6th International Conference on Artificial Intelligence and Big Data (ICAIBD), Chengdu, China, 26–29 May 2023; pp. 895–899. [Google Scholar]
- Zhao, H.; Zhang, H.; Zhao, Y. Yolov7-sea: Object detection of maritime uav images based on improved yolov7. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, Waikoloa, HI, USA, 3–7 January 2023; pp. 233–238. [Google Scholar]
- Li, C.; Zhou, A.; Yao, A. Omni-dimensional dynamic convolution. arXiv 2022, arXiv:2209.07947. [Google Scholar]
- Cheng, S.; Zhu, Y.; Wu, S. Deep learning based efficient ship detection from drone-captured images for maritime surveillance. Ocean. Eng. 2023, 285, 115440. [Google Scholar] [CrossRef]
- Chen, Z.; Liu, C.; Filaretov, V.; Yukhimets, D. Multi-Scale Ship Detection Algorithm Based on YOLOv7 for Complex Scene SAR Images. Remote Sens. 2023, 15, 2071. [Google Scholar] [CrossRef]
- Sunkara, R.; Luo, T. No more strided convolutions or pooling: A new CNN building block for low-resolution images and small objects. In Proceedings of the Joint European Conference on Machine Learning and Knowledge Discovery in Databases, Grenoble, France, 19–23 September 2022; pp. 443–459. [Google Scholar]
- Ma, M.; Pang, H. SP-YOLOv8s: An Improved YOLOv8s Model for Remote Sensing Image Tiny Object Detection. Appl. Sci. 2023, 13, 8161. [Google Scholar] [CrossRef]
- Zhang, L.; Du, X.; Zhang, R.; Zhang, J. A Lightweight Detection Algorithm for Unmanned Surface Vehicles Based on Multi-Scale Feature Fusion. J. Mar. Sci. Eng. 2023, 11, 1392. [Google Scholar] [CrossRef]
- Liu, S.; Huang, D.; Wang, Y. Learning spatial fusion for single-shot object detection. arXiv 2019, arXiv:1911.09516. [Google Scholar]
- Zhou, Z.; Chen, J.; Huang, Z.; Lv, J.; Song, J.; Luo, H.; Wu, B.; Li, Y.; Diniz, P.S. HRLE-SARDet: A Lightweight SAR Target Detection Algorithm Based on Hybrid Representation Learning Enhancement. IEEE Trans. Geosci. Remote Sens. 2023, 61, 5203922. [Google Scholar] [CrossRef]
- Guo, Y.; Chen, S.; Zhan, R.; Wang, W.; Zhang, J. LMSD-YOLO: A Lightweight YOLO Algorithm for Multi-Scale SAR Ship Detection. Remote Sens. 2022, 14, 4801. [Google Scholar] [CrossRef]
- Wang, C.-Y.; Bochkovskiy, A.; Liao, H.-Y.M. YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, Canada, 17–24 June 2023; pp. 7464–7475. [Google Scholar]
- Wang, C.-Y.; Liao, H.-Y.M.; Yeh, I.-H. Designing Network Design Strategies through Gradient Path Analysis. arXiv 2022, arXiv:2211.04800. [Google Scholar]
- Wang, C.-Y.; Liao, H.-Y.M.; Wu, Y.-H.; Chen, P.-Y.; Hsieh, J.-W.; Yeh, I.-H. CSPNet: A new backbone that can enhance learning capability of CNN. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition workshops, Seattle, WA, USA, 14–19 June 2020; pp. 390–391. [Google Scholar]
- Shao, Z.; Wu, W.; Wang, Z.; Du, W.; Li, C. Seaships: A large-scale precisely annotated dataset for ship detection. IEEE Trans. Multimed. 2018, 20, 2593–2604. [Google Scholar] [CrossRef]
- Fei, B.; Lyu, Z.; Pan, L.; Zhang, J.; Yang, W.; Luo, T.; Zhang, B.; Dai, B. Generative Diffusion Prior for Unified Image Restoration and Enhancement. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, Canada, 17–24 June 2023; pp. 9935–9946. [Google Scholar]
Model | Position | mAP (%) | F1 (%) | GFLOPS | R (%) | Infer (ms) |
---|---|---|---|---|---|---|
YOLOv7 (baseline) | - | 76.0 | 75 | 103.2 | 69.5 | 9.0 |
YOLOv7-SPDC-1 | p_out3 | 77.4 | 76 | 97.7 | 72.2 | 6.9 |
YOLOv7-SPDC-2 | p_out4 | 75.8 | 76 | 97.7 | 68.7 | 6.6 |
YOLOv7-SPDC-3 | p_out5 | 77.6 | 76 | 94.8 | 70.9 | 7.0 |
Model | Position | mAP(%) | F1(%) | GFLOPS | R(%) | Infer(ms) |
---|---|---|---|---|---|---|
YOLOv7 (baseline) | - | 76.0 | 75 | 103.2 | 69.5 | 9.0 |
YOLOv7-ODConv-a | a | 77.1 | 76 | 100.9 | 73.5 | 9.5 |
YOLOv7-ODConv-b | b | 75.9 | 75 | 100.9 | 70.0 | 8.1 |
YOLOv7-ODConv-c | c | 77.6 | 77 | 100.9 | 69.7 | 9.3 |
YOLOv7-ODConv-d | d | 74.7 | 74 | 99.3 | 69.5 | 8.5 |
Model | SPPFCSPC | ELANH-SPDC | ELAN-ODConv | ASFFPredict |
---|---|---|---|---|
YOLO-ES | √ | √ | × | × |
YOLO-OS | √ | √ | √ | × |
YOLO-Vessel | √ | √ | √ | √ |
Model | AP (%) | mAP (%) | F1 (%) | GFLOPS | Infer (ms) | |||||
---|---|---|---|---|---|---|---|---|---|---|
Sailboat | Yacht | Bulk Carrier | Container Ship | Fishing Boat | Cruises | |||||
YOLOv7 | 73.7 | 64.8 | 72.5 | 85.4 | 66.7 | 92.8 | 76 | 75 | 103.2 | 9.0 |
YOLO-ES | 75.0 | 63.7 | 73.9 | 92.0 | 67.6 | 93.7 | 77.6 | 76 | 94.8 | 7.0 |
YOLO-OS | 75.2 | 67.9 | 75.4 | 87.7 | 68.6 | 91.2 | 77.7 | 77 | 92.5 | 7.8 |
YOLO-Vessel | 77.6 | 65.8 | 76.2 | 88.1 | 69.6 | 92.7 | 78.3 | 78 | 100.8 | 8.0 |
Model | AP (%) | mAP (%) | F1 (%) | GFLOPS | R | Infer (ms) | |||||
---|---|---|---|---|---|---|---|---|---|---|---|
Sailboat | Yacht | Bulk Carrier | Container Ship | Fishing Boat | Cruises | ||||||
Faster R-CNN | 66.2 | 53.1 | 65.8 | 80.0 | 51.2 | 83.9 | 66.7 | 55 | - | 71.7 | 16.9 |
Fast R-CNN | 49.7 | 47.8 | 57.4 | 56.8 | 30.4 | 88.6 | 55.1 | - | - | - | - |
Mask R-CNN | 57.0 | 50.5 | 62.5 | 80.5 | 39.1 | 89.9 | 63.3 | - | - | - | - |
Cascade R-CNN | 57.1 | 55.2 | 70.5 | 78.3 | 40.3 | 90.9 | 65.4 | - | - | - | - |
SSD | 59.7 | 52.5 | 65.6 | 84.8 | 50.5 | 89.8 | 67.1 | 69 | - | 57.9 | 8.1 |
YOLOv3 | 72.2 | 55.6 | 64.6 | 85.4 | 51.6 | 93.7 | 70.5 | 68 | - | 56.6 | 10.6 |
YOLOv4 | 64.3 | 45.4 | 32.6 | 48.8 | 51.2 | 78.7 | 53.5 | 45 | - | 35.3 | 12.7 |
YOLOv5s | 71.2 | 61.7 | 64.0 | 82.0 | 60.7 | 91.6 | 71.9 | 71 | 16.3 | 67.2 | 10.8 |
YOLOv5m | 72.0 | 64.3 | 73.3 | 86.8 | 61.1 | 91.6 | 74.9 | 75 | 50.3 | 72.8 | 11.6 |
YOLOv5l | 71.9 | 64.3 | 70.6 | 87.0 | 65.5 | 91.8 | 75.2 | 75 | 114.0 | 68.7 | 13.0 |
YOLOv5x | 73.4 | 59.1 | 71.8 | 87.4 | 64.0 | 91.9 | 74.6 | 75 | 217.0 | 70.8 | 16.3 |
YOLOv7-tiny | 70.0 | 57.1 | 60.9 | 83.2 | 56.4 | 89.7 | 69.5 | 68 | 13.1 | 65.8 | 7.9 |
YOLOv7 | 73.7 | 64.8 | 72.5 | 85.4 | 66.7 | 92.8 | 76.0 | 75 | 103.2 | 69.5 | 9.0 |
YOLOv7x | 73.8 | 66.8 | 76.7 | 88.0 | 67.4 | 93.0 | 77.6 | 75 | 188.1 | 69.9 | 13.0 |
YOLOv8n | 71.1 | 53.3 | 66.3 | 84.9 | 57.6 | 91.5 | 70.8 | 70 | 8.1 | 63.5 | 6.6 |
YOLOv8s | 73.6 | 60.7 | 63.8 | 84.3 | 58.2 | 90.7 | 71.9 | 70 | 28.4 | 65.2 | 8.8 |
YOLOv8m | 75.5 | 56.2 | 68.8 | 85.7 | 60.7 | 90.3 | 72.9 | 71 | 78.7 | 66.1 | 9.8 |
YOLOv8l | 74.3 | 57.2 | 68.5 | 81.7 | 59.8 | 90.3 | 72.0 | 70 | 164.8 | 65.5 | 12.7 |
YOLOv8x | 74.1 | 59.2 | 69.0 | 85.7 | 64.5 | 91.2 | 74.0 | 72 | 257.4 | 66.6 | 15.5 |
YOLO-Vessel | 77.6 | 65.8 | 76.2 | 88.1 | 69.6 | 92.7 | 78.3 | 78 | 100.8 | 70.7 | 8.4 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Li, Z.; Deng, Z.; Hao, K.; Zhao, X.; Jin, Z. A Ship Detection Model Based on Dynamic Convolution and an Adaptive Fusion Network for Complex Maritime Conditions. Sensors 2024, 24, 859. https://doi.org/10.3390/s24030859
Li Z, Deng Z, Hao K, Zhao X, Jin Z. A Ship Detection Model Based on Dynamic Convolution and an Adaptive Fusion Network for Complex Maritime Conditions. Sensors. 2024; 24(3):859. https://doi.org/10.3390/s24030859
Chicago/Turabian StyleLi, Zhisheng, Zhihui Deng, Kun Hao, Xiaofang Zhao, and Zhigang Jin. 2024. "A Ship Detection Model Based on Dynamic Convolution and an Adaptive Fusion Network for Complex Maritime Conditions" Sensors 24, no. 3: 859. https://doi.org/10.3390/s24030859
APA StyleLi, Z., Deng, Z., Hao, K., Zhao, X., & Jin, Z. (2024). A Ship Detection Model Based on Dynamic Convolution and an Adaptive Fusion Network for Complex Maritime Conditions. Sensors, 24(3), 859. https://doi.org/10.3390/s24030859