Coarse positioning method and system for oil tank filling port of autonomous filling arm

Through the improved PS-Net model, combined with edge, hybrid and global attention mechanisms, the problem of low positioning accuracy of the fuel tank filling port is solved, achieving high-precision filling port detection in complex environments, reducing light interference and parking Effects of location changes.

CN118674780APending Publication Date: 2024-09-20JIANGSU UNIV OF SCI & TECH
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202410729479.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-06
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

In a complex environment, the positioning accuracy of the fuel tank filling port is low, and there are problems such as light interference, feature loss and misdetection, resulting in inaccurate oil loading and unloading by the autonomous filling arm.

Method used

The improved PS-Net model is used to integrate the edge attention mechanism, hybrid coordinate attention mechanism and global attention mechanism, combined with the IOULoss loss function, to extract the detailed features and semantic features of the filling port, enhance the ability to suppress interference features, and improve The accuracy of positioning of the filling port by the model.

Benefits of technology

It effectively improves the positioning accuracy of the filling port, reduces the impact of light interference and parking position changes on positioning, reduces the probability of false detection, and enhances the model's ability to distinguish the characteristics of the filling port.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118674780A
    Figure CN118674780A
Patent Text Reader

Abstract

The invention discloses an oil tank filling port coarse positioning method and system of an autonomous filling arm, the method comprises filling port target detection and filling port coordinate extraction, and the filling port target detection comprises: constructing an oil tank filling port data set; designing an edge attention mechanism module; designing a mixed coordinate attention mechanism module; designing a global attention mechanism module; an IOULoss loss function is added, and the improved progressive selection network model is trained and tested; detecting the filling port by using the trained model; wherein the filling port coordinate extraction comprises the step of extracting the contour of a filling port in a detection result; the shape of the filler is similar to a polygon; performing convex hull calculation on the boundary contour point set; and obtaining the minimum circumcircle and the center coordinate of the filling port. According to the scheme, high-precision detection of the filling port target in the refueling scene is facilitated, then the positioning precision of the filling port is improved, and technical support is provided for daily safe and efficient oil loading and unloading of the autonomous filling arm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of machine vision technology, relates to a target positioning technology based on deep learning, and specifically relates to a method and system for coarse positioning of a fuel tank filling port of an autonomous filling arm. Background Art

[0002] In recent years, with the rapid development of economy and society, the demand for oil has been increasing, and the efficient and safe loading and unloading of oil has received much attention. The automated loading and unloading of oil by autonomous filling arms has become a trend, which not only reduces the intensity of staff, but also improves work efficiency and saves costs.

[0003] The premise for the autonomous filling arm to achieve efficient and safe automatic loading and unloading of oil is the accurate positioning of the filling port in the fuel tank. When a vehicle enters the refueling site for operation, there is a certain distance between the vehicle parking position and the fuel dispenser, and there will be other facilities in the fuel tank, making it difficult for the system to directly and accurately locate the filling port target, which is prone to missed detection and false detection, and ultimately causes unnecessary economic losses. For this reason, in the task of positioning the filling port of the fuel tank, the coarse positioning method of the filling port was first studied. The filling port was detected and roughly positioned with the help of an industrial camera, so that the autonomous filling arm was moved to the vicinity of the filling port. Then, based on the coarse positioning, the filling port was precisely positioned with the help of a depth camera at the end of the autonomous filling arm, reducing the probability of missed detection and false detection of the system, and ensuring the accuracy of the final filling port positioning and the safety of the loading and unloading process. The coarse positioning of the filling port of the fuel tank requires accurate detection of the filling port target and determination of the filling port position coordinates based on the detection results. Traditional detection methods identify and segment suspected areas based on the texture, shape and other features of the filling port, and can only detect in specific environments. Therefore, the detection methods have the shortcomings of low generalization performance, weak anti-interference ability, and low target detection accuracy.

[0004] In recent years, the target detection method based on deep learning has shown obvious advantages in target recognition in complex environments, which has attracted great attention and has been tried in target detection research. Compared with traditional detection methods, it has significantly improved detection accuracy and generalization performance. Although the existing algorithm can complete the detection of fuel tank filling ports to a certain extent, there are still challenges such as unclear boundaries, feature loss, and false detection for detection tasks in scenes with light interference and different docking positions, which leads to large errors in the subsequent positioning of the filling port. How to improve the positioning accuracy of the filling port in complex environments is still a technical difficulty. Summary of the invention

[0005] Purpose of the invention: The method and system for roughly locating the fuel tank filling port of an autonomous filling arm of the present invention improve the model's ability to distinguish the filling port features, so that the network can better reduce the impact of complex interference on the positioning of the filling port and improve the positioning accuracy of the filling port.

[0006] Technical solution: A method for roughly locating a fuel tank filling port of an autonomous filling arm of the present invention includes two stages: fuel tank filling port target detection and fuel tank filling port coordinate extraction; wherein, the fuel tank filling port target detection includes:

[0007] Construct a fuel tank filler port dataset and divide the dataset into a training set and a test set;

[0008] Based on the PS-Net model, the edge attention mechanism module is integrated. The edge attention mechanism module is used to extract the detailed features of the filling port from the low-level features.

[0009] Based on the PS-Net model, a hybrid coordinate attention mechanism module is integrated to enhance the extraction of semantic features of the filling port.

[0010] Based on the PS-Net model, the global attention mechanism module is integrated. The global attention mechanism module is used to improve the model's ability to suppress similar interference features, forming an improved PS-Net model based on the edge attention mechanism module, the hybrid coordinate attention mechanism module, and the global attention mechanism module.

[0011] The IOULoss loss function is introduced, and the improved PS-Net model is trained using the training set to obtain the fuel tank filling port target detection model. The fuel tank filling port target detection model is tested using the test set, and the performance of the fuel tank filling port target detection model is evaluated.

[0012] The fuel tank filling port target detection model is used to detect the fuel tank filling port target and obtain the target area and contour of the filling port;

[0013] The tank filling port coordinate extraction includes:

[0014] Use the contour detection function findContours in opencv to detect the contour of the fuel tank filling port target;

[0015] According to the filling port contour information, the Douglas-Peucker algorithm is used to perform polygonal approximation fitting on the filling port shape.

[0016] After polygonal approximation fitting of the filling port contour, the convexHull function in opencv is used to obtain the convex hull of the boundary contour point set;

