Method for realizing inland waterway ship traveling wave parameter identification based on convolutional neural network

Through the method based on convolutional neural network, the CBAM attention mechanism is used to process video images and identify ship traveling wave parameters in inland waterways, solving the problems of insufficient complexity and accuracy of traditional methods, and achieving high-precision ship traveling wave parameter recognition.

CN120071092APending Publication Date: 2025-05-30SOUTHEAST UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510217703.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-05-30

AI Technical Summary

Technical Problem

Traditional ship travel wave observation methods are costly, complex in operation and difficult to deal with complex and changeable actual situations. The existing technology cannot effectively extract ship travel wave characteristic parameters.

Method used

The method based on the convolutional neural network is adopted to obtain and process video images, and a convolutional neural network model using the CBAM attention mechanism to identify the propagation speed, wave height and wavelength of the ship's traveling wave.

Benefits of technology

It improves the accuracy of ship traveling wave parameters recognition, reduces prediction errors, enhances the model's ability to capture key features, and adapts to different waterway environments and ship types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120071092A_ABST
    Figure CN120071092A_ABST
Patent Text Reader

Abstract

The invention relates to an inland waterway ship traveling wave parameter identification method based on a convolutional neural network, and the method is characterized in that the method comprises the steps: S1, obtaining an original image; s2, processing the original image to obtain a to-be-detected image capable of showing ripples; and S3, the to-be-detected image is input to the trained parameter identification model, ship traveling wave parameters are obtained, the parameter identification model is a convolutional neural network containing a CBAM attention mechanism, and the ship traveling wave parameters comprise the propagation speed, the wave height and the wavelength. Compared with the prior art, the method has the advantages of improving the prediction precision and the like.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to waterway engineering and video image processing, and particularly to a method for identifying ship wave parameters in inland waterways based on a convolutional neural network. Background Art

[0002] As an important part of the modern comprehensive transportation system, building a smooth, efficient, safe, and green inland waterway transportation system has risen to a national strategy. With the vigorous development of inland waterway transportation, the increasing scale and speed of ships have enhanced the hydrodynamic effects of ships in canals, severely eroding the waterway revetments and cross-sections, and increasing the operation and maintenance costs. During the navigation of ships, the interaction between the hull and the water will generate ship waves, which have important impacts on the maintenance of the cross-sections of inland restricted waterways, the stability of revetments, and the planting of vegetation. Specifically, mastering the characteristics of ship waves in inland waterways is helpful for waterway construction and maintenance.

[0003] Most traditional ship wave observation methods rely on complex physical measurement equipment, which is costly, complex to operate, requires a large amount of labor costs, has limitations in the accuracy and precision of measurement results, and has poor adaptability to environmental factors, making it difficult to handle complex and changeable actual situations. With the continuous development of computer video processing and image recognition technologies, it has become possible to use video recognition technologies for on-site observation of ship waves.

[0004] In this regard, some existing technologies also expect to introduce machine vision technologies into the measurement of ship waves. For example, Chinese Patent CN113408401A discloses a method and device for fast and automatic recognition of ship waves based on machine learning, which can recognize ship waves under different types, different ship motion states, and different wind and wave backgrounds. However, it cannot extract the characteristic parameters of ship waves. Summary of the Invention

[0005] The purpose of the present invention is to provide a method for identifying ship wave parameters in inland waterways based on a convolutional neural network.

[0006] The purpose of the present invention can be achieved through the following technical solutions:

[0007] A method for identifying ship wave parameters in inland waterways based on a convolutional neural network includes:

[0008] Step S1: Obtain the original image;

[0009] Step S2: Process the original image to obtain a to-be-detected image that can display the ripples;

[0010] Step S3: Input the image to be detected into the trained parameter recognition model to obtain the ship traveling wave parameters, where the parameter recognition model is a convolutional neural network with a CBAM attention mechanism, and the ship traveling wave parameters include propagation speed, wave height, and wavelength.

[0011] The acquisition method of the original image includes:

[0012] Fix the installation location of the camera on the bank of the waterway, fix a scale on the bank, make the camera's perspective parallel to the revetment, and continuously collect image data samples of the ship traveling wave passing by the scale as the collected video. The frame rate of the camera is above 60fps, and the resolution is at least 1080p;

