Underwater wireless charging platform docking bin angle and foreign matter identification method

CN118298288BActive Publication Date: 2026-09-22HARBIN ENG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410484153.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-22
Publication Date
2026-09-22
Estimated Expiration
2044-04-22

AI Technical Summary

Technical Problem

[0012]在不依赖水下传感器的情况下,本发明提出一种水下无线充电平台对接仓角度及异物识别方法,用于精准识别AUV对接时对接仓的角度及仓周异物,为工作人员做出对接方案提供一种有效的辅助工具,解决一般水下目标检测任务数据集少甚至是无、检测算法参数量大、精度差、推理速度低的问题

Benefits of technology

[0074]首先,通过改进的扩散模型对水下无线充电对接图像进行扩充,构建水下无线充电对接图像数据集,解决目标任务图像数据样本小甚至是无的问题;其次,引入可变核卷积,SE注意力机制对YOLOv8目标检测算法模型进行改进,将参数需求量大的并行解耦头修改为共享参数的串行耦合头,同时引入方向向量损失函数,增强了算法的特征提取能力,加强了算法的融合效果,减少了算法的运行参数,从而显著提升算法的检测精度、速度和泛化能力以及鲁棒性能;最后,经过训练的改进YOLOv8算法模型能够精准识别AUV对接时对接仓的角度及仓周异物。本发明提出的技术方案在保持较高准确率的同时保证了检测速度,为工作人员做出对接方案提供一种有效的辅助工具,进一步提升水下对接操作的智能化。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118298288B_ABST
    Figure CN118298288B_ABST
Patent Text Reader

Abstract

The application relates to a method for recognizing the angle of a docking bin of an underwater wireless charging platform and foreign matters, which comprises the following steps: acquiring an image during wireless charging docking to be recognized; inputting the image during wireless charging docking to be recognized into an improved YOLOv8 target detection algorithm model to obtain a detection result of the docking bin angle and foreign matters around the bin, wherein the improved YOLOv8 target detection algorithm model is obtained by training a training set, the training set comprises an image data set during wireless charging docking and corresponding labels, the improved YOLOv8 network model introduces variable kernel convolution in the feature extraction process, reweights feature channels through an SE attention mechanism, performs detection and recognition based on a coupling head of a one-way serial shared parameter, and introduces a direction vector loss function for feature extraction. The application solves the problems of few data sets for general underwater target detection tasks, large detection algorithm parameter quantity, poor precision and low reasoning speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of underwater target detection technology, and in particular to a method for identifying the docking compartment angle and foreign objects on an underwater wireless charging platform. Background Technology

[0002] With the increasing depletion of land resources, humanity has gradually turned its attention to the ocean, seeking new avenues for resource development. Autonomous Underwater Vehicles (AUVs), as an efficient and controllable tool for marine resource development, have been widely used. However, due to size limitations, AUVs have limited energy storage capacity, resulting in insufficient endurance to meet practical operational needs.

[0003] To address the endurance issues of AUVs and cope with the complexities of the marine environment, underwater wireless charging technology has emerged as the preferred solution for AUV power replenishment. This technology provides AUVs with continuous power in a non-contact manner, thereby extending their operating time at sea.

[0004] However, the key to achieving underwater wireless charging lies in the effective docking of the AUV with the underwater wireless charging platform. The angle detection of the docking chamber plays a crucial role in this process, affecting not only the accuracy and stability of the docking but also the power transmission efficiency. Incorrect docking angles can lead to obstructed or failed power transmission, thus impacting the AUV's operational performance.

[0005] In addition to the above, foreign object detection around the docking chamber is another key to achieving efficient underwater wireless charging. Any foreign object can obstruct the transmission of electrical energy and reduce charging efficiency. Therefore, ensuring a clean and unobstructed environment around the chamber is crucial for the smooth operation of underwater wireless charging.

[0006] In existing technologies, angle sensors, in order to cope with underwater working environments, not only need to solve conventional problems such as insulation, sealing, and material corrosion resistance, but also face challenges such as high underwater resistance, complex disassembly and assembly, inability to adapt to high water pressure environments, and manual adjustment. There are two common approaches: the first is to use a pressure-resistant structure for encapsulation, but this method can lead to data distortion or sensor damage in high-depth water pressure environments, resulting in data deviations in practical applications; the second is to use an additional oil-filled cable for pressure compensation. This method can indeed cope with high-depth water pressure environments, but it requires the sensor body and the oil-filled cable to be an integrated structure, which not only increases manufacturing costs but also greatly limits the sensor's replacement, disassembly, and repair.

[0007] Regarding object detection technology, commonly used algorithms are based on deep learning. Currently, the mainstream approaches are single-stage (represented by the YOLO series) and two-stage (represented by Fast-RCNN), primarily applied to terrestrial tasks. Research on underwater object detection based on deep learning faces significant challenges. Researchers typically choose classic general-purpose object detection networks as the main framework, fine-tuning them according to specific task requirements for various underwater detection tasks. Current challenges in using deep learning for underwater object detection include:

[0008] (1) Data sets are scarce. The underwater environment is more complex than the terrestrial environment, including various factors such as water flow, water pressure, visibility, and temperature. Acquiring underwater images is expensive and difficult, and most of the publicly available underwater datasets are marine biological datasets, which cannot be used for specific engineering tasks.

[0009] (2) The algorithm has high complexity. Due to the varying shapes of underwater targets, researchers increase the number of parameters to improve the accuracy of the detection algorithm, which reduces the algorithm's reasoning speed and makes it difficult to achieve the requirements of fast and accurate identification and positioning.

[0010] (3) Poor generalization ability. Due to the diversity of underwater environments, trained underwater target detection algorithms may not be able to adapt well to different underwater detection tasks. In order to better complete specific underwater detection tasks, it is necessary to adjust and optimize the algorithm according to specific requirements.

[0011] Therefore, optimizing the algorithm structure, improving inference speed, reducing recognition errors, and enhancing generalization ability are key issues that current research urgently needs to address in complex underwater environments. Summary of the Invention

[0012] Without relying on underwater sensors, this invention proposes a method for identifying the angle of the docking compartment and foreign objects in an underwater wireless charging platform. This method is used to accurately identify the angle of the docking compartment and foreign objects around it during AUV docking, providing an effective auxiliary tool for personnel to formulate docking plans. It solves the problems of limited or even non-existent datasets, large number of detection algorithm parameters, poor accuracy, and low inference speed in general underwater target detection tasks.

[0013] To achieve the above objectives, the present invention provides the following solution:

[0014] A method for determining the docking compartment angle and identifying foreign objects on an underwater wireless charging platform, comprising:

[0015] Acquire images of the wireless charging docking process to be identified;

[0016] The image of the wireless charging docking to be identified is input into the improved YOLOv8 target detection algorithm model to obtain the detection results of the docking compartment angle and foreign objects around the compartment. The improved YOLOv8 target detection algorithm model is trained using a training set, which includes an image dataset containing wireless charging docking and corresponding labels. The improved YOLOv8 network model introduces variable kernel convolution during feature extraction, reweights the feature channels through the SE attention mechanism, performs detection and identification based on a coupling head with one serial shared parameter, and introduces a direction vector loss function for feature extraction.