[0017] According to the convex hull of the boundary contour point set, the contour fitting function minEnclosingCircle in OpenCV is used to obtain the minimum circumscribed circle and center coordinates of the filling port.

[0018] Furthermore, the edge attention mechanism module uses the outputs of Conv1-2 and Conv2-2 of the main parts of the PS-Net model as the input of the edge attention mechanism module, and obtains clear edge detail features through 3×3 convolution and feature addition and multiplication fusion operations.

[0019] Furthermore, the edge attention mechanism module uses the outputs of Conv1-2 and Conv2-2 of the main part of the PS-Net model as the input of the edge attention mechanism module, and obtains clear edge detail features through 3×3 convolution and feature addition and multiplication fusion operations, including:

[0020] For the output f1 and f2 of the Conv1-2 and Conv2-2 layers in the backbone of the PS-Net model, a series of convolution operations are used to purify them to obtain the features f'1 and f'2. The processing process is as follows:

[0021] f i '=ReLu(BN(Conv(f i ))),i=1,2

[0022] In the formula, Conv is a 3×3 convolution operation; BN is normalization; ReLu is the activation function;

[0023] By adaptively learning different focus points in features f'1 and f'2, the selective weighted feature w is obtained. The processing process is as follows:

[0024] w=f1'×f2'

[0025] The selective weighted feature w and the purified features f'1 and f'2 are subjected to convolution and feature fusion operations to obtain the filling port detail feature f e , the processing process is as follows:

[0026] f e =ReLu(BN(Conv(f1'+w)))+ReLu(BN(Conv(f2'+w))).

[0027] Furthermore, the hybrid coordinate attention mechanism module adds maximum pooling in the horizontal and vertical directions to the structure of the coordinate attention mechanism, and adopts a feature addition fusion method to fuse local information and global information in the horizontal and vertical directions.

[0028] Furthermore, the hybrid coordinate attention mechanism module adds maximum pooling in the horizontal and vertical directions to the structure of the coordinate attention mechanism, and adopts a feature addition fusion method to fuse the local information in the horizontal and vertical directions with the global information, including:

[0029] Using pooling kernels of size (H, 1) and (1, W), average pooling operations are performed in the horizontal and vertical directions to aggregate the input features into two one-dimensional direction-aware features, namely The processing process is as follows:

[0030]

[0031] In the formula, represents the output feature of the cth channel with height h; x c (h,i) represents the i-th row feature vector of the input c-th channel; represents the output feature of the cth channel with height w; x c (j,w) represents the j-th column feature vector of the input c-th channel;

[0032] The maximum pooling operation is used in the horizontal and vertical directions to aggregate the input features into two one-dimensional direction-aware features, namely The processing process is as follows:

[0033]

[0034] By encoding the spatial information, the local information and global information in the horizontal and vertical directions are fused by adding features, and a series of splicing and fusion operations are performed on information in different directions to obtain the feature f. The processing process is as follows:

[0035] f=ReLu(BN(Conv(Concate(((Z h +z h ),(Z w +z w ))))))

[0036] In the formula, Concate represents the concatenation operation; Z h , Z w They are respectively represented as the output of the input features in the horizontal and vertical directions after average pooling; z h 、z w They are respectively represented as the output of the input features in the horizontal and vertical directions after maximum pooling;

[0037] The encoded features are converted into attention in two different directions, namely g h , g w , the processing process is as follows:

[0038]

[0039] In the formula, Split represents the channel splitting operation;

[0040] Focus on h, g w The fusion operation of multiplication with the input feature is used to obtain the output feature y. The processing process is as follows:

[0041]

[0042] In the formula, x c (i,j) represents the features of the input c-th channel; Represent the attention in the horizontal and vertical directions of the c-th channel respectively.

[0043] Furthermore, the global attention mechanism module is used to improve the model's ability to suppress similar interference features, including:

[0044] For the semantic features f in the high-level p Use block maximum pooling and average pooling to obtain global information f a , the processing process is as follows:

[0045] f a =AvgPool(MaxPool(f p ))

[0046] In the formula, AvgPool is the average pooling operation, and MaxPool is the block pooling operation;

[0047] By adopting the fusion method of activation function and feature multiplication, the important features in the global information are mapped to the input features to obtain the feature f b , the processing process is as follows:

[0048] f b =Sigmoid(f a )×f p

[0049] In the formula, Sigmoid is the activation function.

[0050] Furthermore, the IOULoss loss function is introduced to optimize the model training results by calculating the intersection-over-union loss between the saliency map generated by the improved PS-Net model and the label.

[0051] Furthermore, the intersection-over-union loss between the saliency map generated by the improved PS-Net model and the label is calculated as follows:

[0052]

[0053] Where W represents the pixels in the width direction of the image; H represents the pixels in the height direction of the image; P is the saliency map output by the model; G is the label; P ij is the probability that the predicted image pixel (i, j) belongs to the salient area; G ijis the value of the label pixel (i, j).

[0054] Furthermore, when the performance of the fuel tank filling port target detection model is evaluated, the mean absolute error MAE, meanE-m, maxE-m, adpE-m, meanF-m, maxF-m, adpF-m, and precision-recall rate PR are used as evaluation indicators to verify the accuracy of the fuel tank filling port target detection model.

[0055] Based on the same inventive concept, a fuel tank filling port rough positioning system of an autonomous filling arm of the present invention comprises a fuel tank filling port target detection module and a fuel tank filling port coordinate extraction module; wherein the fuel tank filling port target detection module comprises:

[0056] A data acquisition module is used to construct a fuel tank filling port data set and divide the data set into a training set and a test set;

[0057] An edge attention mechanism module is used to integrate the edge attention mechanism module based on the PS-Net model. The edge attention mechanism module is used to extract the detailed features of the filling port from the low-level features;

[0058] A hybrid coordinate attention mechanism module is used to integrate the hybrid coordinate attention mechanism module based on the PS-Net model. The hybrid coordinate attention mechanism module is used to enhance the extraction of semantic features of the filling port;

[0059] The global attention mechanism module is used to integrate the global attention mechanism module based on the PS-Net model. The global attention mechanism module is used to improve the model's ability to suppress similar interference features, forming an improved PS-Net model based on the edge attention mechanism module, the hybrid coordinate attention mechanism module, and the global attention mechanism module;

