Intelligent perception method for automatic driving of small vessels
By optimizing the DCGAN and YOLOv9s network models, diverse navigation scenario data is generated and deployed in a lightweight manner, solving the blind spot and misjudgment problems of small vessels in complex sea conditions, and realizing high-precision environmental perception and autonomous driving capabilities.
Patent Information
- Application Number
- CN202510129206.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-05
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2045-02-05
AI Technical Summary
Existing autonomous driving systems for small vessels cannot effectively acquire massive amounts of changing environmental data under complex sea conditions and low visibility, leading to blind spots and misjudgments, which affect the safety and reliability of autonomous driving.
A DCGAN network model is used to generate image data of various navigation scenarios. Combined with the YOLOv9s network model, the network model is optimized through the GSConv module, EMA attention module and Inner_CIOU loss function to achieve lightweight deployment and high-precision target recognition.
It improves the accuracy and real-time performance of target recognition for small vessels in variable marine environments, and enhances the safety and reliability of autonomous driving.
Smart Images

Figure CN119693922B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent ship technology, and specifically relates to an intelligent perception method for autonomous driving of small ships. Background Technology
[0002] With the continuous development of ship autopilot technology, small vessels are being used more and more widely in various fields such as commerce, transportation, and monitoring. The advantages of small vessels lie in their small size, light weight, and high maneuverability, making them suitable for relatively narrow and complex navigation environments, and they also have lower construction and operating costs.
[0003] In the field of marine autonomous driving technology, intelligent perception of the marine environment is the primary challenge for small vessels to achieve autonomous driving. Currently, existing perception systems on the market suffer from limitations such as the inability to acquire massive amounts of changing environmental data and the inability to deploy lightweight algorithm models. Particularly in complex sea conditions, at night, or in low visibility environments, existing perception systems are prone to blind spots or misjudgments. This means that under certain conditions, they may fail to effectively detect changes in the surrounding environment, misjudge obstacles, or fail to detect potential collision risks in a timely manner. These problems undoubtedly affect the safety and reliability of autonomous driving for small vessels, significantly limiting the practical application of autonomous driving technology. Therefore, an intelligent perception system capable of providing accurate perception and decision support in changing environments is needed to enable autonomous navigation and obstacle avoidance for small vessels. Summary of the Invention
[0004] To address the shortcomings of the existing technologies and taking into account the characteristics of remotely sensed ship images, this invention proposes an intelligent perception method for the autonomous driving of small ships, the steps of which include: Step S1: Collect sample data of navigation scene images, and use the DCGAN network model to generate diverse navigation scene image data to construct a dataset; Step S2: Train the YOLOv9s network model based on the dataset of navigation scene images, and test, evaluate and optimize the training. Step S3: Acquire image or video information during navigation through a visual sensor, and input it into the trained YOLOv9s network model for detection and recognition; Step S4: Acquire the target recognition results from image or video information during the navigation process in real time.
[0005] Preferably, the process of step S1 includes: Step S11: Collect navigation scene image samples and preprocess them; Step S12: Train the DCGAN network model; Step S13: Use the DCGAN network model to obtain diverse image data and construct a dataset.
[0006] Preferably, the DCGAN network model in step S1 includes three SE modules and SN regularization.
[0007] Preferably, the SE module consists of three processes: compression, excitation, and recalibration. 1) Compression process: The input feature map of the navigation scene image is processed by global average pooling, and the spatial dimension of each channel is compressed to obtain the global feature description of each channel; 2) Activation process: The obtained global feature description information is processed through a pair of fully connected layers. The first fully connected layer is used for dimensionality reduction, and the second layer is used for dimensionality increase. A weight vector in the range [0,1] is generated by the Sigmoid function to obtain the weight value of one channel. 3) Recalibration process: Multiply the obtained channel weight values with the channel features of the input feature map of the navigation scene image, and pass the weighted feature map to the subsequent convolutional layer or network.
[0008] Preferably, the SN regularization performs a normalization operation on the network weight matrix so that its maximum singular value does not exceed 1. The specific process is as follows: Given a weight matrix , The singular value decomposition formula is:
[0009] in, and It is an orthonormal matrix, and ∑ is a diagonal matrix containing The singular values; The formula for spectral normalization is:
[0010] The maximum singular value that makes the spectrum normalized is 1: The maximum singular value is calculated using the power iteration method.
[0011] Preferably, in step S2, the process of training the YOLOv9s network model and then testing, evaluating, and optimizing it is as follows: S21. Prepare a rich and diverse dataset of navigation scene images, and label the dataset with target recognition tags; S22. Train the YOLOv9s network model; S23. Evaluate and optimize the trained YOLOv9s network model.
[0012] Preferably, the YOLOv9s network model in step S2 includes the GSConv module, the EMA attention module, and the Inner_CIOU loss function.
[0013] Preferably, the GSConv module consists of standard convolution (SC) and depthwise separable convolution (DSC). The first two layers of the AConv module in the backbone of the YOLOv9s network model are replaced with the GSConv module to achieve lightweighting. The specific process is as follows: 1) The process of grouping the input feature map of the navigation scene image includes: dividing the input feature map of the navigation scene image into multiple groups, each group being responsible for processing a portion of the channels of the input feature map of the navigation scene image; 2) The process of grouping convolutional kernels includes: convolutional kernels also need to be grouped, with each group corresponding to a small convolutional kernel. These convolutional kernels only perform convolution operations on the input channels of the corresponding group. 3) The process of optimizing spatial features includes: the GSConv module further grouping or restricting the spatial dimension; in particular, during the convolution operation, the GSConv module divides the spatial region of the input feature map of the navigation scene image into multiple small blocks and adjusts the spatial region; 4) The process of obtaining the output feature map of the navigation scene image includes: after the convolution operation of all groups is completed, the output feature maps obtained by all groups will be stitched together to form the final output feature map of the navigation scene image.
[0014] Preferably, the EMA attention module is implemented by performing an exponentially weighted average of past attention weights during the calculation of the attention score; Attention weights are calculated by the inner product between the query and the key, and then the values are summed in a weighted manner according to the attention weights. The mathematical expression of the standard self-attention mechanism is as follows:
[0015] in, It is a query vector. It is a key vector. It is a value vector. It is the dimension of the key vector. It is a similarity measure between queries and keys; The mathematical expression for the EMA attention mechanism is as follows: (The expression is based on an exponentially weighted average of the attention weights calculated at each step.)
[0016] in, It is the exponentially weighted decay coefficient. This represents the original attention weights calculated at step t.
[0017] Preferably, the Inner_CIOU loss function is calculated using the following formula:
[0018]
[0019] in, It is intersection, union, and comparison. It is the square of the Euclidean distance between the center points of the predicted bounding box and the ground truth bounding box. It is the square of the diagonal length of the smallest bounding box containing both the predicted and ground truth boxes. It is a measure of the difference in the aspect ratio of the frame. It is an adjustable weight parameter. It is a function of the center of a frame and its aspect ratio.
[0020] Compared with existing technologies, this invention proposes an intelligent perception method for autonomous driving of small vessels, which has the following advantages: (1) This invention utilizes the DCGAN network model to generate rich and diverse navigation scene image data and constructs a navigation scene dataset. On this basis, the YOLOv9s network model is optimized using the GSConv module, the EMA attention module, and the Inner_CIOU loss function. The GSConv module is an efficient convolution operation that enhances the network's ability to capture global contextual information. The EMA attention module dynamically adjusts the weights of the feature map, making the model more focused on key information and suppressing background noise, thereby improving the accuracy of target recognition. In addition, the Inner_CIOU loss function is an improved regression loss function that can more accurately adjust the position of the prediction box, thereby improving the localization accuracy and convergence speed of the detection box. Through the above model, this invention achieves target recognition in a variable marine environment, significantly improving the accuracy and real-time performance of environmental perception. Furthermore, the network model is lightweight and can be deployed on small vessels. (2) The method of the present invention can adapt to the changing marine environment and navigation scenarios, has high recognition accuracy and lightweight model, and realizes comprehensive perception and analysis of the surrounding environment of the ship, thereby improving the autonomous driving capability and safety of small ships in various sea conditions. Attached Figure Description
[0021] Figure 1 This is a flowchart of the method of the present invention; Figure 2 This is a structural diagram of the DCGAN network model of the present invention; Figure 3 This is a structural diagram of the SE module of the present invention; Figure 4This is a diagram of the YOLOv9s network model structure of the present invention; Figure 5 This is a structural diagram of the GSConv module of the present invention; Figure 6 This is a structural diagram of the EMA module of the present invention. Detailed Implementation
[0022] The technical solutions of the embodiments of this application will be further described clearly and completely below with reference to the accompanying drawings. It should be noted that the described embodiments are only some embodiments of this application, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0023] To make the inventive objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be further described in detail below with reference to the accompanying drawings: In order to better understand the above-mentioned objectives, features, and advantages of this invention, the advantages of this invention will be further illustrated below by comparing the embodiments with the accompanying drawings and specific implementation methods.
[0024] This invention proposes an intelligent perception method for autonomous driving of small vessels, the flowchart of which is shown below. Figure 1 The steps of this method are explained in detail below: Step S1: Collect sample data of navigation scene images, and use the DCGAN network model to generate diverse navigation scene image data to construct a dataset; Furthermore, the process of step S1 includes: Step S11: Collect navigation scene image samples and preprocess them, such as cropping. Step S12: Train the DCGAN network model; Step S13: Use the DCGAN network model to obtain diverse image data and construct a dataset.
[0025] Specifically, the DCGAN network model in step S1 includes three SE modules and SN regularization, such as... Figure 2 As shown.
[0026] Specifically, the SE module consists of three processes: squeezing, excitation, and recalibration. Figure 3 As shown; 1) Compression process: The navigation scene image is input into the feature map and operated on by global average pooling (GAP) to compress the spatial dimension of each channel and obtain the global feature description of each channel; 2) Activation process: The obtained global feature description information is processed through a pair of fully connected (FC) layers. The first fully connected layer is used for dimensionality reduction, and the second layer is used for dimensionality increase. A weight vector in the range [0,1] is generated by the Sigmoid function to obtain the weight value of one channel. 3) Recalibration process: The obtained channel weight values are multiplied with each channel feature of the input feature map of the navigation scene image to reweight the feature map. The weighted feature map is then passed to subsequent convolutional layers or networks, so that the network can assign higher weights to more important channel features and suppress less important channel features.
[0027] Specifically, the SN regularization normalizes the network weight matrix so that its maximum singular value does not exceed 1. In other words, SN regularization constrains the weight matrix of each layer, ensuring that its maximum singular value remains within a stable range, thus preventing gradient explosion during training. The specific process is as follows: Given a weight matrix , The singular value decomposition formula is:
[0028] in, and It is an orthonormal matrix, and ∑ is a diagonal matrix containing The singular values; The goal of spectral normalization is to find The maximum singular value is used to normalize the weight matrix. The formula for spectral normalization is:
[0029] The maximum singular value that makes the spectrum normalized is 1: The maximum singular value is calculated using the power iteration method.
[0030] Step S2: Train the YOLOv9s network model based on the navigation scene image dataset, and then test, evaluate and optimize it. Furthermore, the process of step S2 includes: S21. Prepare a rich and diverse dataset of navigation scene images, and label the dataset with target recognition tags; S22. Train the YOLOv9s network model; S23. Evaluate and optimize the trained YOLOv9s network model.
[0031] Specifically, the YOLOv9s network model in step S2 includes the GSConv module, the EMA attention module, and the Inner_CIOU loss function, such as... Figure 4 As shown.
[0032] Specifically, such as Figure 5 As shown, to achieve a lightweight module, the first two layers of the AConv module in the YOLOv9s backbone are replaced with the GSConv module. The GSConv module consists of standard convolution (SC) and depthwise separable convolution (DSC). Its working principle is as follows: the navigation scene image data is grouped according to channels, and each group is SC'd with the corresponding convolution kernel; based on this, DSC is performed on the output of each group, and then the DSC results are combined using pointwise convolution; pointwise convolution usually uses 1x1 convolution for merging, which can effectively compress the computational cost of channel dimension and spatial dimension; the specific process is as follows: 1) The process of grouping the input feature map of the navigation scene image includes: In the GSConv module, the input feature map of the navigation scene image (usually a multi-channel matrix) first needs to be divided into multiple groups. The purpose is to improve efficiency by reducing the computational scope of each convolution operation; assuming the size of the input feature map of the navigation scene image is... ,in, and These are the height and width of the image, respectively. It is the number of input channels, and its channel count It is divided into multiple groups, each group responsible for processing a portion of the input feature map of the navigation scene image; for example, Divide into G groups, each group containing One channel; 2) The process of grouping convolutional kernels includes: In the GSConv module, convolutional kernels also need to be grouped to match the grouping of the input feature maps of the navigation scene image; each group corresponds to a small convolutional kernel, and these convolutional kernels only perform convolution operations on the input channels of the corresponding group. ① Assume the size of the convolution kernel is ,in and It is the height and width of the convolution kernel. This is the number of input channels. This refers to the number of output channels; ②Increase the number of input channels of the convolution kernel Divide into G groups, each group has There are channels, and the kernel size corresponding to each group is . That is, each convolutional kernel processes only a portion of the channels; ③ The convolution operation for each group only involves One input channel and One output channel reduces the computational cost of each convolution operation; 3) The process of optimizing spatial features includes: optimizing spatial features in the GSConv module; traditional convolution operations will perform convolution on the entire navigation scene image or feature map, while the GSConv module will further group or restrict in the spatial dimension to improve computational efficiency. ① During the convolution operation, the GSConv module divides the spatial region of the input feature map of the navigation scene image into multiple small blocks; for example, the image is divided into several local regions, and each region uses a separate convolution kernel for feature extraction. This approach helps to reduce computational redundancy and improve the accuracy of local feature extraction. ②The GSConv module can adjust the spatial region, so that the convolution operation of each small block can focus more on the features of the local region, thereby improving the ability to capture fine-grained features; 4) The process of obtaining the output feature map of the navigation scene image includes: after the convolution operation of all groups is completed, the output feature maps obtained from all groups will be concatenated to form the final output feature map of the navigation scene image; assuming the output size of each group is... The final output feature map size is The outputs of each group are concatenated along the channel dimension to obtain the final output feature map of the navigation scene image. The GSConv module effectively reduces computational complexity while improving the network's expressive power and efficiency.
[0033] Specifically, the EMA attention module is implemented as follows: during the calculation of the attention score, an exponentially weighted average of past attention weights is performed, thereby adjusting the current attention weight calculation; the specific process is as follows: Add an EMA attention module to the YOLOv9s Neck network, embedding it between the RepNCSPELAN module and the P5, as follows: Figure 6 As shown, the working principle of the EMA attention module is as follows: 1) The process of preparing a query, key, and value includes: , , ;in, Indicates the sequence length. It is the dimension of query and key. It is the dimension of the value; 2) The process of calculating standard attention includes: first, calculating the attention weight by the inner product between the query and the key, and then summing the values according to the attention weight; The formula for weighted summation is:
[0034] in, It is a similarity measure between queries and keys; Then, the normalized weights are obtained through softmax. 3) The process of smoothing historical weights for EMA includes: performing an exponentially weighted average of the attention weights calculated at each step, so that the attention weights from further back gradually decay. The formula for calculating the EMA attention module is as follows:
[0035] in, This represents the smoothed attention weights at step t. This represents the original attention weights calculated at step t; It is a smoothing factor, usually set to a constant close to 1 (e.g., 0.9). This determines the extent to which recent attention weights influence the final result; 4) The process of calculating the weighted sum includes: the EMA attention module uses smoothed EMA attention weights to calculate the weighted sum; The formula for the weighted sum is:
[0036] in, These are the smoothed attention weights. It is a value matrix; The weighted value after EMA smoothing will be used as the final output; this output contains a smoothed and weighted representation that can effectively reflect historical information while avoiding over-reliance on information at a particular moment. 5) The process of updating the EMA weights includes: updating the EMA weights after each calculation step to prepare for the next round of calculation; The formula for calculating EMA weight updates is as follows:
[0037] In this way, the model can dynamically smooth and adjust the weights at each time step, thereby avoiding over-reliance on the calculation at a certain moment and enhancing the modeling ability to support long-term dependencies.
[0038] Specifically, the formula for calculating the Inner_CIOU loss function is as follows:
[0039]
[0040] in, It is intersection, union, and comparison. It is the square of the Euclidean distance between the center points of the predicted bounding box and the ground truth bounding box. It is the square of the diagonal length of the smallest bounding box containing both the predicted and ground truth boxes. It is a measure of the difference in the aspect ratio of the frame. It is an adjustable weight parameter. It is a function of the center of a frame and its aspect ratio.
[0041] Step S3: Acquire image or video information during navigation through a visual sensor, and input it into the trained YOLOv9s network model for detection and recognition; Specifically, in step S3, the detection and recognition process is as follows: real-time acquisition of images or video information of the navigation process through a visual sensor, detection and recognition using a trained YOLOv9s model, enabling small vessels to process surrounding environmental information and perceive the environment in real time. The model adapts to the changing marine environment and navigation scenarios, and has high recognition accuracy.
[0042] Step S4: Acquire the target recognition results from image or video information during the navigation process in real time.
[0043] Specifically, in step S4, the process of acquiring the target recognition results of image or video information during navigation in real time is as follows: the trained YOLOv9s network model directly outputs the target detection and recognition results, performs information processing and environmental perception of the navigation scene in real time, has high recognition accuracy, and improves the autonomous driving capability and safety of small vessels in various sea conditions.
[0044] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0045] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A small ship automatic driving intelligent perception method, characterized in that, include: Step S1: Collect sample data of navigation scene images, and use the DCGAN network model to generate diverse navigation scene image data to construct a dataset; The DCGAN network model includes three SE modules and SN regularization; Step S2: Train the YOLOv9s network model based on the dataset of navigation scene images, and test, evaluate and optimize the training. The YOLOv9s network model includes the GSConv module, the EMA attention module, and the Inner_CIOU loss function; Add an EMA attention module to the YOLOv9s Neck network, embedding it between the RepNCSPELAN module and the output P5; The GSConv module consists of standard convolutions and depthwise separable convolutions. It replaces the first two AConv modules in the backbone of the YOLOv9s network model with the GSConv module to achieve lightweighting. The specific process is as follows: 1) The process of grouping the input feature map of the navigation scene image includes: dividing the input feature map of the navigation scene image into multiple groups, each group being responsible for processing a portion of the channels of the input feature map of the navigation scene image; 2) The process of grouping convolutional kernels includes: convolutional kernels also need to be grouped, with each group corresponding to a small convolutional kernel. These convolutional kernels only perform convolution operations on the input channels of the corresponding group. 3) The process of optimizing spatial features includes: the GSConv module further grouping or restricting the spatial dimension; in particular, during the convolution operation, the GSConv module divides the spatial region of the input feature map of the navigation scene image into multiple small blocks and adjusts the spatial region; 4) The process of obtaining the output feature map of the navigation scene image includes: after the convolution operation of all groups is completed, the output feature maps obtained by all groups will be stitched together to form the final output feature map of the navigation scene image; Step S3: Acquire image or video information during navigation through a visual sensor, and input it into the trained YOLOv9s network model for detection and recognition; Step S4: Acquire the target recognition results from image or video information during the navigation process in real time.
2. The intelligent perception method for automatic driving of small vessels according to claim 1, characterized in that, In step S1, the process of constructing the dataset includes: Step S11: Collect navigation scene image sample data and preprocess it; Step S12: Train the DCGAN network model; Step S13: Use the DCGAN network model to obtain diverse image data and construct a dataset.
3. The intelligent perception method for automatic driving of small vessels according to claim 1, characterized in that, The SE module consists of three processes: compression, excitation, and recalibration. 1) Compression process: The input feature map of the navigation scene image is processed by global average pooling, and the spatial dimension of each channel is compressed to obtain the global feature description of each channel; 2) Activation process: The obtained global feature description information is processed through a pair of fully connected layers. The first fully connected layer is used for dimensionality reduction, and the second layer is used for dimensionality increase. A weight vector in the range [0,1] is generated by the Sigmoid function to obtain the weight value of one channel. 3) Recalibration process: Multiply the obtained channel weight values with the channel features of the input feature map of the navigation scene image, and pass the weighted feature map to the subsequent convolutional layer or network.
4. The intelligent perception method for automatic driving of small vessels according to claim 1, characterized in that, The SN regularization normalizes the network weight matrix so that its maximum singular value does not exceed 1. The specific process is as follows: Given a weight matrix , Representing the real number field, matrix It is composed of real numbers matrix; The singular value decomposition formula is: in, and It is an orthogonal matrix. It is a collection A diagonal matrix of singular values; The formula for spectral normalization is: ; The maximum singular value that makes the spectrum normalized is The calculation of the maximum singular value is achieved through the power iteration method. It is a weight matrix The maximum singular value.
5. The intelligent perception method for automatic driving of small vessels according to claim 1, characterized in that, In step S2, the process of training the YOLOv9s network model and then testing, evaluating, and optimizing it is as follows: S21. Prepare a rich and diverse dataset of navigation scene images, and label the dataset with target recognition tags; S22. Train the YOLOv9s network model; S23. Evaluate and optimize the trained YOLOv9s network model.
6. The intelligent perception method for automatic driving of small vessels according to claim 1, characterized in that, The EMA attention module is implemented by performing an exponentially weighted average of past attention weights during the calculation of attention scores. Attention weights are calculated by the inner product between the query and the key, and then the values are summed in a weighted manner according to the attention weights. The mathematical expression of the standard self-attention mechanism is as follows: ; in, It is a query vector. It is a key vector. It is a value vector. It is the dimension of the key vector. It is a similarity measure between queries and keys; The mathematical expression for the EMA attention mechanism is as follows: (The expression is based on an exponentially weighted average of the attention weights calculated at each step.) ; in, It is the exponentially weighted decay coefficient. This is the result of the standard self-attention mechanism. This is the result of the EMA attention mechanism calculated in the previous step. This is a result of the EMA attention mechanism.
7. The intelligent perception method for automatic driving of small vessels according to claim 1, characterized in that, The formula for calculating the Inner_CIOU loss function is as follows: ; in, It is the intersection-over-union ratio, which measures the degree of overlap between the predicted bounding box and the ground truth bounding box. This represents the area of the overlapping portion of the two boxes. This represents the total area of the predicted bounding box and the ground truth bounding box combined. It is the square of the Euclidean distance between the center points of the predicted bounding box and the ground truth bounding box. For the prediction box, The center point coordinates of the predicted bounding box are: The coordinates of the center point of the true bounding box are , It is the square of the diagonal length of the smallest bounding box containing both the predicted and ground truth boxes. It is a measure of the difference in the aspect ratio of the frame. It is an adjustable weight parameter. These are weighting coefficients. It is a function of the center of a frame and its aspect ratio. The center point positions of the predicted bounding box and the ground truth bounding box. Aspect ratio, The width of the prediction box. This represents the height of the predicted bounding box.
Citation Information
Patent Citations
Image data set enhancement method based on improved DCGAN, storage medium and terminal
CN116363478A
Self-adaptive marine ship unmanned driving lightweight environment sensing method
CN118351492A
Visual identification method for pipe gallery bolt missing under condition of mobile shooting of robot
CN118918364A
