Background: With the development of intelligent ship technology, computer vision technology has been widely utilized in the field of maritime monitoring. This is of great significance in ensuring the safety of navigation and improving the efficiency of shipping. However, complex and changing sea conditions and arbitrary traveling ships pose more accurate and faster requirements for the target detection algorithm used in the intelligent ship systems.
Objective: The primary objective of this paper is to propose an optimized version of the ship lightweight target detection algorithm based on YOLOv5s architecture. This enhancement involves the innovative fusion of the Shufflenetv2 network and the NAM attention mechanism, collectively termed as SN-YOLOv5s. This integration seeks to elevate the algorithm’s performance in detecting ship targets, offering improved accuracy and efficiency.
Methods: Firstly, the Shufflenetv2 network and NAM attention mechanism are used to replace the backbone network, significantly reducing the number of network parameters and improves the model detection accuracy. Secondly, in the process of converting the feature map to a fixed-size feature vector, SimSPPF is used to replace the fast pyramid pooling SPPF module, ensuring the efficiency and minimizing information loss. Lastly, EIOU is utilized to replace the bounding box regression loss function CIOU to make the model converge faster and with higher accuracy.
Results: Test results on the SeaShips dataset show that compared to the original YOLOv5s network, the average accuracy of target detection using the SN-YOLOv5s network is improved by 4.7%, the amount of computation is reduced by 40%, the amount of parameters is reduced by 20.6%, and the volume of model weights is decreased by 15.4%.
Conclusion: The experimental results fully demonstrate that the algorithm can significantly reduce the running cost of the model and improve the detection accuracy of the model, thus effectively guaranteeing the efficiency and quality of ship target detection.
Keywords: Target detection, YOLOv5s, lightweighting, attention mechanism, loss function, maritime monitoring.