[0060] The model training and testing module is used to introduce the IOU Loss loss function and use the training set to train the improved PS-Net model to obtain the fuel tank filling port target detection model, use the test set to test the fuel tank filling port target detection model, and evaluate the performance of the fuel tank filling port target detection model;

[0061] A fuel tank filling port target detection module is used to detect the fuel tank filling port target using the fuel tank filling port target detection model to obtain the target area and contour of the filling port;

[0062] The fuel tank filling port coordinate extraction module includes:

[0063] The filling port contour detection module is used to detect the filling port contour in the fuel tank filling port target using the contour detection function findContours in opencv;

[0064] A filling port shape fitting module is used to perform polygonal approximate fitting of the filling port shape based on the filling port contour information using the Douglas-Peucker algorithm;

[0065] The convex hull acquisition module is used to perform polygonal approximation fitting on the filling port contour and then use the convexHull function in opencv to obtain the convex hull of the boundary contour point set;

[0066] The filling port positioning module is used to obtain the minimum circumscribed circle and center coordinates of the filling port based on the convex hull of the boundary contour point set and the contour fitting function minEnclosingCircle in opencv.

[0067] Beneficial effects: Compared with the prior art, the technical solution of the present invention has the following beneficial effects:

[0068] The edge attention mechanism module proposed in the present invention improves the model's ability to extract edge features, effectively alleviates the phenomenon of blurred and inaccurate edge features of the filling port caused by light changes, and enables the model to better locate the filling port with the help of edge features.

[0069] The hybrid coordinate attention mechanism module proposed in the present invention increases the model's attention to small features in the target area, effectively avoiding the problem of feature loss caused by the model's inability to detect small filling port features due to overexposure, and enables the model to have a strong ability to comprehensively capture the filling port features, thereby improving the accuracy of filling port positioning.

[0070] The global attention mechanism module proposed in the present invention enhances the model's ability to distinguish similar interference features, effectively reduces the impact of similar color and feature interference caused by the vehicle's parking position on the detection results, reduces the model's false detection probability, and further improves the model's positioning accuracy for the filling port.

[0071] The present invention improves the model's ability to distinguish filling port features, thereby enabling the network to better reduce the impact of complex interference on the filling port positioning and improve the filling port positioning accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1 It is a general flow chart of a method for roughly locating a fuel tank filling port of an autonomous filling arm disclosed in an embodiment of the present invention;

[0073] Figure 2 is a schematic diagram of a vehicle refueling scenario disclosed in an embodiment of the present invention;

[0074] Figure 3 It is a principle structure diagram of an edge attention mechanism module disclosed in an embodiment of the present invention;

[0075] Figure 4 It is a test comparison diagram before and after adding the edge attention mechanism module disclosed in the embodiment of the present invention;

[0076] Figure 5 It is a principle structure diagram of a hybrid coordinate attention mechanism module disclosed in an embodiment of the present invention;

[0077] Figure 6 It is a test comparison diagram before and after adding the hybrid coordinate attention mechanism module disclosed in the embodiment of the present invention;

[0078] Figure 7 It is a principle structure diagram of a global attention mechanism module disclosed in an embodiment of the present invention;

[0079] Figure 8 This is a test comparison diagram before and after adding the global attention mechanism module disclosed in the embodiment of the present invention;

[0080] Fig. 9 is a structural schematic diagram of a fuel tank filling port target detection model disclosed in an embodiment of the present invention;

[0081] Fig.10 Performance comparison chart of the model of the present invention and other models;

[0082] Fig.11 It is a structural schematic diagram of a tank filling port rough positioning system of an autonomous filling arm disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0083] The technical solution of the present invention is described in detail below in conjunction with specific implementation methods and the accompanying drawings of the specification.

[0084] Example 1

[0085] like Figure 2 As shown, the vehicle refueling scene includes a fuel tank filling port 1, an industrial camera 2 for coarse positioning of the filling port 1, and a depth camera 4 located at the end of an autonomous filling arm 3 for fine positioning of the filling port 1. The industrial camera 2 is used to perform coarse positioning of the filling port 1.

[0086] like Figure 1 As shown, a method for roughly locating the fuel tank filling port of an autonomous filling arm of the present invention includes two stages: fuel tank filling port target detection and fuel tank filling port coordinate extraction. The specific steps are as follows:

[0087] S1, fuel tank filling port target detection, specifically including the following steps:

[0088] S1.1. Construct a fuel tank filling port dataset and divide the dataset into a training set and a test set.

[0089] In this embodiment, in the construction of the fuel tank filling port data set, the filling port image data is obtained through the constructed fuel tank, and the image acquisition uses an industrial camera, specifically using the following steps:

[0090] S1.1.1. Collect image data of the filling port under different arrangement of parts, different lighting conditions, and different shooting angles;

[0091] S1.1.2. Label the filling port image data to obtain the true label, and then divide the image data into a training set and a test set according to a 6:4 ratio.

[0092] S1.2. Based on the PS-Net (Progressive Selection Network) model, an edge attention mechanism module is integrated. The edge attention mechanism module is used to extract the detailed features of the filling port from the low-level features.

[0093] There are many vehicles that need to complete loading and unloading tasks in a day. Due to the constant change in light intensity during the day, the contrast in the images collected by industrial camera 2 at certain times is low, which reduces the difference between the filling port 1 and the surrounding environment, making it difficult for the network model to capture the edge information of the filling port 1 and unable to locate its boundary, which ultimately affects the positioning accuracy of the filling port 1. The edge of the filling port 1 belongs to detail information, and the detail information comes from low-level features. The PS-Net model uses the VGG16 network in the backbone part to extract features at different levels, and uses the self-attention mechanism module to extract detail information after the feature f2 extracted by Conv2_2. Since f2 is obtained by further compression and extraction based on the f1 feature extracted by Conv1_2, although the interference information contained in the feature is reduced, the edge information of the filling port 1, which was originally unclear, is lost more seriously in this process, which is not conducive to the model using edge information to locate the filling port 1. Although f1 includes a lot of detail information, there is also a lot of interference information. If the detail information is directly extracted through it, a lot of background interference will be introduced. Therefore, by effectively utilizing f1 and f2, more edge information of the filling port 1 can be obtained with less background interference. To this end, the present invention designs an edge attention mechanism module.