[0017] Optionally, when constructing the image dataset containing wireless charging docking, a diffusion model is used for expansion, the diffusion model including:

[0018] The forward diffusion module is used to obtain the noise applied at each step through reparameterized sampling, set a target time step, apply noise to the original image in the dataset, and obtain the original image after applying noise; apply noise to the original image after applying noise, obtain a new original image after applying noise, repeat the application of noise until the target time step is reached, and obtain a noise superimposed sample.

[0019] The reverse diffusion module is used to use the noise applied at each step as a training label to denoise the noise superimposed sample, obtain the denoised noise superimposed sample, denoise the denoised noise superimposed sample, obtain a new denoised noise superimposed sample, repeat the denoising process until the target time step is reached, and obtain the denoised sample.

[0020] The self-attention mechanism module is used to enhance the feature selection capability in the denoising process, selecting the features most relevant to the target being restored.

[0021] Alternatively, the method for applying noise is as follows:

[0022]

[0023] Where, α i β i This indicates that at step i, the previous image x... i-1 With the noise z added in this step i For this step image x i The influence weight value, where T is the time step.

[0024] Optionally, the improved YOLOv8 object detection algorithm model includes:

[0025] The feature extraction module is used to extract features from the initial image;

[0026] The feature fusion module is used to fuse the extracted features;

[0027] The detection module is used to detect the fused features based on a coupling head with one serial shared parameter, and to obtain the detection results of the docking compartment angle and foreign objects around the compartment.

[0028] Optionally, the feature extraction module includes:

[0029] The first CBS submodule is used to extract features from the initial image and obtain the first extracted features;

[0030] The second CBS submodule is used to extract features from the first extracted features to obtain the second extracted features;

[0031] The first C2f-AK submodule is used to keep the size of the second extracted feature unchanged, while performing feature extraction on the second extracted feature to obtain the third extracted feature;

[0032] The third CBS submodule is used to extract features from the third extracted features to obtain the fourth extracted features;

[0033] The second C2f-AK submodule is used to keep the size of the fourth extracted feature unchanged, and at the same time perform feature extraction on the fourth extracted feature to obtain the fifth extracted feature, namely extracted feature T1;

[0034] The fourth CBS submodule is used to extract features from the fifth extracted features to obtain the sixth extracted features;

[0035] The third C2f-AK submodule is used to keep the size of the sixth extracted feature unchanged, and at the same time perform feature extraction on the sixth extracted feature to obtain the seventh extracted feature, namely extracted feature T2;

[0036] The fifth CBS submodule is used to extract features from the seventh extracted features to obtain the eighth extracted features;

[0037] The fourth C2f-AK submodule is used to keep the size of the eighth extracted feature unchanged, and at the same time perform feature extraction on the eighth extracted feature to obtain the ninth extracted feature;

[0038] The SPPF submodule is used to perform pooling at different scales on the ninth extracted feature, and to fuse features of the same feature map but different scales to obtain the tenth extracted feature, namely extracted feature T3.

[0039] Optionally, the feature fusion module includes:

[0040] The first upsampling layer is used to upsample the extracted feature T3;

[0041] The first fusion layer is used to fuse the upsampled extracted feature T3 and the extracted feature T2 to obtain extracted feature T4.

[0042] The fifth C2f-AK submodule is used to keep the size of the extracted feature T4 unchanged, and at the same time perform feature extraction on the extracted feature T4 to obtain the extracted feature T5;

[0043] The second upsampling layer is used to upsample the extracted feature T5;

[0044] The second fusion layer is used to fuse the upsampled extracted feature T5 and the extracted feature T1 to obtain extracted feature T6.

[0045] The sixth C2f-AK submodule is used to keep the size of the extracted feature T6 unchanged, while performing feature extraction on the extracted feature T6;

[0046] The first SE attention mechanism submodule is used to reweight the feature channels and focus attention on the docking region of the extracted feature T6 after feature extraction to obtain the extracted feature T7.

[0047] The sixth CBS submodule is used to extract features from feature T7;

[0048] The third fusion layer is used to fuse the extracted feature T5 and the extracted feature T7 after feature extraction to obtain the extracted feature T8.

[0049] The seventh C2f-AK submodule is used to keep the size of the extracted feature T8 unchanged, while performing feature extraction on the extracted feature T8;

[0050] The second SE attention mechanism submodule is used to reweight the feature channels and focus attention on the docking region of the extracted feature T8 after feature extraction to obtain the extracted feature T9.

[0051] The seventh CBS submodule is used to extract features from feature T9;

[0052] The fourth fusion layer is used to fuse the extracted feature T3 and the extracted feature T9 to obtain the extracted feature T. 10 ;

[0053] The eighth C2f-AK submodule is used to maintain the extracted feature T 10 The size remains unchanged, while the extracted feature T 10 Perform feature extraction;

[0054] The third SE attention mechanism submodule is used to reweight the feature channels, focusing attention on the extracted feature T after feature extraction.10 In the docking area, extract feature T. 11 .

[0055] Optionally, the detection module includes:

[0056] The eighth CBS submodule is used to extract features from feature T7;

[0057] The ninth CBS submodule is used to reduce the number of channels and scale the feature map of the extracted feature T7 after feature extraction to obtain the final extracted feature T7.

[0058] The first ordinary convolutional submodule is used to detect and recognize the final extracted feature T7 to obtain the first result feature image, thereby performing small target detection.

[0059] The tenth CBS submodule is used to extract features from feature T9;

[0060] The eleventh CBS submodule is used to reduce the number of channels and scale the feature map of the extracted feature T9 after feature extraction to obtain the final extracted feature T9.

[0061] The second ordinary convolutional submodule is used to detect and recognize the final extracted feature T9 to obtain the second result feature image, thereby performing mid-target detection.

[0062] The twelfth CBS submodule is used to extract feature T. 11 Perform feature extraction;

[0063] The thirteenth CBS submodule is used to extract feature T after feature extraction. 11 Dimensionality reduction of the number of channels and scaling of the feature map are performed to obtain the final extracted feature T. 11 ;

[0064] The third ordinary convolutional submodule is used to process the final extracted features T. 11 The detection and recognition process is performed to obtain the third result feature image, thereby enabling large target detection.

[0065] Optionally, introducing variable kernel convolution during feature extraction includes:

[0066] By introducing variable kernel convolution, an offset is obtained. Based on the offset, the sampling position of the irregular convolution kernel is adjusted, and feature extraction is performed based on the adjusted irregular convolution kernel.

[0067] Optionally, reweighting the feature channels through the SE attention mechanism includes: outputting the reweighted output after reweighting each feature channel.

[0068] Alternatively, the method of introducing a direction vector loss function for feature extraction is as follows:

[0069] LOSS dve =λ1LOSS dveh +λ2LOSS dvec

[0070]

[0071]

