Aiming at the problem of complex sea weather and low visibility, which makes it difficult for ordinary target detection algorithms to capture sea surface objects, a detail enhanced sea surface complex weather target detection method is designed. The method is improved based on the YOLOv8 detection model. Firstly, a detail enhancement module is added to the model input to extract the edge features of sea surface targets; Then, a coordinate attention mechanism is added at the output position of the model to improve the model's attention to important information of the image; Finally, optimize the network hyperparameters based on the predicted results. The experimental results on the marine target dataset show that the mAP value of the detection algorithm reaches 95.84%, and the detection time is about 104 FPS, which meets the real-time target detection requirements at sea and can provide effective technical reference for shipping management and prevention of maritime accidents.