[0094] like Figure 3 As shown, in this embodiment, the edge attention mechanism module uses the output of Conv1-2 and Conv2-2 of the main part of the PS-Net model as the input of the edge attention mechanism module, and obtains clear edge detail features through 3×3 convolution and feature addition and multiplication fusion operations. The specific steps are as follows:

[0095] S1.2.1. For the output f1 and f2 of the Conv1-2 and Conv2-2 layers in the backbone of the PS-Net model, a series of convolution operations are used to purify them to obtain features f'1 and f'2. The processing process is as follows:

[0096] f i '=ReLu(BN(Conv(f i ))),i=1,2

[0097] In the formula, Conv is a 3×3 convolution operation; BN is normalization; ReLu is the activation function;

[0098] S1.2.2, by adaptively learning different focus points in features f'1 and f'2, the selective weighted feature w is obtained. The processing process is as follows:

[0099] w=f1'×f2'

[0100] S1.2.3, the selective weighted feature w, the purified features f'1, f'2 are subjected to convolution and feature fusion operations to obtain the filling port detail feature f e , the processing process is as follows:

[0101] f e =ReLu(BN(Conv(f1'+w)))+ReLu(BN(Conv(f2'+w))).

[0102] By effectively fusing f1 and f2 through the edge attention mechanism module, we can obtain as much detailed information as possible, better locate the boundary of filling port 1, and improve the positioning accuracy of filling port 1. Figure 4 As shown, Figure 4 In the figure, (a) is the original image, (b) is the test result before adding, and (c) is the test result after adding. The PS-Net model that integrates the edge attention mechanism module reduces the influence of surrounding interference and obtains more accurate edge information, thereby better locating the position of the filling port 1.

[0103] S1.3. Based on the PS-Net model, a hybrid coordinate attention mechanism module is integrated. The hybrid coordinate attention mechanism module is used to enhance the extraction of semantic features of the filling port.

[0104] When the vehicle enters the gas station site to operate when the light is strong, the filling port 1 will be overexposed due to the influence of light, resulting in weakened features, making it difficult for the model to identify the features of the filling port 1, resulting in feature loss in some target areas in the detection results. In the filling port 1 positioning task, the PS-Net model uses a pyramid feature dynamic extraction module for feature extraction. When the target is large or small due to changes in the docking position, it can dynamically adjust the receptive field to detect filling port 1 targets of different sizes. However, in the face of the overexposed filling port 1 target, because its features are not obvious, and there is no structure in the module that can focus on the target position, the PS-Net model is easy to ignore the small features in the image data, so that the features of the filling port 1 cannot be effectively extracted, resulting in the loss of the features of the filling port 1. Therefore, the present invention designs a hybrid coordinate attention mechanism module, which can increase the attention to the target features while retaining the position information obtained by average pooling, avoid the loss of small features, and thus improve the model's perception of the position of the filling port 1. In this way, the position features of the filling port 1 can be captured more comprehensively, which helps to improve the performance and accuracy of the model.

[0105] like Figure 5 As shown, in this embodiment, the hybrid coordinate attention mechanism module adds horizontal and vertical maximum pooling to the structure of the coordinate attention mechanism, and adopts a feature addition fusion method to fuse the local information and global information in the horizontal and vertical directions. The specific steps are as follows:

[0106] S1.3.1, using pooling kernels of size (H, 1) and (1, W), and using average pooling operations in the horizontal and vertical directions to aggregate the input features into two one-dimensional direction-aware features, respectively The processing process is as follows:

[0107]

[0108] In the formula, represents the output feature of the cth channel with height h; x c (h,i) represents the i-th row feature vector of the input c-th channel; represents the output feature of the cth channel with height w; x c (j,w) represents the j-th column feature vector of the input c-th channel;

[0109] S1.3.2, the maximum pooling operation is used in the horizontal and vertical directions to aggregate the input features into two one-dimensional direction-aware features, respectively. The processing process is as follows:

[0110]

[0111] S1.3.3, by encoding the spatial information, the local information and global information in the horizontal and vertical directions are fused by adding features, and a series of splicing and fusion operations are performed on the information in different directions to obtain the feature f. The processing process is as follows:

[0112] f=ReLu(BN(Conv(Concate(((Z h +zh),(Z w +z w ))))))

[0113] In the formula, Concate represents the concatenation operation; Z h , Z w They are respectively represented as the output of the input features in the horizontal and vertical directions after average pooling; z h 、z w They are respectively represented as the output of the input features in the horizontal and vertical directions after maximum pooling;

[0114] S1.3.4. Convert the encoded features into attention in two different directions, namely g h , g w , the processing process is as follows:

[0115]

[0116] In the formula, Split represents the channel splitting operation;

[0117] S1.3.5. Focus on g h , g w The fusion operation of multiplication with the input feature is used to obtain the output feature y. The processing process is as follows:

[0118]

[0119] In the formula, x c (i,j) represents the features of the input c-th channel; Represent the attention in the horizontal and vertical directions of the c-th channel respectively.

[0120] It is worth noting that, in this embodiment, the feature addition fusion method aims at the fusion between the information obtained by average pooling and maximum pooling, while the feature multiplication fusion method aims at the fusion between the horizontal and vertical attention and the input features of the module.

[0121] Adding a hybrid coordinate attention mechanism to the high-level feature extraction part can help the model better locate the target position of filling port 1 and strengthen the focus on the target features, such as Figure 6 As shown, Figure 6In the figure, Figure (a) is the original image, Figure (b) is the test result before adding, and Figure (c) is the test result after adding. Due to the overexposure of the filling port 1, the feature information becomes weak, and finally the feature of the filling port 1 is lost because the feature cannot be extracted. The PS-Net model with the mixed coordinate attention mechanism reduces the impact of the overexposure phenomenon on feature extraction and obtains a more complete filling port 1 target.

[0122] S1.4. Based on the PS-Net model, the global attention mechanism module is integrated. The global attention mechanism module is used to improve the model's ability to suppress similar interference features, forming an improved PS-Net model based on the edge attention mechanism module, the hybrid coordinate attention mechanism module, and the global attention mechanism module.