[0072] Among them, LOSS dve For direction vector loss, LOSS dveh LOSS represents the top loss of the direction vector. dvec S represents the terminal loss of the direction vector. 2 Indicates that the feature map contains S 2 A small grid, l obj Indicates whether the small cell contains a docking compartment, h X , h represents the x-coordinate of the center point of the predicted and labeled docking warehouse surfaces, respectively. y , c represents the ordinate of the center point of the predicted and labeled docking warehouse surface, respectively. X , c represents the x-coordinate of the predicted and labeled center point of the docking compartment, respectively. y , λ1 and λ2 represent the ordinates of the center point of the predicted and labeled docking bays, respectively, and represent the weight values ​​of the top loss and the end loss, respectively.

[0073] The beneficial effects of this invention are as follows:

[0074] First, an improved diffusion model is used to expand underwater wireless charging docking images, constructing an underwater wireless charging docking image dataset to address the problem of small or even non-existent target task image data samples. Second, variable kernel convolution and SE attention mechanisms are introduced to improve the YOLOv8 target detection algorithm model. The parallel decoupling head with high parameter requirements is modified into a serial coupling head with shared parameters. Simultaneously, a direction vector loss function is introduced to enhance the algorithm's feature extraction capability, strengthen the fusion effect, and reduce the algorithm's operating parameters, thereby significantly improving the algorithm's detection accuracy, speed, generalization ability, and robustness. Finally, the trained improved YOLOv8 algorithm model can accurately identify the angle of the docking compartment and foreign objects around the compartment during AUV docking. The technical solution proposed in this invention maintains high accuracy while ensuring detection speed, providing an effective auxiliary tool for personnel to formulate docking plans and further enhancing the intelligence of underwater docking operations. Attached Figure Description

[0075] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0076] Figure 1 This is a flowchart of a method for determining the angle of the docking compartment and identifying foreign objects on an underwater wireless charging platform according to an embodiment of the present invention.

[0077] Figure 2 This is a schematic diagram of the improved diffusion model structure according to an embodiment of the present invention;

[0078] Figure 3 This is a schematic diagram of the improved YOLOv8 target detection algorithm model structure according to an embodiment of the present invention;

[0079] Figure 4 This is a schematic diagram of the C2f-AK module structure according to an embodiment of the present invention;

[0080] Figure 5 This is a schematic diagram of the SPPF module structure according to an embodiment of the present invention;

[0081] Figure 6 This is a schematic diagram of the SE attention mechanism structure according to an embodiment of the present invention;

[0082] Figure 7 This is a schematic diagram of the CBS module structure according to an embodiment of the present invention;

[0083] Figure 8 This is a schematic diagram of a variable kernel convolution structure according to an embodiment of the present invention;

[0084] Figure 9 This is a schematic diagram of the bottleneck module structure according to an embodiment of the present invention;

[0085] Figure 10 This is a schematic diagram of the platform structure according to an embodiment of the present invention;

[0086] Figure 11 This is a preliminary result diagram of an embodiment of the present invention;

[0087] Figure 12 This is a denoising result diagram of the diffusion model in an embodiment of the present invention; wherein, Figure 12 (a) is a denoised image of a certain step in the docking warehouse scenario. Figure 12 (b) is the denoised image of the docking warehouse scene. Figure 12 (c) is a denoised image of a certain step in the platform scene. Figure 12 (d) is the completed denoising image of the platform scene. Detailed Implementation

[0088] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0089] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0090] This invention discloses a method for identifying the docking compartment angle and foreign objects in an underwater wireless charging platform. The method includes: acquiring an image of the wireless charging docking process to be identified; inputting the image of the wireless charging docking process to be identified into an improved YOLOv8 target detection algorithm model to obtain the detection results of the docking compartment angle and foreign objects around the compartment. The improved YOLOv8 target detection algorithm model is trained using a training set, which includes an image dataset containing images of the wireless charging docking process and corresponding labels. The improved YOLOv8 network model introduces variable kernel convolution during feature extraction, reweights feature channels through an SE attention mechanism, performs detection and identification based on a single serially shared parameter coupling head, and simultaneously introduces a direction vector loss function for feature extraction.

[0091] Obtain the initial image dataset: By operating the camera mounted on the underwater wireless charging platform, video of the wireless charging docking process is collected in the deep sea environment, which serves as the initial image dataset for subsequent processing;

[0092] When constructing the image dataset containing wireless charging docking, a diffusion model is used for expansion. The diffusion model includes: a forward diffusion module, which is used to obtain the noise applied at each step through reparameterized sampling, set a target time step, apply noise to the original images in the dataset, and obtain the original image after noise application; apply noise to the original image after noise application, obtain the new original image after noise application, and repeat the noise application until the target time step is reached to obtain a noise-stacked sample; a backward diffusion module, which uses the noise applied at each step as training labels, denoises the noise-stacked sample, obtains the denoised noise-stacked sample, denoises the denoised noise-stacked sample, obtains the new denoised noise-stacked sample, and repeats the denoising process until the target time step is reached to obtain a denoised sample; and a self-attention mechanism module, which is used to enhance the feature selection ability in the denoising process, selecting the features most relevant to the restoration target, specifically:

[0093] Constructing the target task dataset: Images are extracted frame by frame from the acquired video to form the initial image dataset. An improved diffusion model is then used to expand the initial image dataset. Labels are created on the expanded dataset using annotation software, and it is divided into training, validation, and test sets according to a specific ratio.

[0094] Obtaining denoised samples involves: selecting initial images, setting target time steps, running an improved diffusion model, and obtaining images after the forward denoising and reverse denoising processes. These images are used to supplement the dataset.

[0095] The improved diffusion model includes two processes: forward diffusion and backward diffusion. In the forward process, x0 represents the original image, and after T steps of noise superposition, samples x1, x2, ..., x3 are obtained. T During the reverse process, the real noise generated at each forward diffusion step is recorded as a training label for reverse reasoning denoising, and a self-attention mechanism is introduced during the denoising process.

[0096] The improved YOLOv8 object detection algorithm model includes: a feature extraction module for extracting features from the initial image; a feature fusion module for fusing the extracted features; and a detection module for detecting the fused features based on a coupling head with one serial shared parameter, obtaining the detection results of the docking compartment angle and foreign objects around the compartment, specifically:

[0097] An improved YOLOv8 object detection algorithm model was built. Variable kernel convolution (AKconv) and SE attention mechanism (Squeeze and Excitation Attention) were introduced, and the decoupled head of the two parallel outputs was modified into a coupled head with shared parameters, thus improving the YOLOv8 algorithm model.

[0098] The improved YOLOv8 object detection algorithm model includes a feature extraction module, a feature fusion module, and a detection module. The feature extraction module has 10 layers: layers 1, 2, 4, 6, and 8 are CBS modules, layers 3, 5, 7, and 9 are C2f-AK modules, and layer 10 is an SPPF module. Features at different scales are extracted in layers 5, 7, and 10 as inputs to the feature fusion module. The outputs of layers 5, 7, and 10 are extracted feature T1, extracted feature T2, and extracted feature T3, respectively.