[0013] Use video editing software to extract and save the images in the collected video frame by frame, and perform linear interpolation to fill in frames until the deviation between adjacent images is less than a pre-configured threshold, and use the obtained image frames as the original images.

[0014] The said step S2 includes:

[0015] Step S2-1: Perform median filtering on the original image;

[0016] Step S2-2: Perform grayscale processing;

[0017] Step S2-3: Perform edge detection;

[0018] Step S2-4: Perform binarization processing to obtain the image to be detected.

[0019] The input of the parameter recognition model is the image to be detected, and the output is the ship traveling wave parameters; its training samples include the image to be detected and the corresponding ship traveling wave parameters.

[0020] The said training samples are obtained by the following steps:

[0021] Based on consecutive images to be detected, obtain the positions of the wave crests and wave troughs in each image to be detected respectively;

[0022] Calculate the difference between the positions identified by adjacent wave crests and wave troughs to obtain the wave height of a ship traveling wave, and obtain the wave height change sequence from the generation to the end of the ship traveling wave based on the wave height recognition results of consecutive images to be detected;

[0023] Based on the obtained wave height, read the pixel length corresponding to each wave height, analyze to obtain the proportional relationship between the actual wave height and the pixel length, read the pixel length between a wave crest and the next adjacent wave crest, and convert this pixel length into the actual length according to the proportional relationship between the actual wave height and the pixel length to obtain the wavelength;

[0024] Based on the obtained wavelength divided by the time interval between two adjacent wave crests or wave troughs of this wave in the video, obtain the propagation speed of the ship traveling wave.

[0025] The parameter recognition model adopts a hybrid network, which is implemented by stacking two neural networks, namely a convolutional network and a multi-layer neural network. The convolutional network includes 2 convolutional layers, 2 CBAM attention mechanism modules, 2 pooling layers, 1 Dropout layer, and 2 fully connected layers from input to output. The multi-layer neural network includes 1 input layer, 2 hidden layers, and 1 output layer from input to output. The parameters input by the input layer are respectively the image features of the ship wave video image. After passing through 2 hidden layers, the real-time ship wave parameter values at a certain position of the channel revetment during the propagation of the ship wave are output.

[0026] In the convolutional layer, the size of the convolutional kernel is 3×3 or 5×5, and the stride is 2 or 3; the CBAM attention mechanism module is used after the convolutional layer; and then a ReLU activation function is equipped; the pooling layer cuts the convolved features into several regions, the pooling region is 2×2 or 3×3, the stride is 2, and the pooling operation is max pooling to take its maximum value; the Dropout layer is to avoid overfitting of the model. During the training stage of the model, part of the hidden neurons work and part do not work, and the discarded ratio is set to 0.2 - 0.3; the fully connected layer is used to connect the image features to obtain the final image features of the ship wave, without an activation function.

[0027] The CBAM attention mechanism module includes a channel attention unit and a spatial attention unit;

[0028] The channel attention unit generates channel-level attention weights through global average pooling and global maximum pooling, and then generates an attention map through a shared multi-layer perceptron.

[0029] The spatial attention unit generates spatial-level attention weights by performing average pooling and maximum pooling on the feature map output by the channel attention, and then through a convolutional layer.

[0030] An apparatus for identifying ship wave parameters in an inland waterway based on a convolutional neural network includes a memory, a processor, and a program stored in the memory. When the processor executes the program, the above-mentioned method is implemented.

[0031] A storage medium stores a program, and when the program is executed, the above-mentioned method is implemented.

[0032] Compared with the prior art, the present invention has the following beneficial effects:

[0033] 1. Using a convolutional neural network with CBAM attention mechanism as the parameter recognition model can better focus on the key features in the ship wake image, improve the recognition accuracy of parameters. The CBAM attention mechanism enhances the model's ability to capture key features through channel and spatial attention mechanisms, significantly reducing the prediction errors of wave height, wavelength, and wave speed. The average optimization amplitude of MSE reaches 15%, and the average reduction of the error percentage is 14.9%.

[0034] 2. Perform frame interpolation to avoid the problem of parameter recognition across cycles caused by too low frame rate, thereby greatly improving the accuracy.

[0035] 3. The convolutional neural network model can extract detailed features from complex water surface waveform data, achieving high-precision recognition of parameters such as ship wake wave height, wavelength, and wave speed. This method can realize real-time data acquisition, processing, and parameter recognition, providing instant feedback for the management of inland waterways and ship safety.