[0123] After the vehicle enters the refueling site, due to the certain deviation of each stop position, the image collected by the industrial camera 2 will have feature interference with similar color and shape as the filling port 1, which brings challenges to the positioning task of the filling port 1. To ensure the positioning accuracy of the filling port 1, the model needs to suppress and remove similar interference features from the extracted features under different light and different viewing angles. For the problem of interference in the extracted features, the PS-Net model uses the spatial attention mechanism in the scale-aware fusion module to suppress interference features. Since the receptive field of the attention mechanism is limited, it only focuses on a small part of the area in the figure. However, for the distinction of similar features, a larger receptive field is required to capture more extensive contextual information, and understand the context of the features more comprehensively as a whole, so as to obtain more information to distinguish similar interference features. In view of this, the present invention designs a global attention mechanism module, and extracts global information by combining block maximum pooling and average pooling. By taking the maximum value first and then taking the average value, the influence of similar interference features is averaged, thereby reducing the importance of interference features in the entire feature map, reducing similar feature interference, and better retaining important features.

[0124] like Figure 7 As shown, in this embodiment, the global attention mechanism module is used to improve the model's ability to suppress similar interference features, including:

[0125] S1.4.1. Semantic features f in high-level p Use block maximum pooling and average pooling to obtain global information f a , the processing process is as follows:

[0126] f a =AvgPool(MaxPool(f p ))

[0127] In the formula, AvgPool is the average pooling operation, and MaxPool is the block pooling operation;

[0128] S1.4.2, by adopting the fusion method of activation function and feature multiplication, the important features in the global information are mapped to the input features to obtain the feature f b , the processing process is as follows:

[0129] f b =Sigmoid(f a )×f p

[0130] In the formula, Sigmoid is the activation function.

[0131] After using PFDE to extract the features of filling port 1, adding GAM can help the model use global information to suppress the interference of similar features and reduce the probability of false detection in the non-filling port area in the prediction map, such as Figure 8 As shown, Figure 8 In the figure, Figure (a) is the original image, Figure (b) is the test result before adding, and Figure (c) is the test result after adding. For the similar color and feature interference that appear, the global attention mechanism is used to further reduce the impact of similar interference on positioning accuracy from the global perspective.

[0132] S1.5. Introduce the IOU Loss loss function, and use the training set to train the improved PS-Net model to obtain the fuel tank filler port target detection model. Use the test set to test the fuel tank filler port target detection model, and evaluate the performance of the fuel tank filler port target detection model.

[0133] The PS-Net model uses a loss function that combines BCELoss and CELoss, focusing on pixel-level classification to determine whether each pixel belongs to a positive or negative category. The gradient information propagation of the target boundary is relatively weak, so the sensitivity to the target boundary information is low. Since the boundary information plays an important role in the positioning of the filling port 1, if the model detection result performs poorly in the boundary details, the filling port 1 cannot be accurately located. In response to the above problems, the present invention introduces the IOULoss loss function on the basis of the existing loss function. By maximizing the IOU, the model is forced to predict the boundary of the filling port 1 more accurately, thereby reducing the overlap between the filling port 1 and the background, and making the saliency map generated by the model more accurate at the boundary position. At the same time, the blurred area between the filling port 1 and the background in the saliency map is reduced, so that the saliency map expresses the outline of the salient target more clearly, and the filling port 1 is better located through the boundary information. Then the improved PS-Net model is trained and tested, and the following steps are specifically adopted:

[0134] S1.5.1. Introduce the IOULoss loss function to optimize the model training results by calculating the intersection-over-union loss between the saliency map generated by the improved PS-Net model and the label. The calculation formula is as follows:

[0135]

[0136] Where: W represents the pixels in the width direction of the image; H represents the pixels in the height direction of the image; P is the saliency map output by the model; G is the label; P ij is the probability that the predicted image pixel (i, j) belongs to the salient area; G ij is the value of the label pixel (i, j).

[0137] S1.5.2, if Fig. 9 As shown, according to the improved PS-Net model, the experimental environment and parameter configuration are carried out, as shown in Table 1;

[0138] Table 1:

[0139]

[0140]

[0141] S1.5.3. Use the training set to train the improved PS-Net model to obtain the fuel tank filling port target detection model, and use the test set to test the fuel tank filling port target detection model.

[0142] S1.5.4. Evaluate the performance of the fuel tank filler port object detection model.

[0143] In this embodiment, when evaluating the performance of the fuel tank filling port target detection model, the mean absolute error MAE, meanE-m, maxE-m, adpE-m, meanF-m, maxF-m, adpF-m, and precision-recall rate PR are used as evaluation indicators to verify the accuracy of the fuel tank filling port target detection model.

[0144] S1.6. Use the fuel tank filling port target detection model to perform fuel tank filling port target detection to obtain the filling port target area and contour. In this embodiment, the model detection result presents the filling port area as white and the background area as black, so the filling port target area and contour can be clearly obtained.

[0145] S2, extracting the coordinates of the fuel tank filling port, specifically including the following steps:

[0146] S2.1. Use the contour detection function findContours in opencv to detect the contour of the fuel tank filling port in the target obtained in step 1.6.

[0147] S2.2, according to the filling port contour information obtained in step 2.1, the Douglas-Peucker algorithm is used to perform polygonal approximation fitting on the filling port shape.

[0148] S2.3. After polygonal approximation fitting of the filling port contour, the convexHull function in opencv is used to obtain the convex hull of the boundary contour point set.

[0149] S2.4. According to the convex hull of the boundary contour point set, the contour fitting function minEnclosingCircle in OpenCV is used to obtain the minimum circumscribed circle and center coordinates of the filling port.

[0150] In order to verify the effectiveness of the rough positioning method of the fuel tank filling port of the autonomous filling arm in the present invention, the constructed filling port dataset was used for testing, and MAE, meanE-m, maxE-m, adpE-m, meanF-m, maxF-m, adpF-m and PR were used as evaluation indicators. The test results were compared with eleven models including BAPNet, BASNet, GCPANet, ICON, PiCANet, R3Net, SCRN, SINet, SUCANet, U2Net and PS-Net models. The comparative test results are shown in Table 2.

[0151] Table 2:

[0152]

[0153]