[0099] The feature extraction module includes: a first CBS submodule, used to extract features from the initial image to obtain a first extracted feature; a second CBS submodule, used to extract features from the first extracted feature to obtain a second extracted feature; a first C2f-AK submodule, used to keep the size of the second extracted feature unchanged while extracting features from the second extracted feature to obtain a third extracted feature; a third CBS submodule, used to extract features from the third extracted feature to obtain a fourth extracted feature; a second C2f-AK submodule, used to keep the size of the fourth extracted feature unchanged while extracting features from the fourth extracted feature to obtain a fifth extracted feature, i.e., extracted feature T1; and a fourth CBS submodule, used to... The fifth extracted feature is used to extract features to obtain the sixth extracted feature; the third C2f-AK submodule is used to keep the size of the sixth extracted feature unchanged while extracting features from the sixth extracted feature to obtain the seventh extracted feature, i.e., extracted feature T2; the fifth CBS submodule is used to extract features from the seventh extracted feature to obtain the eighth extracted feature; the fourth C2f-AK submodule is used to keep the size of the eighth extracted feature unchanged while extracting features from the eighth extracted feature to obtain the ninth extracted feature; the SPPF submodule is used to perform pooling at different scales on the ninth extracted feature, fusing features of the same feature map but different scales to obtain the tenth extracted feature, i.e., extracted feature T3.

[0100] The feature fusion module includes: a first upsampling layer for upsampling extracted feature T3; a first fusion layer for fusing the upsampled extracted feature T3 and extracted feature T2 to obtain extracted feature T4; a fifth C2f-AK submodule for keeping the size of extracted feature T4 unchanged while extracting features from extracted feature T4 to obtain extracted feature T5; a second upsampling layer for upsampling extracted feature T5; a second fusion layer for fusing the upsampled extracted feature T5 and extracted feature T1 to obtain extracted feature T6; a sixth C2f-AK submodule for keeping the size of extracted feature T6 unchanged while extracting features from extracted feature T6; and a first SE attention mechanism submodule for reweighting the feature channels and focusing attention on the features. The first submodule extracts the docking region of extracted feature T6 after feature extraction, and obtains extracted feature T7; the sixth CBS submodule is used to extract features from extracted feature T7; the third fusion layer is used to fuse extracted feature T5 and extracted feature T7 to obtain extracted feature T8; the seventh C2f-AK submodule is used to keep the size of extracted feature T8 unchanged while extracting features from extracted feature T8; the second SE attention mechanism submodule is used to reweight the feature channels and focus attention on the docking region of extracted feature T8 to obtain extracted feature T9; the seventh CBS submodule is used to extract features from extracted feature T9; the fourth fusion layer is used to fuse extracted feature T3 and extracted feature T9 to obtain extracted feature T9. 10 The eighth C2f-AK submodule is used to preserve the extracted features T. 10 The size remains unchanged, while the extracted feature T 10 Feature extraction is performed; the third SE attention mechanism submodule is used to reweight the feature channels, focusing attention on the extracted feature T after feature extraction. 10 In the docking area, extract feature T. 11 Specifically:

[0101] The feature fusion module is divided into a feature scale upsampling path and a feature scale downsampling path. The feature scale upsampling path has 6 layers: layers 1 and 4 are upsampling layers, layers 2 and 5 are fusion layers, and layers 3 and 6 are C2f-AK modules. The feature scale downsampling path has 9 layers: layers 1, 5, and 9 are SE attention mechanisms, layers 2 and 6 are CBS modules, layers 3 and 7 are fusion layers, and layers 4 and 8 are C2f-AK modules.

[0102] The feature fusion module processes as follows: Feature T3 is upsampled and then fused with Feature T2 at a fusion layer to obtain Enhanced Feature T4. Enhanced Feature T4 is then processed by the C2f-AK module to obtain Enhanced Feature T5. Enhanced Feature T5 is again upsampled and then fused with Feature T1 at a fusion layer to obtain Enhanced Feature T6. Enhanced Feature T6 is then processed by the C2f-AK module and the SE attention mechanism to obtain Enhanced Feature T7. Enhanced Feature T7 is then fused with Enhanced Feature T5 at a CBS module to obtain Enhanced Feature T8. Enhanced Feature T8 is then processed by the C2f-AK module and the SE attention mechanism to obtain Enhanced Feature T9. Enhanced Feature T9 is then fused with Enhanced Feature T3 at a CBS module to obtain Enhanced Feature T1. 10 Enhanced feature T 10 After passing through the C2f-AK module and the SE attention mechanism, the enhanced features T are obtained. 11 Ultimately, this will enhance feature T7, feature T9, and feature T... 11 As the output of the feature fusion module.

[0103] The detection module includes: an eighth CBS submodule for feature extraction of extracted feature T7; a ninth CBS submodule for reducing the number of channels and scaling the feature map of extracted feature T7 to obtain the final extracted feature T7; a first ordinary convolution submodule for detection and recognition of the final extracted feature T7 to obtain the first result feature image, thereby performing small target detection; a tenth CBS submodule for feature extraction of extracted feature T9; an eleventh CBS submodule for reducing the number of channels and scaling the feature map of extracted feature T9 to obtain the final extracted feature T9; a second ordinary convolution submodule for detection and recognition of the final extracted feature T9 to obtain the second result feature image, thereby performing medium target detection; and a twelfth CBS submodule for feature extraction of extracted feature T9. 11 Feature extraction is performed; the thirteenth CBS submodule is used to extract feature T after feature extraction. 11 Dimensionality reduction of the number of channels and scaling of the feature map are performed to obtain the final extracted feature T. 11 The third ordinary convolutional submodule is used to process the final extracted features T. 11 Detection and recognition are performed to obtain the third-result feature image, thereby enabling large target detection, specifically as follows:

[0104] The detection module includes three identical coupling heads with different output scales. The reason for modifying the two parallel output decoupling heads into a single serial coupling head with shared parameters is that the task only involves two categories of detection, a relatively small number, thus reducing the number of algorithm parameters. Enhancement features T7, T9, and T... 11The data is input into three coupling heads for detection and identification.

[0105] Introducing variable kernel convolution during feature extraction involves: obtaining an offset by introducing a variable kernel convolution; adjusting the sampling position of the irregular convolution kernel based on the offset; and performing feature extraction based on the adjusted irregular convolution kernel. Specifically:

[0106] The C2f-AK module of the improved YOLOv8 object detection algorithm model is the same. The C2f-AK module includes three branches. The first branch consists of a first variable kernel convolution and a split module. The second branch consists of a first variable kernel convolution, a split module, and a bottleneck module. The third branch consists of a variable kernel convolution, a split module, and two repeated bottleneck modules. The three branches are fused together, and the output is obtained by feature integration by the second variable kernel convolution module of the last layer. The split module passed through in the first, second, and third branches is the same. The bottleneck module in the second branch becomes the first bottleneck module in the third branch.

[0107] The SPPF module consists of four branches: the first branch is composed of the CBS1 module; the second branch is composed of the CBS1 module and the first max pooling layer; the third branch is composed of the CBS1 module, the first max pooling layer, and the second max pooling layer; and the fourth branch is composed of the CBS1 module, the first max pooling layer, the second max pooling layer, and the third max pooling layer. The four branches are then merged, and the final output is obtained by feature integration by the CBS2 module.

[0108] The feature channels are reweighted using the SE attention mechanism, which includes re-weighting the output after re-assigning the weights to each feature channel. Specifically:

[0109] The SE attention mechanism consists of two branches. The first branch is composed of a CBS module, and the second branch is composed of a CBS module, a global average pooling layer, a first fully connected layer, a ReLU activation function, a second fully connected layer, and a Sigmoid activation function. The output is obtained by reweighting and redistributing the weights of each feature channel.

[0110] The CBS module consists of a regular convolution (Conv), a normalization module, and a SiLU activation function. Conv is used to extract features, the normalization module is used to accelerate convergence, and the SiLU activation function introduces nonlinearity to improve model accuracy and robustness.

[0111] Global average pooling layer: Compresses the feature map containing global information W×H×C into a 1×1×C feature vector, turning each two-dimensional channel into a value with a global receptive field. At this time, 1 pixel represents 1 channel, masking spatial distribution information and making better use of the correlation between channels.

[0112] The first fully connected layer converts the C channels into C / r, reducing the number of parameters.

[0113] ReLU activation function: makes the features non-linear.

[0114] The second fully connected layer restores the number of feature channels to C, keeping it consistent with the number of input channels.

[0115] Sigmoid activation function: (1) It introduces more nonlinearity, which can better fit the complex correlation between channels; (2) The value range is between 0 and 1, which can obtain weight parameters normalized between 0 and 1. Then, by weighting each channel onto the feature map, useful information tends to be more 1, while useless information tends to be more 0, resulting in the final feature map with attention weights.

[0116] Specifically, the CBS1 and CBS2 modules have the same structure as the CBS module. The CBS module consists of a regular convolution (Conv), a normalized module, and a SiLU activation function.

[0117] Specifically, the first variable kernel convolution and the second variable kernel convolution have the same structure. Both variable kernel convolutions consist of a regular convolution, a learned offset, a resample layer, a reshape layer, and a CBS module.

[0118] Specifically, the bottleneck module consists of two stacked CBS modules with a residual connection added between the input and output, while the feature fusion module uses a bottleneck module without residual connections.

[0119] Furthermore, the coupling head has a branch with serially shared parameters, each consisting of two CBS modules and a regular convolution, and finally outputs a feature map responsible for predicting bounding boxes, angles, and categories.

[0120] Construct the algorithm loss function. Introduce the orientation vector loss function to predict angle information. The total loss function of the improved YOLOv8 object detection algorithm model includes three parts: localization loss, orientation vector loss, and classification loss, ultimately resulting in the improved YOLOv8 algorithm model.

[0121] The loss function is divided into three parts: localization loss, orientation vector loss, and classification loss. The calculation formula is shown in equation (1):

[0122] LOSS=μ1·LOSS Bbox +μ2·LOSS dve +μ3·LOSS cls (1)

[0123] Among them, LOSS Bbox To locate the loss, LOSS dve For direction vector loss, LOSS cls For classification loss, μ1, μ2, and μ3 represent the weights of localization loss, orientation vector loss, and classification loss, respectively.

[0124] Specifically, the location loss function LOSS Bbox The calculation formula is shown in equation (2):

[0125]

[0126] in:

[0127]

[0128]

[0129]

[0130] Where IOU represents the ratio of the intersection area to the union area of ​​the two rectangles, namely the predicted bounding box A and the label box B (i.e., the label), also known as the intersection-union ratio. gt Let A and B represent the center points of the predicted bounding box and the labeled bounding box, respectively. Let ρ represent the Euclidean distance between the center points of the two rectangles, A and B. Let c represent the diagonal distance of the smallest closure region that can simultaneously contain both A and B. Let v represent the similarity of the aspect ratios of the two rectangles, A and B. Let α be the influence weight of v. Let w represent the width of the predicted bounding box and h represent the height of the predicted bounding box. gt h represents the width of the annotation box. gt Indicates the height of the label box.

[0131] Specifically, the direction vector is defined as the direction with the center point of the docking warehouse surface as the top and the center point of the docking warehouse as the bottom, and its loss function is LOSS. dve The calculation formula is shown in equation (3).

[0132] LOSS dve =λ1LOSS dveh +λ2LOSS dvec (3)

[0133] in:

[0134]

[0135]

[0136] Among them, LOSS dveh LOSS represents the top loss of the direction vector.dvec The loss represents the terminal loss of the direction vector. In the output of the detection module, the feature maps of different scales are divided into S×S small grids, where S... 2 Indicates that the feature map contains S 2 A small grid, because it only detects the angle of the docking compartment, l obj This indicates whether the small cell contains a docking compartment; if it does, it is set to 1, otherwise to 0. X , h represents the x-coordinate of the center point of the predicted and labeled docking warehouse surfaces, respectively. y , c represents the ordinate of the center point of the predicted and labeled docking warehouse surface, respectively. X , c represents the x-coordinate of the predicted and labeled center point of the docking compartment, respectively. y , λ1 and λ2 represent the ordinates of the center point of the predicted and labeled docking bays, respectively, and represent the weight values ​​of the top loss and the end loss, respectively.

[0137] Specifically, for the classification loss function LOSS cls The binary cross-entropy loss function is used for calculation, and its calculation formula is shown in equation (4):

[0138]

[0139] Among them, y i This represents the category information in the label information of the dataset, where i represents the i-th category, and p i This indicates that the category information output by the detection module is the probability value of class i, and n represents the total number of categories.

[0140] Training the improved YOLOv8 object detection algorithm model: The improved YOLOv8 object detection algorithm model is trained using the training set in the target task dataset constructed in step S2. At the same time, the operation of turning off Mosaic data augmentation is carried out in the last 20 epochs, which can effectively improve the accuracy and obtain the corresponding optimal weights.

[0141] Loading optimal weights to obtain detection results: Inputting the images from the test set into the improved YOLOv8 object detection algorithm model for detection, using Non-Maximum Suppression (NMS) to eliminate redundant prediction boxes, and obtaining detection results for docking warehouse angle and foreign objects around the warehouse.

[0142] To make the technical method of the present invention clearer, it will be further described below in conjunction with the embodiments and accompanying drawings.

[0143] like Figure 1 As shown, this invention provides a method for determining the docking compartment angle and identifying foreign objects on an underwater wireless charging platform, specifically including the following steps:

[0144] S1, Obtain the initial image dataset. By operating a camera mounted on an underwater wireless charging platform, video footage of the wireless charging docking process is captured in a deep-sea environment, serving as the initial image dataset for subsequent processing.

[0145] S2, Construct the target task dataset. Extract images frame-by-frame from the acquired video to form the initial image dataset. Expand the initial image dataset using an improved diffusion model. Label the expanded dataset using annotation software and divide it into training, validation, and test sets according to a specific ratio.

[0146] In this embodiment, 380 images were extracted frame by frame from the acquired video as the initial image dataset. Each image was expanded by 3 images to obtain a total of 1520 expanded image data. The images were labeled using Labelimg software, with the following label format: category, x and y coordinates of the target center, width and height of the target bounding box, x and y coordinates of the center point of the docking compartment surface, and x and y coordinates of the center point of the docking compartment. The dataset was made in YOLO format and divided into training, validation, and test sets in a 7:2:1 ratio, i.e., 1064 images in the training set, 304 images in the validation set, and 152 images in the test set.