[0036] 4. It can adapt to different waterway environments and different ship types, having good versatility and scalability. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 is a schematic diagram of the main step flow of the method of the present invention;

[0038] Figure 2 is the process of obtaining ship wake parameters from the original image for the training samples;

[0039] Figure 3 is a schematic diagram of the convolutional neural network model structure;

[0040] Figure 4 is a partial image processed in the embodiment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0041] The present invention will be described in detail below with reference to the drawings and specific embodiments. This embodiment is implemented on the premise of the technical solution of the present invention, giving detailed implementation manners and specific operation processes, but the protection scope of the present invention is not limited to the following embodiments.

[0042] A method for identifying ship wake parameters in inland waterways based on a convolutional neural network, as Figure 1 shown, includes:

[0043] Step S1: Obtain the original image;

[0044] The original image is obtained by using a high-definition camera to record ship wake image data, specifically including:

[0045] At the installation location of the fixed camera on the bank of the waterway, a scale is fixed on the bank. The camera's perspective is parallel to the revetment, and video samples of the ship's traveling waves passing by the scale are continuously collected as the acquisition video. The camera should maintain an appropriate angle with the water surface to avoid the interference of the reflected light on the water surface and ensure clear wave images are captured. To accurately identify the details of the ship's traveling waves, the frame rate of the camera should reach above 60fps, and the resolution should be at least 1080p. A higher frame rate helps capture the rapidly changing wave characteristics and avoid waveform distortion caused by frame skipping;

[0046] Use video editing software to extract and save the images in the acquisition video frame by frame. Since the propagation speed of the ship's traveling waves is relatively fast and the video duration is short, the number of frames obtained may be small. Therefore, linear interpolation needs to be used to fill in frames until the deviation between adjacent images is less than a pre-configured threshold, and the resulting image frames are used as the original images. The deviation can be represented by the average displacement of the corresponding feature points of adjacent frames. Of course, in some other embodiments, frames can also be directly filled in to 90fps, which can improve the processing speed.

[0047] Step S2: Process the original image to obtain the image to be detected that can show the ripples, as Figure 2 shown, including:

[0048] Step S2-1: Perform median filtering on the original image;

[0049] The grayscale image may have noises generated due to the environment or interference, such as thermal noise, quantization noise, etc. First, it needs to be filtered to remove noise. Here, the median filtering method that can better retain the image details is used. Median filtering, as a non-linear technique, can effectively eliminate isolated noise points while maintaining the key details in the image. It resets the grayscale value of each pixel according to the median of the grayscale values of all pixel points within a certain area around the pixel, thereby eliminating the points with too large a difference from the median of the pixel grayscale values within the area.

[0050] The main algorithm flow of median filtering is as follows:

[0051] ① Set a sampling window of a suitable size containing an odd number of points (such as 3×3, 5×5, etc.), which can ensure a clear central pixel.

[0052] ② Take an odd number of pixels from the image to be processed through the sampling window and sort the grayscale values of these pixels.

[0053] ③ Select the median of the odd number of grayscale values, that is, the one ranked in the middle from smallest to largest, as the replacement value.

[0054] ④ Set the grayscale value of the pixel at the center position of the sampling window to the replacement value.

[0055] ⑤ Repeat steps ② - ④ to process all pixel points in the image.

[0056] For example, consider a 3×3 window. Assume the pixel values in the window are:

[0057]

[0058] The sorted values are: [10, 20, 30, 50, 60, 70, 90, 100, 110], and the median is 60. Therefore, the center of the window (the pixel originally at 60) will be replaced by 60.

[0059] Step S2-2: Perform grayscale processing;

[0060] Perform grayscale processing on the obtained image:

[0061] T = 0.299×R + 0.587×G + 0.114×B

[0062] where T is the grayscale value of the converted target image, and R, G, and B are the color image components of red, green, and blue respectively.

[0063] Step S2-3: Perform edge detection;

[0064] Performing edge detection on the filtered image can well extract the features of the water gauge scale, greatly reduce the data volume and eliminate unnecessary image information, while also retaining important image structure attributes for subsequent processing and recognition. Since the water gauge scale is horizontal in the image, a relatively simple Sobel operator is used here for vertical edge detection.