[0154] As can be seen from Table 2, BAPNet focuses on high-level features and ignores the attention to detail information and feature extraction in low-level features, resulting in a large loss of edge information of the filling port 1, which ultimately affects the detection accuracy of the filling port; BASNet lacks the ability to extract small features, so it cannot effectively extract the features of the filling port 1 affected by light. At the same time, the edge features of the filling port 1 are not effectively extracted. Finally, due to feature loss and inability to determine the boundary, the detection effect of the filling port 1 is poor; GCPANet lacks attention to edge features and extraction of detail information. The model is slightly inferior in edge detection ability for the filling port 1 features that are often affected by light, which ultimately affects the detection accuracy of the target; ICON loses The underlying features containing rich edge information are abandoned, and only the diverse feature aggregation module is used for the last four layers of features extracted from the trunk, which improves the accuracy of high-level feature extraction, but causes the loss of accuracy of the edge features of the filling port 1; PiCANet will consider the pixels around each pixel, and if there is a high degree of similarity, the area will be identified as the target area. Due to the changes in light and the docking position, the filling port features are very similar to the surrounding interference features, and there is a lack of constraints on the interference features. Finally, the interference features in the image are also identified as target features, affecting the detection accuracy of the filling port 1; R3Net is not able to distinguish the interference features of similar color and shape features around the filling port, and the residual refinement module of the network lacks the ability to distinguish the interference features. It suppresses interference information very well, and at the same time, simply upsampling the extracted features causes feature dilution, which ultimately leads to feature loss in the filling port 1 feature, reducing the detection ability of the model; the reason for the accuracy loss in the SCRN detection result is that the multiplication fusion operation used in the model cross adjustment unit will enhance the co-occurring features, while the edge features in the filling port 1 and the common parts of all the trunk features are relatively small. Therefore, the fusion through the multiplication operation cannot effectively retain the edge features of the filling port 1, and gradually dilutes the edge features; the features of the last three layers of SINet originally lack a lot of detailed information about the filling port 1, and then after the asymmetric convolution and dilated convolution in its texture enhancement module, the feature information is lost. The information is further lost, resulting in the inability to capture enough detail information when mining edge information, which ultimately affects the detection accuracy; the dilated convolution used in SUCANet will cause the loss of small features, making it impossible to effectively extract the features of the filling port 1 affected by light. At the same time, the edge information is not effectively processed, resulting in blurring and feature loss problems in the edge features of the filling port 1 in the test results, and the detection accuracy is low; U2Net does not strengthen the extraction of edge information, resulting in blurred edges of the filling port 1. At the same time, the simple upsampling operation in the fusion process will dilute the filling port 1 features. For the blurred filling port 1 features, this operation will cause the missing of the filling port 1 features, which will have a greater impact on the detection accuracy.Compared with the other eleven models, the model of the present invention has achieved the best values ​​in MAE, meanE-m, maxE-m, adpE-m, meanF-m, maxF-m and adpF-m. This is due to the design and application of the edge attention mechanism module, the hybrid coordinate attention mechanism module and the global attention mechanism module. By improving the PS-Net model, the network can better reduce the impact of complex interference on the filling port detection accuracy, thereby improving the filling port positioning accuracy.

[0155] In addition, compared with other models, the model of the present invention has better detection performance. Fig.10 As shown, the PR curve of the model of the present invention is closer to the upper right corner and can better wrap the PR curves of other algorithms, which shows that the model can reduce environmental interference to the greatest extent and detect the target of the filling port 1 as complete and clear as possible.

[0156] In order to verify the effectiveness of the structure proposed in this paper, a series of ablation experiments were conducted on the constructed fuel tank filler port dataset. The PS-Net model was used as the basic model, and the edge attention mechanism module (EAMM), hybrid coordinate attention mechanism module (HCAM) and global attention mechanism module (GAM) were added in turn for comparison. The experimental results are shown in Table III.

[0157] Table 3:

[0158]

[0159] It can be concluded from Table III that the improved PS-Net model has achieved the best values ​​in MAE, meanE-m and meanF-m indicators, further improving the model's detection performance for the filling port 1. Since the PS-Net model is sensitive to the interference caused by changes in light and docking position, directly applying the PS-Net model to the filling port coarse positioning task will lead to a decrease in the performance of various indicators. Therefore, first of all, in order to solve the problem that the contrast is reduced due to light changes, and the boundary of the filling port 1 cannot be accurately obtained, the edge attention mechanism module is used in the detail feature extraction part to suppress interference while obtaining more detail information. Compared with the original model, MAE is reduced by 6.689%, meanE-m is increased by 0.067%, and meanF-m is increased by 0.014%; secondly, in order to address the problem that the feature information is weakened due to strong light, so that the filling port 1 feature cannot be detected, and finally the feature is lost, a mixed coordinate attention mechanism module is added to increase the attention to the target position containing the filling port 1, and increase the ability to distinguish small features in the target area. To obtain more complete target features, the improved model has a reduced MAE of 14.381%, an increased meanE-m of 0.204%, and an increased meanF-m of 0.046%. Finally, considering that the different parking positions of vehicles may cause interference in the scene, affecting the final detection accuracy of the filling port 1, a global attention mechanism module is introduced. It can start from global information and understand the context feature information more comprehensively, thereby reducing the interference of useless information such as similar shapes and colors, and further improving the detection accuracy. Compared with the original model, the improved model has a reduced MAE of 23.411%, an increased meanE-m of 0.287%, and an increased meanF-m of 0.066%.

[0160] In order to more comprehensively illustrate the applicability of the proposed model in the task of rough positioning of the fuel tank filling port, a positioning experiment was carried out. The coordinates of the filling port were obtained through a series of operations such as contour extraction, polygon approximation, convex hull calculation, and minimum circumscribed circle. Then, the proposed model was compared with the filling port coordinates obtained by the BAPNet, BASNet, GCPANet, ICON, PiCANet, R3Net, SCRN, SINet, SUCANet, U2Net, and PS-Net models. The evaluation index X e , Y e , D e The comparison results are shown in Table 4.

[0161] Table 4:

[0162]

[0163] It can be seen from Table 4 that, compared with other models, the model of the present invention reduces the influence of light changes and vehicle parking positions on the positioning accuracy of the filling port 1, thereby making the filling port e , Y e , D e The positioning errors were minimized, thereby improving the positioning accuracy of the filling port.

[0164] The rough positioning method of the fuel tank filling port of the autonomous filling arm of the present invention helps to achieve high-precision detection of the filling port target in the refueling scene, thereby improving the positioning accuracy of the filling port, and providing technical support for the autonomous filling arm to load and unload fuel safely and efficiently on a daily basis.

