For a long time,the task of target detection has been highly valued by computer vision scholars.With the rapid development of deep learning,various deep neural networks have been used for target detection and have achieved remarkable results.However,in the foggy weather,affected by the large particle medium in the air,the target contour in the image is blurred,the details are severely lost,and the low-quality image makes the target detection task extremely challenging.This paper focuses on the specific scene of ship target detection in foggy weather,and conducts in-depth research on image defogging and target detection.The existing DCPDN defogging model and YOLOv4 target detection model are improved and retrained using specific data sets.Finally,Using these models to design and implement a practically valuable ship target detection system in foggy weather.For a given foggy image,this article first uses the defogging model to defog the image,and then uses the target detection model to detect ship targets on the defogging image.The accuracy of the transmission image estimation greatly affects the result of image defogging.Aiming at the shortcomings of the original DCPDN defogging model,this paper proposes a characteristic attention structure,and further uses Depthwise convolution to compress the structure parameters.The mixed loss function is used to make the defogging model measure better in line with the perception mechanism of the human visual system.The improved defogging model has a better defogging effect than the original DCPDN model.In the target detection network,this paper uses the Focal Loss loss to improve the YOLOv4 model loss function,and solves the problem of the imbalance between the positive and negative samples of the detection frame in the model training phase.The clustering method is used to cluster the detection frame of the manually labeled ship data set to correct the size of the anchor point frame in the model.Compared with the original YOLOv4 target detection model,it is found that the retrained model is more suitable for ship target detection tasks.Finally,this paper uses the improved image defogging and target detection model to design and implement a complete and usable ship target detection system in foggy weather.The system can process images in two formats,a single picture and stream data from the camera,and give the processing results of image defogging and ship target detection.After system testing,the system can be used in actual production and life. |