[0065] The Sobel operator is one of the most common edge detection operators. It detects edges by calculating the gradient of the image. The Sobel operator applies two convolution kernels (filters) in the horizontal and vertical directions respectively to calculate the gradient.

[0066] Horizontal gradient (Sobel X):

[0067]

[0068] Vertical gradient (Sobel Y):

[0069]

[0070] The image gradient calculated by the Sobel operator can be used to judge the edges in the image. By calculating the gradient magnitude of each pixel point in the image:

[0071]

[0072] Then, according to the threshold, it is determined whether the pixel is an edge.

[0073] Step S2-4: Perform binarization processing to obtain the image to be detected.

[0074] After edge detection on the image, there are still interferences from other objects in the background. At this time, binarization processing is performed to make the white scale lines clearer. Set the global threshold T, and then according to the global threshold, divide the data of the image into two parts: the part with a gray value greater than T and the part with a gray value less than T. Set the pixels in the part with a gray value greater than T to white, and the part with a gray value less than T to black. Traverse each pixel in the image and generate a new binarized image according to the relationship between its gray value and the threshold T.

[0075] For each pixel point I(x, y) in the input image, the binarization formula can be expressed as:

[0076]

[0077] Where: I(x, y) is the gray value at the position (x, y) in the original image, T is the set threshold, B(x, y) is the pixel value of the binarized image, 1 represents white, and 0 represents black.

[0078] Through the above processing, the abnormal extraction of ripples caused by sunlight reflection can be solved, thereby providing an image basis for subsequent parameter recognition and having season and climate generality.

[0079] Step S3: Input the image to be detected into the trained parameter recognition model to obtain the ship wave parameters. Among them, the parameter recognition model is a convolutional neural network containing the CBAM attention mechanism, and the ship wave parameters include propagation speed, wave height, and wavelength.

[0080] Among them, the input of the parameter recognition model is the image to be detected, and the output is the ship wave parameters; its training samples include the image to be detected and the corresponding ship wave parameters.

[0081] Specifically, the training samples are obtained by the following steps:

[0082] Based on consecutive images to be detected, the positions of wave crests and wave troughs in each image to be detected are obtained respectively;

[0083] The difference between the positions identified by adjacent wave crests and wave troughs is used to obtain the wave height of a ship wave, and a wave height change sequence from the generation to the end of the ship wave is obtained based on the wave height recognition results of consecutive images to be detected;

[0084] Based on the acquired wave height, read the pixel length corresponding to each wave height, analyze to obtain the proportional relationship between the actual wave height and the pixel length, read the pixel length of the interval between the wave crest and the next adjacent wave crest, and convert this pixel length into the actual length according to the proportional relationship between the actual wave height and the pixel length to obtain the wavelength;

[0085] Based on the obtained wavelength divided by the time interval between two adjacent wave crests or wave troughs of this wave in the video, the propagation speed of the ship wave is obtained.

[0086] The parameter recognition model adopts a hybrid network, which is implemented by stacking two neural networks, namely a convolutional network and a multi-layer neural network. The convolutional network includes 2 convolutional layers, 2 CBAM attention mechanism modules, 2 pooling layers, 1 Dropout layer, and 2 fully connected layers from input to output. The multi-layer neural network includes 1 input layer, 2 hidden layers, and 1 output layer from input to output. The parameters input by the input layer are respectively the image features of the ship wave video image. After passing through 2 hidden layers, the real-time ship wave parameter values at a certain position of the channel revetment during the propagation of the ship wave are output. The structural diagram of this convolutional neural network model is as Figure 3 shown.

[0087] The convolutional layer slides a filter (also called a convolutional kernel, kernel) over the input data, calculates the weighted sum of the local area, extracts local features from the input data, and generates a feature map. Suppose the sizes of the input image I and the convolutional kernel K are H in ×W in and H kernel ×W kernel , respectively. Then the convolution operation can be expressed as:

[0088]

[0089] Among them, S(i,j) is a certain value in the output feature map, representing the feature obtained after the convolution operation. The size of the convolutional kernel is usually small (such as 3×3 or 5×5), but through the stacking of multiple layers of convolutions, the CNN can gradually extract more and more complex features from the image.

[0090] The size of the output feature map of the convolutional layer depends on the following factors:

[0091] ① The size of the input image (H in ,W in );

[0092] ② The size of the convolutional kernel (H kernel ,W kernel );

