With the development and progress of science and technology and the closer connection between humans and the ocean,humans are gradually inclined to unmanned underwater operation equipment with low cost,low power consumption,and strong automation to assist or replace manual underwater operations.Underwater target recognition technology plays a key role in underwater work.Traditional underwater target recognition technology has problems such as high cost and low recognition accuracy.Using deep learning as an underwater target recognition method has gradually become the mainstream.However,the conventional deep learning network has the problems of large model volume,excessive computing resource consumption,and high inference delay,making it difficult to deploy offline in unmanned underwater operation equipment.This paper aims to develop a real underwater target offline recognition system deployed in embedded devices,and conduct research from three aspects:underwater data set construction,model compression,and system deployment.The main content and achievements of this paper are as follows:A lightweight network architecture search algorithm based on the global gradient is studied,and a lightweight underwater target recognition model YOLO-TN based on the search algorithm is designed.The improvement of the network structure is as follows: firstly,an improved network architecture search method is proposed,and the dark knowledge of the teacher’s network is added as a regular item in the search process,and the lightweight module TN obtained by searching is used to replace the backbone network in YOLO-v5.The amount of network parameters is reduced,and the speed of the feature extraction stage is improved at the same time;secondly,an extreme model compression strategy is proposed,based on the lightweight network as the backbone network,two strategies and five pruning rates are performed on the model detection head The parameters are pruned,and the performance test under different input sizes is carried out.The experimental results show that the parameters of the YOLO-TN model after extreme compression are only 0.5137 M,and m Ap0.5 reaches0.5663,and the reasoning FPS on the CPU reaches 17.2.When the input size is 416×416,m Ap0.5 reached 0.5425,and the inference FPS on the CPU reached 28.8,which effectively realized the high precision and lightweight of the underwater target recognition model,and ensured the feasibility of offline deployment of the model and the real-time performance of inference.The construction and processing method of a real underwater environment data set is studied,and various situations that the underwater target recognition model may encounter in the actual recognition process are designed.The data sets are all shot in the real underwater environment by underwater unmanned vehicles,which improves the problems of unbalanced target quantity and single image environment in the existing underwater data sets.At the same time,the problems of insufficient underwater illumination,image degradation,and image blurring in the underwater data set were analyzed.According to different real underwater environments,it was proposed to perform dark channel defogging,underwater image color restoration,and automatic color equalization algorithms to image images.Pre-processing can effectively improve the quality of underwater data sets and enhance the generalization of the model.A deployment method of underwater target recognition system based on deep network compression and MNN is studied,and the YOLO-TN model is deployed to the Jetson TX2 embedded platform using the MNN reasoning framework to build a real-time underwater target recognition system.The system is divided into three parts: data receiving,model reasoning,and result exporting,which can realize offline recognition of underwater targets.The test results show that the FPS of the YOLO-TN network deployed by MNN on CPU inference can guarantee real-time performance well,and the pruned YOLO-TN can reach 28.6 and 20.4 FPS at the input size of 320×320 and 416×416. |