[0147] like Figure 2 As shown, the improved diffusion model consists of two processes: forward diffusion and backward diffusion. The forward process is the noise addition process, which can be regarded as a Markov process. x0 represents the original image, and after T steps of noise superposition, samples x1, x2, ..., x3 are obtained. T The noise z applied in each step i It is obtained by reparameterizing sampling from a Gaussian distribution, i.e., z i ~N(0,1), i=1,2…T, reparameter sampling is performed to enable gradient propagation, in the forward process of image x i Only with the previous image x i-1 The following equation applies:

[0148]

[0149] β i =1-α i

[0150] Where, α i β i This indicates that at step i, the previous image x... i-1 With the noise z added in this step i For this step image xi The influence weight value is determined by the assumption that the initial noise weight is relatively small compared to the previous image, and that its weight gradually increases with each time step, i.e., α. i Gradually decrease, β i Gradually increase. In this embodiment, β is taken as... i The variation range is 0.0001-0.002, and the time step T is 200.

[0151] The reverse process is the denoising process, in which each step of the forward diffusion is reparameterized and sampled to obtain the true noise record z. i Next, as training labels for reverse reasoning denoising, the U-net neural network is used to denoise z at each step. i In addition to predicting the '', this invention introduces a self-attention mechanism to enhance the model's feature selection ability during the denoising process. Through this mechanism, the model can adaptively focus on the correlation between different pixels and automatically adjust the feature weights, thereby selecting the features most relevant to the restoration target.

[0152] S3. An improved YOLOv8 object detection algorithm model was built. Variable kernel convolution and SE attention mechanisms were introduced, and the decoupling head of the two parallel outputs was modified into a single coupled head with shared parameters, thus improving the YOLOv8 algorithm model.

[0153] like Figure 3 As shown, the improved YOLOv8 object detection algorithm model includes a feature extraction module, a feature fusion module, and a detection module.

[0154] The feature extraction module consists of 10 layers: layers 1, 2, 4, 6, and 8 are CBS modules; layers 3, 5, 7, and 9 are C2f-AK modules; and layer 10 is an SPPF module. The CBS module extracts features from the input through convolutional operations, achieving scale reduction and channel expansion. A normalization module normalizes the output of the convolutional layers, improving the algorithm's convergence and generalization ability. The SiLU activation function is then used for nonlinear transformation, enhancing the algorithm's nonlinear expressive power. The C2f-AK module further extracts features from the input without changing the feature map size, helping to capture more detailed information while maintaining spatial resolution, thus enhancing feature representation. The SPPF module fuses multi-scale features by pooling the input feature map at different scales, combining features from the same feature map at different scales to improve the algorithm's effective feature extraction capability.

[0155] In this embodiment, the input image size is 640×640×3 (length×width×number of channels). Therefore, the size of the output extracted feature T1 of the 5th layer is 80×80×128, the scale of the output extracted feature T2 of the 7th layer is 40×40×256, and the scale of the output extracted feature T3 of the 10th layer is 20×20×256.

[0156] The feature fusion module is divided into a feature scale upsampling path and a feature scale downsampling path. The feature scale upsampling path has 6 layers: layers 1 and 4 are upsampling layers, layers 2 and 5 are fusion layers, and layers 3 and 6 are C2f-AK modules. The feature scale downsampling path has 9 layers: layers 1, 5, and 9 are SE attention mechanisms, layers 2 and 6 are CBS modules, layers 3 and 7 are fusion layers, and layers 4 and 8 are C2f-AK modules.

[0157] The feature fusion module processes the following steps: Extracted feature T3 (20×20×256) is upsampled and then fused with extracted feature T2 (40×40×256) at a fusion layer to obtain enhanced feature T4 (40×40×512). Enhanced feature T4 is then processed by the C2f-AK module to obtain enhanced feature T5 (40×40×256). Enhanced feature T5 is then upsampled again and fused with extracted feature T1 (80×80×128) at a fusion layer to obtain enhanced feature T6 (80×80×128). Enhanced feature T6 (80×80×128) is obtained by passing through the C2f-AK module and the SE attention mechanism. Enhanced feature T7 is then fused with enhanced feature T5 after passing through the CBS module to obtain enhanced feature T8 (40×40×384). Enhanced feature T8 is then passed through the C2f-AK module and the SE attention mechanism to obtain enhanced feature T9 (40×40×256). Enhanced feature T9 is then fused with enhanced feature extraction feature T3 after passing through the CBS module to obtain enhanced feature T1 (80×80×128). 10 (20×20×512), Enhanced Feature T 10 After passing through the C2f-AK module and the SE attention mechanism, the enhanced features T are obtained. 11 (20×20×256), ultimately enhancing features T7, T9, and T at different scales. 11 As the output of the feature fusion module;

[0158] The detection module comprises three identical coupling heads with different output scales, each consisting of two CBS modules and a regular convolution. The reason for modifying the two-way parallel output decoupling head into a single-way serial coupling head with shared parameters is that the task involves only two classes of detection, a relatively small number, thus reducing the number of algorithm parameters. Enhancement features T7, T9, and T...11 The data is input into three coupling heads for detection and recognition, and the output feature map is responsible for predicting the bounding box, angle, and category.

[0159] The C2f-AK modules in this embodiment all have the same structure, such as Figure 4 As shown, the algorithm consists of a first variable kernel convolution, a second variable kernel convolution, a splitting module, and a bottleneck module. It includes three branches: the first branch consists of the first variable kernel convolution and a splitting module; the second branch consists of the first variable kernel convolution, a splitting module, and a bottleneck module; and the third branch consists of a variable kernel convolution, a splitting module, and two repeated bottleneck modules. These three branches are fused, with the final output being the feature integration performed by the second variable kernel convolution module in the last layer. The splitting module used in branches 1, 2, and 3 is the same, and the bottleneck module in the second branch also serves as the first bottleneck module in the third branch. Compared to ordinary convolution and deformable convolution, variable kernel convolution allows the convolution kernel to have arbitrary parameters, enabling it to adjust its size and shape according to actual needs. For convolution kernels of different sizes, the sampling position of irregular convolution kernels is adjusted by learning offsets, further enhancing its flexibility in processing underwater targets of various sizes, thereby improving the accuracy of feature extraction. The splitting module divides the feature map into different channels, reducing parameter computation while allowing the algorithm to better capture features at different scales. The bottleneck module reduces the number of input channels, thereby reducing the number of parameters in the algorithm.

[0160] The SPPF module in this embodiment is as follows: Figure 5 As shown, it consists of a CBS1 module, a CBS2 module, a first max-pooling layer, a second max-pooling layer, a third max-pooling layer, and a fusion layer. It includes four branches: the first branch consists of the CBS1 module; the second branch consists of the CBS1 module and the first max-pooling layer; the third branch consists of the CBS1 module, the first max-pooling layer, and the second max-pooling layer; and the fourth branch consists of the CBS1 module, the first max-pooling layer, the second max-pooling layer, and the third max-pooling layer. These four branches are fused, and the final CBS2 module performs feature integration as the output. Using three consecutive pooling operations reduces computational cost and combines the outputs of each layer, ensuring multi-scale fusion while further increasing the receptive field.