[0093] ③ Stride: Controls the pace of the convolutional kernel sliding, usually 1 or 2.

[0094] ④ Padding: Add zero padding to the edges of the input image to keep the size of the feature map after convolution. Common padding methods are "valid" (no padding) and "same" (padding to make the output size the same as the input).

[0095] The main goal of the convolutional layer is to extract features (such as edges, textures, etc.), perform local connections in the image, enabling the network to capture information in local regions.

[0096] The CBAM attention mechanism module includes a channel attention unit and a spatial attention unit;

[0097] The channel attention unit generates channel-level attention weights through global average pooling and global max pooling, and then generates an attention map through a shared multi-layer perceptron.

[0098] Suppose after passing through the convolutional layer, the input feature map is F, with a size of C×H×W. Perform global average pooling and global max pooling on F to obtain two feature maps:

[0099]

[0100] Send them separately into a shared multi-layer perceptron (MLP). The MLP has a hidden layer. The number of neurons in the first layer is C / r (r is the reduction rate, which can be taken as 16), the activation function is ReLU, and the number of neurons in the second layer is C. Let the parameters of the MLP be W 1 and W 2 , then there are:

[0101] M c,avg = σ(W 2 ·ReLU(W 1 ·F avg ))

[0102] M c,max = σ(W 2 ·ReLU(W 1 ·F max ))

[0103] Add them element-wise to obtain the channel attention map:

[0104] M c = M c,avg + M c,max

[0105] Multiply the channel attention map M c element-wise with the input feature map F to obtain the output feature map of the channel attention module:

[0106] F′ = F · M c

[0107] The spatial attention unit performs average pooling and max pooling on the feature map output by the channel attention, and then generates spatial-level attention weights through a convolutional layer.

[0108] Global max pooling and global average pooling based on channels are performed on the input feature map F′ to obtain two feature maps F avg and F max . They are concatenated in the channel dimension to obtain a feature map F con . Convolution operation is performed on F con with a convolution kernel size of 7×7 to obtain a feature map M s . The spatial attention map M s is element-wise multiplied with the output feature map F′ of the channel attention module to obtain the final output feature map:

[0109] F″ = F′·M s

[0110] The activation function usually follows the convolutional layer and is used to introduce non-linearity so that the network can learn more complex features. The activation function used is ReLU (Rectified Linear Unit), and the expression of the ReLU function is:

[0111] ReLU(x) = max(0, x)

[0112] The pooling layer downsamples the feature map (downsampling), which is used to reduce the spatial size of the feature map, reduce the number of parameters and the amount of calculation, and at the same time improve the invariance of the features. The pooling operation used is max pooling (MaxPooling).

[0113] MaxPooling(i, j) = max{P(i + m, j + n)}

[0114] where P(i, j) is the input feature map, and the pooling area is usually 2×2 or 3×3, and the stride is 2.

[0115] The Dropout layer is used to avoid overfitting of the model. During the training phase of the model, some of the hidden neurons work and some do not. The main parameter is rate, a floating value representing the proportion of discarded neurons, usually set to 0.2 - 0.3.

[0116] The fully connected layer integrates the features extracted by the previous convolutional layer and pooling layer, and is used to map the extracted features to the final output space. Each neuron in the fully connected layer is connected to all neurons in the previous layer.

[0117] For the fully connected layer, the calculation process is:

[0118] y = Wx + b

[0119] Among them, W is the weight matrix, x is the input of the previous layer (the flattened vector of the feature map), b is the bias term, and y is the output.

[0120] During the training process of the model, generally, the sample set is divided into a training set and a test set, which can be divided according to a ratio of 7:3.

[0121] During the test process, the effect of the model is evaluated by the Mean Squared Error Loss (MSE) on the output result; the smaller the value of MSE, the closer the predicted result of the model is to the real result, and the better the performance of the model. The mean squared error MSE is defined as:

[0122]

[0123] Among them, n is the number of samples of a certain target parameter in the model, i is the data sample of this parameter, p i is the predicted value of a certain parameter of the model, y i is the actual value of a certain parameter of the model.

[0124] In addition, an optimizer is also established to update the weights of the network to minimize the loss function. The gradient descent algorithm is used to update the weights and biases of the network to minimize the loss function and optimize the model.

[0125] And use the test set to test the trained network model to obtain the best recognition network model corresponding to the image.