[0165] Example 2

[0166] like Fig.11 As shown, a fuel tank filling port rough positioning system of an autonomous filling arm of the present invention includes a fuel tank filling port target detection module and a fuel tank filling port coordinate extraction module; wherein the fuel tank filling port target detection module includes:

[0167] A data acquisition module is used to construct a fuel tank filling port data set and divide the data set into a training set and a test set;

[0168] An edge attention mechanism module is used to integrate the edge attention mechanism module based on the PS-Net model. The edge attention mechanism module is used to extract the detailed features of the filling port from the low-level features;

[0169] A hybrid coordinate attention mechanism module is used to integrate the hybrid coordinate attention mechanism module based on the PS-Net model. The hybrid coordinate attention mechanism module is used to enhance the extraction of semantic features of the filling port;

[0170] The global attention mechanism module is used to integrate the global attention mechanism module based on the PS-Net model. The global attention mechanism module is used to improve the model's ability to suppress similar interference features, forming an improved PS-Net model based on the edge attention mechanism module, the hybrid coordinate attention mechanism module, and the global attention mechanism module;

[0171] The model training and testing module is used to introduce the IOU Loss loss function and use the training set to train the improved PS-Net model to obtain the fuel tank filling port target detection model, use the test set to test the fuel tank filling port target detection model, and evaluate the performance of the fuel tank filling port target detection model;

[0172] A fuel tank filling port target detection module is used to detect the fuel tank filling port target using the fuel tank filling port target detection model to obtain the target area and contour of the filling port;

[0173] The fuel tank filling port coordinate extraction module includes:

[0174] The filling port contour detection module is used to detect the filling port contour in the fuel tank filling port target using the contour detection function findContours in opencv;

[0175] A filling port shape fitting module is used to perform polygonal approximate fitting of the filling port shape based on the filling port contour information using the Douglas-Peucker algorithm;

[0176] The convex hull acquisition module is used to perform polygonal approximation fitting on the filling port contour and then use the convexHull function in opencv to obtain the convex hull of the boundary contour point set;

[0177] The filling port positioning module is used to obtain the minimum circumscribed circle and center coordinates of the filling port based on the convex hull of the boundary contour point set and the contour fitting function minEnclosingCircle in opencv.

[0178] In an optional embodiment, the rough positioning of the fuel tank filling port of the autonomous filling arm includes two stages: filling port target detection and filling port coordinate extraction, wherein the filling port target detection includes: a) constructing a fuel tank filling port dataset; b) edge attention mechanism module design; c) mixed coordinate attention mechanism module design; d) global attention mechanism module design; e) adding IOU Loss loss function to train and test the improved PS-Net model; f) using the trained model to perform filling port detection; wherein, the filling port coordinate extraction includes; g) extraction of the contour of the filling port in the detection result; h) polygonal approximation of the filling port shape; i) calculation of the convex hull of the boundary contour point set; j) acquisition of the minimum circumscribed circle and center coordinates of the filling port.

Claims

1. A method for coarsely positioning a fuel tank filling port of an autonomous filling arm, It is characterized in that The method includes two stages: fuel tank filling port target detection and fuel tank filling port coordinate extraction; wherein the fuel tank filling port target detection includes: Construct a fuel tank filler port dataset and divide the dataset into a training set and a test set; Based on the PS-Net model, the edge attention mechanism module is integrated. The edge attention mechanism module is used to extract the detailed features of the filling port from the low-level features. Based on the PS-Net model, a hybrid coordinate attention mechanism module is integrated to enhance the extraction of semantic features of the filling port. Based on the PS-Net model, the global attention mechanism module is integrated. The global attention mechanism module is used to improve the model's ability to suppress similar interference features, forming an improved PS-Net model based on the edge attention mechanism module, the hybrid coordinate attention mechanism module, and the global attention mechanism module. The IOULoss loss function is introduced, and the improved PS-Net model is trained using the training set to obtain the fuel tank filling port target detection model. The fuel tank filling port target detection model is tested using the test set, and the performance of the fuel tank filling port target detection model is evaluated. The fuel tank filling port target detection model is used to detect the fuel tank filling port target and obtain the target area and contour of the filling port; The tank filling port coordinate extraction includes: Use the contour detection function findContours in opencv to detect the contour of the fuel tank filling port target; According to the filling port contour information, the Douglas-Peucker algorithm is used to perform polygonal approximation fitting on the filling port shape. After polygonal approximation fitting of the filling port contour, the convexHull function in opencv is used to obtain the convex hull of the boundary contour point set; According to the convex hull of the boundary contour point set, the contour fitting function minEnclosingCircle in OpenCV is used to obtain the minimum circumscribed circle and center coordinates of the filling port.

2. The method for roughly locating the fuel tank filling port of the autonomous filling arm according to claim 1, It is characterized in that The edge attention mechanism module uses the outputs of Conv1-2 and Conv2-2 of the main part of the PS-Net model as the input of the edge attention mechanism module, and obtains clear edge detail features through 3×3 convolution and feature addition and multiplication fusion operations.