[0161] In this embodiment, the SE attention mechanism adaptively learns the importance of each channel and reweights each channel according to its importance, focusing more attention on the docking area in the image and ignoring irrelevant information, thereby improving the accuracy and robustness of the algorithm. Its structure is as follows: Figure 6As shown, it includes two branches. The first branch consists of a CBS module, and the second branch consists of a CBS module, a global average pooling layer, a first fully connected layer, a ReLU activation function, a second fully connected layer, and a Sigmoid activation function. The output is obtained by reweighting and redistributing the weights of each feature channel.

[0162] The CBS1 and CBS2 modules have the same structure as the CBS module, such as... Figure 7 As shown, it consists of ordinary convolution (Conv), normalized modules, and the SiLU activation function.

[0163] The first variable kernel convolution and the second variable kernel convolution have the same structure, such as Figure 8 As shown, it consists of ordinary convolution, learned offset, resample layer, reshape layer and CBS module.

[0164] Bottleneck module structure as follows Figure 9 As shown, it consists of two stacked CBS modules with a residual connection added between the input and output. When the bottleneck module is used in the feature fusion module, a bottleneck module without residual connection is used.

[0165] S4. Construct the algorithm loss function. Introduce the orientation vector loss function to predict angle information. The total loss function of the improved YOLOv8 object detection algorithm model includes three parts: localization loss, orientation vector loss, and classification loss, ultimately resulting in the improved YOLOv8 algorithm model.

[0166] The loss function in this embodiment consists of three parts: localization loss, orientation vector loss, and classification loss. The calculation formulas are as follows:

[0167] LOSS=μ1·LOSS Bbox +μ2·LOSS dve +μ3·LOSS cls

[0168] Among them, LOSS Bbox To locate the loss, LOSS dve For direction vector loss, LOSS cls For classification loss, μ1, μ2, and μ3 represent the weights of localization loss, orientation vector loss, and classification loss, respectively.

[0169] Specifically, the location loss function LOSS Bbox The calculation formula is as follows:

[0170]

[0171] in:

[0172]

[0173]

[0174]

[0175] Where IOU represents the ratio of the intersection area to the union area of ​​the two rectangles, namely the predicted bounding box A and the label box B (i.e., the label), also known as the intersection-union ratio. gt Let A and B represent the center points of the predicted bounding box and the labeled bounding box, respectively. Let ρ represent the Euclidean distance between the center points of the two rectangles, A and B. Let c represent the diagonal distance of the smallest closure region that can simultaneously contain both predicted bounding box A and labeled bounding box B. Let v represent the similarity of the aspect ratios of the two rectangles, A and B. Let α be the influence weight of v.

[0176] Specifically, the direction vector is defined as the direction with the top left corner of the detection box as the apex and the center point of the detection box as the end point, and its loss function is LOSS. dve The calculation formula is as follows:

[0177] LOSS dve =λ1LOSS dveh +λ2LOSS dvec

[0178] in:

[0179]

[0180]

[0181] Among them, LOSS dveh LOSS represents the top loss of the direction vector. dvec The loss represents the terminal loss of the direction vector. In the output of the detection module, the feature maps of different scales are divided into S×S small grids, where S... 2 Indicates that the feature map contains S 2 A small grid, because it only detects the angle of the docking compartment, l obj This indicates whether the small cell contains a docking compartment; if it does, it is set to 1, otherwise to 0. X , h represents the x-coordinate of the center point of the predicted and labeled docking warehouse surfaces, respectively. y , c represents the ordinate of the center point of the predicted and labeled docking warehouse surface, respectively. X , c represents the x-coordinate of the predicted and labeled center point of the docking compartment, respectively. y , λ1 and λ2 represent the ordinates of the center point of the predicted and labeled docking bays, respectively, and represent the weight values ​​of the top loss and the end loss, respectively.

[0182] Specifically, for the classification loss function LOSS cls The binary cross-entropy loss function is used for calculation, and its formula is as follows:

[0183]

[0184] Among them, y i This represents the category information in the label information of the dataset, where i represents the i-th category, and p i The output of the detection module indicates the probability value of class i, and n represents the total number of classes. In this embodiment, there are two classes: docking compartment and foreign object, so n is 2.

[0185] S5, Train the improved YOLOv8 object detection algorithm model. The network is trained using the training set from the target task dataset constructed in step S2. Simultaneously, disabling Mosaic data augmentation in the last 20 epochs effectively improves accuracy and yields the optimal weights.

[0186] This embodiment sets up a training environment on a Windows 11 operating system, specifically with an Intel(R) Core(TM) i5-8300H CPU 2.30GHz, an NVIDIA GeForce GTX 2060 GPU, CUDA version 11.31, PyTorch 1.11.0 as the machine learning framework, and Python 3.8 as the runtime environment. The training parameters are configured as follows: using the Adam optimizer, a batch size of 16, an initial learning rate of 0.01, and a total of 300 epochs.

[0187] S6: Load the optimal weights and obtain the detection results. Input the images from the test set into the improved YOLOv8 object detection algorithm model for detection, and obtain the detection results of the docking compartment's angle and the surrounding environment.

[0188] like Figure 10-11 As shown, this embodiment uses Non-Maximum Suppression (NMS) to remove predicted bounding boxes with overlap rates higher than a set value and confidence rates lower than a set value. The overlap rate is set at 0.45, and the confidence rate is set at 0.6. The output detection results provide information such as the target's category and location coordinates. The formula is then used to... Where arctan is the arctangent function, h y h represents the ordinate of the predicted center point of the docking bay surface. xc represents the x-coordinate of the predicted center point of the docking bay surface. y c represents the ordinate of the predicted center point of the docking bay. x The x-coordinate of the predicted center point of the docking compartment is used to obtain the angle of the docking compartment, thus completing the identification of the docking compartment angle and surrounding foreign objects for the underwater wireless charging platform. Figure 12 (a)-(d).

[0189] The embodiments described above are merely preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Various modifications and improvements made to the technical solutions of the present invention by those skilled in the art without departing from the spirit of the present invention should fall within the protection scope defined by the claims of the present invention.

Claims