[0126] For a certain actual case, the solution of this application is verified as follows:

[0127] (1) Acquisition of ship wave video and data collection

[0128] Fix the scale on one side of the vertical riverbank, install a fixed video recording device beside the scale, and calibrate the target. Record the ship waves when multiple ships pass by. Process the video collected from the experiment frame by frame. Since the propagation speed of the ship waves is relatively fast and the video time is short, the number of frames obtained may be small. Use the linear interpolation frame filling technology to fill the frames of the video and supplement the video to 90fps.

[0129] (2) Ship wave image data processing

[0130] A total of 220 groups of ships passing through the test section were observed this time. Preprocess the obtained image data, such as Figure 4As shown in the figure. In combination with the scale, through computer vision technology, the physical characteristics such as the propagation speed, wave height, and wavelength of the ship's traveling wave are analyzed using pixels, the physical characteristics are extracted and labeled, and each frame of data is labeled.

[0131] The processed image data is corresponded one by one with the ship's traveling wave feature data collected by the video to form an inland waterway ship's traveling wave data set. Among them, 70% of the data in the data set is extracted as the model training set, and 30% of the data is used as the verification set.

[0132] (3) Model training and testing

[0133] The data set is divided into a training set and a test set as the input and input into the neural network model. Among them, the training set is used in the model training process to obtain the best parameter situation; the test set is tested under the best parameter conditions of the model to verify the accuracy and generalization ability of the model, and the final prediction result of the model is evaluated.

[0134] (4) Effect comparison and analysis

[0135] In this example, a comparison of the effects with the basic CNN model without the CBAM attention mechanism is also added. After adding the attention mechanism, the model can better focus on the key features in the ship's traveling wave image, improve the recognition accuracy of the parameters, reduce the interference of the model to irrelevant information, enhance the robustness of the model, and improve the generalization ability of the model. The results are shown in Table 1.

[0136] Table 1

[0137] Evaluation index With CBAM Without CBAM Optimization amplitude MSE of wave height prediction 0.042 0.051 Reduced by 17.6% MSE of wavelength prediction 0.036 0.041 Reduced by 12.2% MSE of wave speed prediction 0.028 0.033 Reduced by 15.2% Percentage of wave height error (%) 4.80% 5.70% Reduced by 15.8% Percentage of wavelength error (%) 3.90% 4.50% Reduced by 13.3% Percentage of wave speed error (%) 3.20% 3.80% Reduced by 15.8% Training time (hours) 12.5 12.3 Basically the same Number of model parameters (million) 2.3 2.1 Slightly increased (9.5%)

[0138] Table 1 shows the performance comparison between the model using the CBAM module and the basic CNN model without CBAM on the same data set. The experiment is repeated 5 times and the average value is taken to ensure the stability of the results. The CBAM module enhances the model's ability to capture key features through channel and spatial attention mechanisms, resulting in a significant reduction in the prediction errors of wave height, wavelength, and wave speed. The average optimization amplitude of MSE reaches 15%, and the average reduction of the error percentage is 14.9%. Although the introduction of the CBAM module leads to a slight increase in the number of model parameters (about 9.5%), the training time is basically the same, indicating that the computational cost of the attention mechanism is within an acceptable range. The fluctuation of the experimental group on the test set is smaller (the standard deviation is reduced by 20%), indicating that CBAM effectively suppresses noise interference and improves the robustness of the model.

[0139] The above description is only a description of the preferred embodiments of the present application, and is not any limitation on the scope of the present application. Any change or modification made by any ordinary person skilled in the art according to the technical content disclosed above shall be regarded as an equivalent effective embodiment, and all belong to the scope protected by the technical solution of the present application.

[0140] If the above functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.

Claims

1. A method for identifying inland waterway ship wave parameters based on convolutional neural network, characterized in that: include: Step S1: obtaining an original image; Step S2: Processing the original image to obtain an image to be detected that can show ripples; Step S3: input the image to be detected into a trained parameter recognition model to obtain ship wave parameters, wherein the parameter recognition model is a convolutional neural network containing a CBAM attention mechanism, and the ship wave parameters include propagation speed, wave height and wavelength.