3. The method for roughly locating the fuel tank filling port of the autonomous filling arm according to claim 2, It is characterized in that The edge attention mechanism module uses the outputs of Conv1-2 and Conv2-2 of the main part of the PS-Net model as the input of the edge attention mechanism module, and obtains clear edge detail features through 3×3 convolution and feature addition and multiplication fusion operations, including: For the output f of Conv1-2 and Conv2-2 layers in the backbone of the PS-Net model 1 、f 2 , and a series of convolution operations are used to purify it and obtain the feature f' 1 、f' 2 , the processing process is as follows: f i '=ReLu(BN(Conv(f i ))),i=1,2 In the formula, Conv is a 3×3 convolution operation; BN is normalization; ReLu is the activation function; By the feature f' 1 、f' 2 Adaptive learning is performed on different focus points in the , and the selective weighted feature w is obtained. The processing process is as follows: w=f 1 '×f 2 ' The selectively weighted feature w and the purified feature f' 1 、f' 2 Convolution and feature fusion operations are used to obtain the filling port detail features f e , the processing process is as follows: f e =ReLu(BN(Conv(f 1 '+w)))+ReLu(BN(Conv(f 2 '+w)))。 4. The method for roughly locating the fuel tank filling port of the autonomous filling arm according to claim 1, It is characterized in that The hybrid coordinate attention mechanism module adds maximum pooling in the horizontal and vertical directions to the structure of the coordinate attention mechanism, and adopts a feature addition fusion method to fuse local information and global information in the horizontal and vertical directions.

5. The method for roughly locating the fuel tank filling port of the autonomous filling arm according to claim 4, It is characterized in that The hybrid coordinate attention mechanism module adds horizontal and vertical maximum pooling to the structure of the coordinate attention mechanism, and adopts a feature addition fusion method to fuse local information and global information in the horizontal and vertical directions, including: Using pooling kernels of size (H, 1) and (1, W), average pooling operations are performed in the horizontal and vertical directions to aggregate the input features into two one-dimensional direction-aware features, namely The processing process is as follows: In the formula, represents the output feature of the cth channel with height h; x c (h,i) represents the i-th row feature vector of the input c-th channel; represents the output feature of the cth channel with height w; x c (j,w) represents the j-th column feature vector of the input c-th channel; The maximum pooling operation is used in the horizontal and vertical directions to aggregate the input features into two one-dimensional direction-aware features, namely The processing process is as follows: By encoding the spatial information, the local information and global information in the horizontal and vertical directions are fused by adding features, and a series of splicing and fusion operations are performed on information in different directions to obtain the feature f. The processing process is as follows: f=ReLu(BN(Conv(Concate(((Z h +from h ),(WITH w +from w )))))) In the formula, Concate represents the concatenation operation; Z h , Z w They are respectively represented as the output of the input features in the horizontal and vertical directions after average pooling; z h 、z w They are respectively represented as the output of the input features in the horizontal and vertical directions after maximum pooling; The encoded features are converted into attention in two different directions, namely g h , g w , the processing process is as follows: In the formula, Split represents the channel splitting operation; Focus on h , g w The output feature y is obtained by multiplying the input feature. The processing process is as follows: In the formula, x c (i,j) represents the features of the input c-th channel; Represent the attention in the horizontal and vertical directions of the c-th channel respectively.

6. The method for roughly locating the fuel tank filling port of the autonomous filling arm according to claim 1, It is characterized in that The global attention mechanism module is used to improve the model's ability to suppress similar interference features, including: For the semantic features f in the high-level p Use block maximum pooling and average pooling to obtain global information f a , the processing process is as follows: f a =AvgPool(MaxPool(f p )) In the formula, AvgPool is the average pooling operation, and MaxPool is the block pooling operation; By adopting the fusion method of activation function and feature multiplication, the important features in the global information are mapped to the input features to obtain the feature f b , the processing process is as follows: f b =Sigmoid(f a )×f p In the formula, Sigmoid is the activation function.

7. The method for roughly locating the fuel tank filling port of the autonomous filling arm according to claim 1, It is characterized in that The IOULoss loss function is introduced to optimize the model training results by calculating the intersection-over-union loss between the saliency map generated by the improved PS-Net model and the label.

8. The method for roughly locating the fuel tank filling port of the autonomous filling arm according to claim 7, It is characterized in that The intersection-over-union loss between the saliency map generated by the improved PS-Net model and the label is calculated as follows: Where W represents the pixels in the width direction of the image; H represents the pixels in the height direction of the image; P is the saliency map output by the model; G is the label; P ij is the probability that the predicted image pixel (i, j) belongs to the salient area; G ij is the value of the label pixel (i, j).

9. The method for roughly locating the fuel tank filling port of the autonomous filling arm according to claim 1, It is characterized in that When the performance of the fuel tank filling port target detection model is evaluated, the mean absolute error MAE, mean Em, max Em, adpE-m, mean Fm, max Fm, adp Fm, and precision-recall rate PR are used as evaluation indicators to verify the accuracy of the fuel tank filling port target detection model.

10. A coarse positioning system for the fuel tank filling port of an autonomous filling arm, It is characterized in that It includes a fuel tank filling port target detection module and a fuel tank filling port coordinate extraction module; wherein the fuel tank filling port target detection module includes: A data acquisition module is used to construct a fuel tank filling port data set and divide the data set into a training set and a test set; An edge attention mechanism module is used to integrate the edge attention mechanism module based on the PS-Net model. The edge attention mechanism module is used to extract the detailed features of the filling port from the low-level features; A hybrid coordinate attention mechanism module is used to integrate the hybrid coordinate attention mechanism module based on the PS-Net model. The hybrid coordinate attention mechanism module is used to enhance the extraction of semantic features of the filling port; The global attention mechanism module is used to integrate the global attention mechanism module based on the PS-Net model. The global attention mechanism module is used to improve the model's ability to suppress similar interference features, forming an improved PS-Net model based on the edge attention mechanism module, the hybrid coordinate attention mechanism module, and the global attention mechanism module; The model training and testing module is used to introduce the IOU Loss loss function and use the training set to train the improved PS-Net model to obtain the fuel tank filling port target detection model, use the test set to test the fuel tank filling port target detection model, and evaluate the performance of the fuel tank filling port target detection model; A fuel tank filling port target detection module is used to detect the fuel tank filling port target using the fuel tank filling port target detection model to obtain the filling port target area and contour; The fuel tank filling port coordinate extraction module includes: The filling port contour detection module is used to detect the filling port contour in the fuel tank filling port target using the contour detection function findContours in opencv; A filling port shape fitting module is used to perform polygonal approximate fitting of the filling port shape based on the filling port contour information using the Douglas-Peucker algorithm; The convex hull acquisition module is used to perform polygonal approximation fitting on the filling port contour and then use the convexHull function in opencv to obtain the convex hull of the boundary contour point set; The filling port positioning module is used to obtain the minimum circumscribed circle and center coordinates of the filling port based on the convex hull of the boundary contour point set and the contour fitting function minEnclosingCircle in opencv.

Citation Information

Cited By

  • Methanol canning vehicle filling port pose positioning method, terminal equipment and storage medium

    CN119515975A

  • Oil tank filling port detection system of autonomous filling arm and detection method of oil tank filling port detection system

    CN120995004A

  • A refueling arm oil tank filler detection system and method thereof

    CN120995004B

  • Method and system for detecting filling port of automatic oil filling arm of oil tank truck

    CN121366330A