1. A method for determining the angle of the docking compartment and identifying foreign objects on an underwater wireless charging platform, characterized in that... include: Acquire images of the wireless charging docking process to be identified; The image of the wireless charging docking to be identified is input into the improved YOLOv8 target detection algorithm model to obtain the detection results of the docking compartment angle and foreign objects around the compartment. The improved YOLOv8 target detection algorithm model is trained using a training set, which includes an image dataset containing wireless charging docking and corresponding labels. The improved YOLOv8 network model introduces variable kernel convolution during feature extraction, reweights the feature channels through the SE attention mechanism, performs detection and identification based on a coupling head with one serial shared parameter, and introduces a direction vector loss function for feature extraction. When constructing the image dataset containing wireless charging docking, a diffusion model is used for expansion. The diffusion model includes: The forward diffusion module is used to obtain the noise applied at each step through reparameterized sampling, set a target time step, apply noise to the original image in the dataset, and obtain the original image after applying noise; apply noise to the original image after applying noise, obtain a new original image after applying noise, repeat the application of noise until the target time step is reached, and obtain a noise superimposed sample. The reverse diffusion module is used to use the noise applied at each step as a training label to denoise the noise superimposed sample, obtain the denoised noise superimposed sample, denoise the denoised noise superimposed sample, obtain a new denoised noise superimposed sample, repeat the denoising process until the target time step is reached, and obtain the denoised sample. The self-attention mechanism module is used to enhance the feature selection capability in the denoising process, selecting the features most relevant to the target being restored. The method of feature extraction by introducing the direction vector loss function is as follows: in, For direction vector loss, Represents the loss at the top of the direction vector. This represents the terminal loss of the direction vector. Indicates that the feature map contains A small square, Indicates whether the small compartment contains a docking compartment. These represent the x-coordinates of the center point of the predicted and labeled docking warehouse surfaces, respectively. These represent the ordinates of the predicted and labeled center points of the docking warehouse surfaces, respectively. These represent the x-coordinates of the predicted and labeled center points of the docking bay, respectively. These represent the ordinates of the predicted and labeled center points of the docking bay, respectively. These represent the weight values ​​of the top loss and the bottom loss, respectively.

2. The underwater wireless charging platform docking compartment angle and foreign object identification method according to claim 1, characterized in that, The method of applying noise is as follows: in, This indicates that at step i, the image from the previous step... With the noise added in this step For this step image The influence weight value, where T is the time step.

3. The underwater wireless charging platform docking compartment angle and foreign object identification method according to claim 1, characterized in that, The improved YOLOv8 object detection algorithm model includes: The feature extraction module is used to extract features from the initial image; The feature fusion module is used to fuse the extracted features; The detection module is used to detect the fused features based on a coupling head with one serial shared parameter, and to obtain the detection results of the docking compartment angle and foreign objects around the compartment.

4. The underwater wireless charging platform docking compartment angle and foreign object identification method according to claim 3, characterized in that, The feature extraction module includes: The first CBS submodule is used to extract features from the initial image and obtain the first extracted features; The second CBS submodule is used to extract features from the first extracted features to obtain the second extracted features; The first C2f-AK submodule is used to keep the size of the second extracted feature unchanged, while performing feature extraction on the second extracted feature to obtain the third extracted feature; The third CBS submodule is used to extract features from the third extracted features to obtain the fourth extracted features; The second C2f-AK submodule is used to keep the size of the fourth extracted feature unchanged, and at the same time perform feature extraction on the fourth extracted feature to obtain the fifth extracted feature, namely extracted feature T1; The fourth CBS submodule is used to extract features from the fifth extracted features to obtain the sixth extracted features; The third C2f-AK submodule is used to keep the size of the sixth extracted feature unchanged, and at the same time perform feature extraction on the sixth extracted feature to obtain the seventh extracted feature, namely extracted feature T2; The fifth CBS submodule is used to extract features from the seventh extracted features to obtain the eighth extracted features; The fourth C2f-AK submodule is used to keep the size of the eighth extracted feature unchanged, and at the same time perform feature extraction on the eighth extracted feature to obtain the ninth extracted feature; The SPPF submodule is used to perform pooling at different scales on the ninth extracted feature, and to fuse features of the same feature map but different scales to obtain the tenth extracted feature, namely extracted feature T3.

5. The underwater wireless charging platform docking compartment angle and foreign object identification method according to claim 4, characterized in that, The feature fusion module includes: The first upsampling layer is used to upsample the extracted feature T3; The first fusion layer is used to fuse the upsampled extracted feature T3 and the extracted feature T2 to obtain extracted feature T4. The fifth C2f-AK submodule is used to keep the size of the extracted feature T4 unchanged, and at the same time perform feature extraction on the extracted feature T4 to obtain the extracted feature T5; The second upsampling layer is used to upsample the extracted feature T5; The second fusion layer is used to fuse the upsampled extracted feature T5 and the extracted feature T1 to obtain extracted feature T6. The sixth C2f-AK submodule is used to keep the size of the extracted feature T6 unchanged, while performing feature extraction on the extracted feature T6; The first SE attention mechanism submodule is used to reweight the feature channels and focus attention on the docking region of the extracted feature T6 after feature extraction to obtain the extracted feature T7. The sixth CBS submodule is used to extract features from feature T7; The third fusion layer is used to fuse the extracted feature T5 and the extracted feature T7 after feature extraction to obtain the extracted feature T8. The seventh C2f-AK submodule is used to keep the size of the extracted feature T8 unchanged, while performing feature extraction on the extracted feature T8; The second SE attention mechanism submodule is used to reweight the feature channels and focus attention on the docking region of the extracted feature T8 after feature extraction to obtain the extracted feature T9. The seventh CBS submodule is used to extract features from feature T9; The fourth fusion layer is used to fuse the extracted feature T3 and the extracted feature T9 after feature extraction to obtain the extracted feature T10; The eighth C2f-AK submodule is used to keep the size of the extracted feature T10 unchanged, while performing feature extraction on the extracted feature T10; The third SE attention mechanism submodule is used to reweight the feature channels and focus attention on the docking region of the extracted feature T10 after feature extraction to obtain the extracted feature T11.

6. The underwater wireless charging platform docking compartment angle and foreign object identification method according to claim 3, characterized in that, The detection module includes: The eighth CBS submodule is used to extract features from feature T7; The ninth CBS submodule is used to reduce the number of channels and scale the feature map of the extracted feature T7 after feature extraction to obtain the final extracted feature T7. The first ordinary convolutional submodule is used to detect and recognize the final extracted feature T7 to obtain the first result feature image, thereby performing small target detection. The tenth CBS submodule is used to extract features from feature T9; The eleventh CBS submodule is used to reduce the number of channels and scale the feature map of the extracted feature T9 after feature extraction to obtain the final extracted feature T9. The second ordinary convolutional submodule is used to detect and recognize the final extracted feature T9 to obtain the second result feature image, thereby performing mid-target detection. The twelfth CBS submodule is used for feature extraction from feature T11; The thirteenth CBS submodule is used to reduce the number of channels and scale the feature map of the extracted feature T11 after feature extraction to obtain the final extracted feature T11. The third ordinary convolutional submodule is used to detect and recognize the final extracted features T11, obtain the third result feature image, and thus perform large target detection.

7. The underwater wireless charging platform docking compartment angle and foreign object identification method according to claim 1, characterized in that, Introducing variable kernel convolution during feature extraction includes: By introducing variable kernel convolution, an offset is obtained. Based on the offset, the sampling position of the irregular convolution kernel is adjusted, and feature extraction is performed based on the adjusted irregular convolution kernel.

8. The underwater wireless charging platform docking compartment angle and foreign object identification method according to claim 1, characterized in that, The feature channels are reweighted using the SE attention mechanism, which includes reweighting each feature channel and then outputting the result.

Citation Information

Patent Citations

  • Falling person target detection method based on optimized YOLOv8s network structure

    CN116863539A

  • Intelligent detection method and unmanned surface vehicle for multiple type faults of near-water bridges

    US20230351573A1