2. According to claim 1, a method for identifying inland waterway ship wave parameters based on convolutional neural network is characterized in that: The original image is obtained by: A camera is fixed at a location on the shore of the channel, a ruler is fixed on the shore, the camera viewing angle is parallel to the revetment, and image data samples of the ship's waves passing through the ruler are continuously collected as collected video, the frame rate of the camera is above 60fps, and the resolution is at least 1080p; The images in the captured video are extracted and saved frame by frame using editing software, and linear interpolation is used to fill in the frames until the deviation of adjacent images is less than a pre-configured threshold, and the obtained image frames are used as the original images.

3. According to claim 1, a method for identifying inland waterway ship wave parameters based on convolutional neural network is characterized in that: The step S2 comprises: Step S2-1: Perform median filtering on the original image; Step S2-2: grayscale processing; Step S2-3: perform edge detection; Step S2-4: Perform binarization processing to obtain the image to be detected.

4. According to claim 1, a method for identifying inland waterway ship wave parameters based on convolutional neural network is characterized in that: The input of the parameter recognition model is the image to be detected, and the output is the ship wave parameters; The training samples include the images to be detected and the corresponding ship wave parameters.

5. According to claim 4, a method for identifying inland waterway ship wave parameters based on convolutional neural network is characterized in that: The training samples are obtained by the following steps: Based on the continuous images to be detected, the peak and trough positions in each image to be detected are obtained respectively; The height of a ship wave is obtained by taking the difference between the positions identified by adjacent wave crests and troughs, and the wave height change sequence from the generation to the end of the ship wave is obtained based on the wave height recognition results of the continuous images to be detected; Based on the acquired wave height, read the pixel length corresponding to each wave height, analyze and obtain the proportional relationship between the actual wave height and the pixel length, read the pixel length between the wave peak and the next adjacent wave peak, and convert the pixel length into the actual length to obtain the wavelength according to the proportional relationship between the actual wave height and the pixel length; The propagation speed of the ship wave is obtained by dividing the obtained wavelength by the time interval between two adjacent peaks or troughs of the wave in the video.

6. According to claim 4, a method for identifying inland waterway ship wave parameters based on convolutional neural network is characterized in that: The parameter identification model adopts a hybrid network, which is realized by stacking two neural networks, a convolutional network and a multi-layer neural network. The convolutional network includes 2 convolutional layers, 2 CBAM attention mechanism modules, 2 pooling layers, 1 Dropout layer, and 2 fully connected layers from input to output. The multi-layer neural network includes 1 input layer, 2 hidden layers, and 1 output layer from input to output. The parameters input to the input layer are the image features of the ship wave video image. After passing through 2 hidden layers, the real-time ship wave parameter value of a certain position of the channel revetment during the ship wave propagation process is output.

7. The method for identifying inland waterway ship wave parameters based on convolutional neural network according to claim 6 is characterized in that: The size of the convolution kernel in the convolution layer is 3×3 or 5×5, and the step size is 2 or 3; the CBAM attention mechanism module is used after the convolution layer; and then it is equipped with a ReLU activation function; the pooling layer cuts the convolutional features into several areas, the pooling area is 2×2 or 3×3, the step size is 2, and the pooling operation is the maximum pooling, taking the maximum value; in order to avoid overfitting of the model, the Dropout layer makes part of the hidden neurons work and part of them do not work during the training stage of the model, and the discard ratio is set to 0.2-0.3; the fully connected layer is used to connect the image features to obtain the final image features of the ship's waves, without an activation function.

8. The method for identifying inland waterway ship wave parameters based on convolutional neural network according to claim 6 is characterized in that: The CBAM attention mechanism module includes a channel attention unit and a spatial attention unit; The channel attention unit generates channel-level attention weights through global average pooling and global maximum pooling, and then generates an attention map through a shared multi-layer perceptron. The spatial attention unit generates spatial-level attention weights by performing average pooling and maximum pooling on the feature maps output by the channel attention, and then passing them through a convolutional layer.

9. A device for identifying inland waterway ship wave parameters based on convolutional neural network, comprising a memory, a processor, and a program stored in the memory, characterized in that: When the processor executes the program, the method according to any one of claims 1 to 8 is implemented.

10. A storage medium having a program stored thereon, characterized in that: When the program is executed, the method according to any one of claims 1 to 8 is implemented.

Citation Information

Patent Citations

  • Ship traveling wave rapid automatic identification method and device based on machine learning

    CN113408401A