Oil tank filling port detection system of autonomous filling arm and detection method of oil tank filling port detection system
By optimizing the YOLOv8n model and combining lightweight feature processing, cascaded attention, and dual-view attention mechanisms, the real-time performance and accuracy issues of refueling port detection in complex scenarios were resolved, achieving fast and accurate refueling port detection and improving fuel loading and unloading efficiency and safety.
Patent Information
- Application Number
- CN202511087456.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-05
- Publication Date
- 2025-11-21
AI Technical Summary
Existing filling port detection technologies lack real-time performance and generalization capabilities in complex scenarios, and cannot effectively cope with interference caused by changes in light, position, and angle, resulting in low detection accuracy and high computational load.
The YOLOv8n model is adopted, and the model structure is optimized by combining the Lightweight Feature Processing (LFP) module, the Cascaded Attention Mechanism (CAM) module, and the Dual-Vision Attention Mechanism (DVAM) module to improve the real-time performance and accuracy of detection, reduce computational complexity, and enhance the ability to extract features from the injection port and suppress interference.
It enables rapid and high-precision detection of filling ports in complex scenarios, reduces the computational complexity of the model, improves the real-time performance and anti-interference ability of the detection, and ensures the efficiency and safety of oil loading and unloading operations.
Smart Images

Figure CN120995004A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of machine vision, in particular to an oil tank filler detection system of an autonomous filling arm and a detection method thereof. BACKGROUND
[0002] In the process of oil transportation, oil loading and unloading is a key link. At present, the loading and unloading of oil is mainly realized by manually operating the filling arm to be connected with the filler. This method not only has high labor intensity and low efficiency, but also has great dependence on the skills and experience of the operators. In recent years, with the rapid development of artificial intelligence technology, it provides development space for intelligent loading and unloading of oil, reduces the cost and labor intensity of oil loading and unloading, and also provides safety protection for the workers. The core of intelligent loading and unloading of oil is the detection technology of the filler. The detection effect of the filler is easily disturbed by light and similar features in the real scene, and in addition, it also needs to meet the real-time requirement. The traditional detection technology mainly extracts the shape contour of the filler in the scene through intelligent algorithm to realize the detection of the filler. Since the traditional detection technology usually depends on manual extraction, and the method is only for a specific scene, the real-time performance and generalization of the traditional detection method are low, which cannot meet the current detection requirements of the filler.
[0003] The existing filler detection method has high detection accuracy in simple scenes, but cannot effectively perform the filler detection task in complex scenes. The existing model cannot fully cope with the interference caused by changes in light and position in complex scenes, resulting in deficiencies in feature extraction and anti-interference ability. In addition, since the model structure still has certain redundancy, the calculation amount is high, so that the model has some shortcomings in real-time performance. SUMMARY
[0004] The present application aims to provide an oil tank filler detection system of an autonomous filling arm and a detection method thereof to solve the problems raised in the background art. Through large-scale data training and deep learning, the present application can automatically learn the features of the filler, realize fast and high-precision detection of the filler target in complex scenes such as changes in light, distance, layout and angle, and provide reliable technical support for improving the efficiency of daily oil loading and unloading operations and ensuring operation safety.
[0005] To achieve the above object, the present application provides the following technical solution: An oil tank filler detection system and method for an autonomous refueling arm, comprising an image acquisition platform, which acquires oil tank filler image data in complex scenes, constructs an oil tank filler dataset, and divides the oil tank filler data images into a training set, a validation set, and a test set in proportion using a professional image labeling tool to label the collected oil tank filler data images; ensuring the accuracy and integrity of the data. High-quality labeled data is the basis for training high-precision models, and the accuracy of labeling directly affects the learning effect of the model on the filler features.
[0006] Based on the YOLOv8n model, a lightweight feature processing module (LFP) is fused to reduce the computational complexity of the model and improve the real-time performance of the detection, obtaining a YOLOv8n+LFP model; the lightweight feature processing module reduces the computational complexity of the model, enabling the model to more efficiently process image data while improving the real-time performance of the detection, so that the system can quickly and accurately detect the oil tank filler in complex scenes.
[0007] Based on the YOLOv8n+LFP model, a cascade attention mechanism module (CAM) is fused to improve the feature extraction capability of the model and reduce feature omission, obtaining a YOLOv8n+LFP+CAM model; the cascade attention mechanism module effectively improves the feature extraction capability of the model and reduces feature omission. In complex scenes, the oil tank filler may be blocked or the light conditions may not be good, and the cascade attention mechanism module helps the model more accurately extract the features of the filler.
[0008] Based on the YOLOv8n+LFP+CAM model, a dual-view attention mechanism module (DVAM) is fused to improve the interference suppression capability of the model and reduce feature false detection, obtaining a YOLO-LCD model; the dual-view attention mechanism module improves the interference suppression capability of the model and reduces feature false detection. In the presence of other similar-shaped objects interfering, DVAM can help the model distinguish between the real filler and other interfering objects, thereby improving detection accuracy.
[0009] The YOLO-LCD model is trained to obtain a filler detection model; the model learns various complex situations during training, and each module optimizes the detection performance, enabling the system to quickly and accurately detect the oil tank filler in complex scenes, such as light changes, background interference, and other factors.
[0010] The YOLO-LCD model greatly improves the advantages of the model in detection accuracy, real-time performance, and interference suppression through the synergistic effect of each module.
[0011] The filler port detection model was tested using a test set, and its performance was evaluated. The trained filler port detection model was then used for filler port detection.
[0012] As a further embodiment of the present invention, the YOLOv8n+LFP model obtained by fusing a lightweight feature processing module based on the YOLOv8n model includes:
[0013] The YOLOv8n model includes a C2f module. All C2f modules in the YOLOv8n model are replaced with lightweight feature processing modules, which achieve lightweight feature processing through convolution, average pooling, multilayer perceptron, activation functions, and feature multiplication operations.
[0014] The C2f module in the YOLOv8n model is mainly used for feature extraction and fusion, but its computational complexity is high. Replacing it with a Lightweight Feature Processing (LFP) module significantly reduces the model's computational load. The LFP module reduces computational complexity by optimizing its internal structure, such as reducing the number of parameters in convolutional layers and employing more efficient feature extraction methods.
[0015] As a further embodiment of the present invention, the C2f module of the YOLOv8n model is completely replaced with a lightweight feature processing module, which performs convolution, average pooling, multilayer perceptron, activation function, and feature multiplication operations. The lightweight feature processing module includes:
[0016] f I =PConv(f P )
[0017] f G =Sigmoid((MLP(MLP(GAP(f)) I )))))
[0018] f O =f I ×f G
[0019] In the formula, PConv(·) is a partial convolution, GAP(·) is a global average pooling, Sigmoid(·) is an activation function, MLP(·) is a multilayer perceptron, and f o For the LFP module output features, f P Given the input feature map, f I For the feature map, f G For feature maps;
[0020] PConv convolution is used on the input feature map f P Feature extraction is performed on 1 / 4 of the channels, and the extracted features are concatenated with the remaining feature channels to obtain the feature map f.I PConv convolution significantly reduces computational complexity while maintaining feature extraction capabilities. The features extracted by PConv convolution are concatenated with the remaining feature channels to generate a new feature map f. I The concatenation operation retains most of the information from the original feature map and introduces new feature representations through PConv convolution, enhancing feature diversity.
[0021] Channel scaling in Multilayer Perceptrons (MLPs) involves applying MLPs to scale the pooled features, further enhancing the model's ability to process global features. MLPs weight features through nonlinear transformations, enabling the model to dynamically adjust the importance of different channels.
[0022] For f I Average pooling is performed, and a multilayer perceptron is applied to scale the pooled features through channels. The LFP module finds a balance between global and detail features and selectively amplifies key details while retaining more important detail features.
[0023] The feature map f is obtained by normalizing each channel using the Sigmoid function. G The Sigmoid function maps feature values to the (0,1) interval, giving each channel of the feature map a normalized weight. This normalization operation helps to highlight important feature channels while suppressing unimportant features, dynamically adjusting the importance of features. This allows the model to adaptively highlight key features in different scenarios and with different injection points, enhancing the model's robustness.
[0024] feature map f I with f G The LFP module extracts the features of the injection port in real time by fusing the data to highlight key details. This fusing operation allows the model to selectively amplify key details and retain more important feature information, thereby improving detection accuracy. As a further aspect of this invention, the YOLOv8n+LFP model is fused with a cascaded attention mechanism (CAM) module to obtain the YOLOv8n+LFP+CAM model, which includes:
[0025] The YOLOv8n model includes a Backbone section, with a Cascaded Attention (CAM) module added to the Backbone section. Through feature transformation, convolution, max pooling, average pooling, activation functions, concatenation, and feature multiplication operations, the CAM module improves the model's feature extraction capabilities and reduces the model's missed features.
[0026] The CAM module performs in-depth processing on the input features through feature transformation and convolution operations, enhancing the model's ability to perceive features and enabling the model to more accurately capture the key features of the fuel tank filling port.
[0027] As a further embodiment of the present invention, the calculation formula of the cascaded attention mechanism module (CAM) is as follows:
[0028] f c =reshape(Conv1d(reshape(f s ))
[0029] f avg =GAP(f c )
[0030] f max =maxpool(f c )
[0031] f L =Sigmoid(Conv2d(concate(f avg +f max )))
[0032] f e =f s ×f c ×f L
[0033] In the formula, Conv1d(·) is a one-dimensional convolution, reshape(·) is a feature transformation, maxpool(·) is the maximum pooling along the channel direction, avgpooling(·) is the average pooling along the channel direction, concate(·) is feature concatenation, Conv2d(·) is a two-dimensional convolution, and f e For the output characteristics of the CAM module, f s For the characteristics of the filling port, f c For the characteristics of the filling port, f L For the characteristics of the filling port, f avg and f max All of these features are spliced together;
[0034] For the characteristics of the filling port f s Perform one-dimensional convolution processing to further extract the injection port features and obtain feature f. c In the channel direction, the CAM module performs a function on feature f. c The features f are obtained by performing average pooling separately. avg The CAM module performs max pooling to obtain the output feature fmax;
[0035] Average pooling preserves global information about the filling port, making the CAM module robust in extracting overall features of the filling port; it is even more robust during feature extraction. Global features help the model understand the overall shape and location of the filling port, reducing misjudgments caused by local occlusion or noise.
[0036] Max pooling captures the strongest response at each location, and the CAM module focuses on the salient region of the injection port target, enhancing the saliency of the injection port features. Local features help the model identify the detailed features of the injection port.
[0037] By splicing feature f avg and f max The CAM module enables a comprehensive understanding of the injection port features from both global and local perspectives. It fuses the concatenated features to enhance the learning ability of the injection port features, thus achieving a complete understanding of these features. This concatenation operation allows the model to utilize both global and local features simultaneously, improving the richness and completeness of the features.
[0038] The CAM module then obtains the feature f through two-dimensional convolution and the Sigmoid function. L The Sigmoid function maps eigenvalues to the (0,1) interval, making the eigenvalues at the injection port location higher, thus highlighting the injection port target.
[0039] The CAM module then adds feature f s f c and f L Fusion is used to enhance the features of the injection port that are affected by light, thereby reducing the model's missed features.
[0040] As a further embodiment of the present invention, the YOLO-LCD model is obtained by fusing a dual-viewpoint attention mechanism module (DVAM) to improve the model's interference suppression capability and reduce feature false detections, based on the YOLOv8n+LFP+CAM model, including:
[0041] The YOLOv8n model includes a Neck part, and a dual-view attention mechanism module is added to the three output positions of the Neck part. Through max pooling, global average pooling, one-dimensional convolution, feature transformation, activation function, feature addition and feature multiplication operations, the interference suppression capability of the model is improved and the false detection of features is reduced.
[0042] Max pooling captures the strongest response at each location in the feature map, focusing on the salient region of the injection port. This allows the model to highlight the key features of the injection port while suppressing background noise and other interfering features.
[0043] Global average pooling preserves global information about the filling port, making the model more robust when extracting overall features. This global information helps the model understand the overall shape and location of the filling port, reducing misjudgments caused by local occlusion or noise. It also improves the model's ability to perceive filling port features and enhances its interference suppression capabilities.
[0044] As a further embodiment of the present invention, the calculation formula of the dual-view attention mechanism module is as follows:
[0045] f m =MaxPooling(f f )
[0046] f j =Sigmoid(Conv1d(reshape(f m )))
[0047] f q =Sigmoid(Conv1d(GAP(f m )))
[0048] f z =f f ×(f j +f q )
[0049] In the formula, MaxPooling(·) is local max pooling, AvgPooling(·) is global average pooling, and f z For the output characteristics of the DAM module, f f For the input features, f m For output features, f q For global features, f j To obtain features;
[0050] The input feature f is processed by local max pooling. f Processing is performed to obtain the output feature f m, It suppresses interference features in non-filling port areas and reduces subsequent computation; it better distinguishes between the filling port and interference objects in the background. When there are other metal parts or reflective objects around the filling port, the model can effectively suppress these interferences and accurately identify the filling port.
[0051] The global vision portion of the DAM module first extracts overall features through global average pooling, and then generates global features f by sequentially passing them through one-dimensional convolution and the sigmoid function. q ;
[0052] The DAM module, through self-learning, reduces the weight of non-filling port areas while increasing the weight of filling port areas, effectively suppressing significant interference information.
[0053] The local vision portion of the DAM module first transforms the features into one-dimensional features, then uses one-dimensional convolution to learn the feature information of each region in the feature map, and finally obtains the feature f using the Sigmoid function. j ;
[0054] The features output from the global and local views are summed and mapped back to the input feature map. This ensures that interference information can be suppressed for each region in the input feature map from both the global and local views, thereby reducing the model's false detection of interference features.
[0055] As a further embodiment of the present invention, the detection method of the fuel tank filling port detection system of the autonomous filling arm is characterized in that: the control method includes the following steps:
[0056] S1. Acquire image data of fuel tank filling port under complex scenarios through an image acquisition platform, construct a fuel tank filling port dataset, and after labeling the acquired fuel tank filling port data images, divide them into training set, validation set and test set according to the proportion;
[0057] S1.1. Use a depth camera to collect image data of the filling port under different layouts of the fuel tank, different lighting conditions, different shooting distances and shooting angles;
[0058] S1.2. Label the image data of the filling port to obtain the real labels, and then divide the image data into training set, validation set and test set according to 6:2:2.
[0059] S2. Based on the YOLOv8n model, a lightweight feature processing module (LFP) is fused to obtain the YOLOv8n+LFP model;
[0060] S3. Based on the YOLOv8n+LFP model, the cascaded attention mechanism module (CAM) is fused to obtain the YOLOv8n+LFP+CAM model;
[0061] S4. Based on the YOLOv8n+LFP+CAM model, the dual-view attention mechanism module (DVAM) is fused to obtain the YOLO-LCD model;
[0062] S5. Train the YOLO-LCD model to obtain the filling port detection model; test the filling port detection model using the test set; evaluate the performance of the filling port detection model.
[0063] S5.1 The training and testing of the filling port detection model are carried out in the same environment to minimize the interference of external factors on the experimental results.
[0064] S5.2 Further verify the effectiveness and stability of the YOLO-LCD model;
[0065] S5.3. The YOLO-LCD model is fully trained using the training set and validation set to obtain the detection model for the fuel tank filling port target. Then, the fuel tank filling port target detection model is tested using the test set.
[0066] S5.4 The performance of the filling port detection model is evaluated using evaluation metrics. These metrics verify the effectiveness of the YOLO-LCD model in filling port target detection and further assess the model's classification and target detection performance. The calculation formulas for the evaluation metrics are as follows:
[0067]
[0068] In the formula, TP represents the number of samples correctly predicted as the positive class of the target, i.e., the number of samples that are actually the positive class of the target and are correctly detected by the model; FP represents the number of samples that are predicted as the positive class of the target but are actually not the target, i.e., the number of samples that the model incorrectly detects as targets; FN represents the number of samples that are actually the positive class of the target but are incorrectly predicted as not the target, i.e., the number of samples that the model misses; TP+FP represents the total number of samples predicted as positive by the model; TP+FN represents the number of samples that are actually positive. time represents the time required for the model to process each frame of the image, in milliseconds.
[0069] S6. Use the trained filling port detection model to detect the filling port and obtain the target area of the filling port.
[0070] Compared with the prior art, the beneficial effects of the present invention are as follows: A fuel tank filling port detection system and method with an autonomous filling arm, based on the YOLOv8n model, integrates a lightweight feature processing module (LFP) to reduce the computational complexity of the model and improve the real-time performance of the detection, resulting in a YOLOv8n+LFP model; the lightweight feature processing module effectively reduces the computational complexity of the model and accelerates the inference speed of the model by significantly reducing the computational load, number of parameters and model size, enabling the model to process image data more efficiently, improving the real-time performance of the detection, and enabling the system to quickly and accurately detect the fuel tank filling port even in complex scenarios.
[0071] The cascaded attention mechanism module enhances the model's ability to capture key features and effectively reduces the impact of lighting changes on the detection of the filling port. This helps reduce the model's missed detection of filling port features caused by lighting changes.
[0072] By integrating a dual-view attention mechanism module, the model's ability to distinguish similar interference features is improved, thereby effectively suppressing interference features. This helps reduce false detections of features caused by changes in the injection port position. Attached Figure Description
[0073] Figure 1 This is the overall flowchart of the present invention;
[0074] Figure 2 This is a schematic diagram of a vehicle refueling scenario according to the present invention;
[0075] Figure 3 This is a schematic diagram of the lightweight feature processing module of the present invention.
[0076] Figure 4 This is a schematic diagram of the cascaded attention mechanism module of the present invention.
[0077] Figure 5 This is a test comparison diagram before and after the addition of the cascaded attention mechanism module in this invention;
[0078] Figure 6 This is a schematic diagram of the dual-view attention mechanism module of the present invention.
[0079] Figure 7 This is a comparison chart of tests before and after the addition of the dual-view attention mechanism module in this invention;
[0080] Figure 8 This is a schematic diagram of the structure of the fuel tank filling port detection model of the present invention;
[0081] Figure 9 This is a performance comparison chart of the YOLO-LCD model of this invention with other models;
[0082] Figure 10 This is a schematic diagram of the fuel tank filling port detection system of the autonomous filling arm of the present invention.
[0083] In the diagram: 1-filling port, 2-depth camera, 3-industrial camera, 4-autonomous filling arm. Detailed Implementation
[0084] 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.
[0085] Please see the appendix Figure 2 A fuel tank filling port detection system for an autonomous refueling arm is disclosed, used in a vehicle refueling scenario. The vehicle refueling scenario includes a fuel tank filling port 1, an industrial camera 3 for detecting the filling port 1 during coarse positioning, and a depth camera 2 located at the end of the autonomous refueling arm 4 for detecting the filling port 1 during fine positioning. For fine positioning, the depth camera is used to detect the filling port 1.
[0086] Please see the appendix Figure 1 This invention discloses a fuel tank filling port detection system and method for an autonomous filling arm. The specific steps are as follows:
[0087] S1. Acquire image data of fuel tank filling ports in complex scenarios using an image acquisition platform, construct a fuel tank filling port dataset, and then divide the acquired fuel tank filling port data images into training, validation, and test sets according to a set ratio after annotation. Specific steps are as follows:
[0088] S1.1. Use a depth camera to collect image data of the filling port under different layouts of the fuel tank, different lighting conditions, different shooting distances and shooting angles;
[0089] S1.2. Label the image data of the filling port to obtain the real labels, and then divide the image data into training set, validation set and test set according to 6:2:2.
[0090] S2. Based on the YOLOv8n model, a lightweight feature processing module is integrated to obtain the YOLOv8n+LFP model; the lightweight feature processing module is used to reduce the computational complexity of the model and improve the real-time performance of detection.
[0091] During the precise localization of the autonomous dispensing arm, the network model needs to detect the dispensing port target in real time based on the visual information provided by the depth camera. Therefore, the model's data processing capabilities and results directly affect the real-time path adjustment of the autonomous dispensing arm during docking, thus impacting the efficiency and safety of the precise localization. The C2f module in the YOLOv8n model extracts dispensing port features in depth by concatenating multiple convolutional layers and using skip connections. While the C2f module improves the model's feature representation capabilities, its excessive convolutional layers require more computational resources and time, thus reducing the detection speed of the dispensing port and ultimately affecting the efficiency and safety of the precise localization. Therefore, a lightweight feature processing module is used to replace the C2f module.
[0092] Please see the appendix Figure 3 The lightweight feature processing module first uses PConv convolution to process the input feature map f. P Feature extraction is performed on 1 / 4 of the channels, and the extracted features are concatenated with the remaining feature channels to obtain the feature map f. I This process not only effectively extracted the features of the injection port, but also reduced the computational load of the model. Secondly, regarding f... IAverage pooling not only preserves the feature information of important channels but also further reduces computational complexity. Next, a multilayer perceptron (LFP) is applied to scale the pooled features by channel, allowing the LFP module to find a balance between global and detail features. This operation selectively amplifies key details, preserving more important detail features. Subsequently, the sigmoid function is used to normalize each channel, obtaining the feature map f. G Finally, the feature map f I with f G The feature fusion process is used to highlight the key features of the injection port, thereby ensuring the LFP module's ability to extract injection port features. The lightweight feature processing module's calculation formula is as follows:
[0093] f I =PConv(f P )
[0094] f G =Sigmoid((MLP(MLP(GAP(f)) I )))))
[0095] f O =f I ×f G
[0096] In the formula, PConv(·) is a partial convolution, GAP(·) is a global average pooling, Sigmoid(·) is an activation function, MLP(·) is a multilayer perceptron, and f o For the LFP module output features, f P Given the input feature map, f I For the feature map, f G This is a feature map.
[0097] S3. Based on the YOLOv8n+LFP model, a cascaded attention mechanism module (CAM) is fused to obtain the YOLOv8n+LFP+CAM model. The cascaded attention mechanism module is used to improve the model's feature extraction capability and reduce feature omissions.
[0098] Fuel tanker refueling is an all-weather operation, so the autonomous refueling arm is inevitably affected by changes in lighting conditions during precise positioning. These changes significantly alter the visual features of the refueling port. In low light, the port may blend into the background and become indistinguishable. In strong light, the port may reflect significant shine, making its features less prominent. YOLOv8n's refueling port feature extraction primarily relies on the Backbone layer, composed of multiple convolutional layers. This deep structure effectively extracts global features from the input image by convolving all pixels equally, but it fails to focus on inconspicuous features and target areas. Due to the lack of targeted feature extraction in the Backbone layer, the extracted refueling port features are weak and gradually diluted during subsequent feature fusion, leading to missed detections of the refueling port features.
[0099] Please see the appendix Figure 4 The cascaded attention mechanism module first processes the injection port feature f. s One-dimensional convolution processing is performed to further extract the injection port features and obtain feature f. c Next, in the channel direction, the CAM module performs analysis on feature f. c Perform average pooling and max pooling respectively to obtain feature f avg and f max Average pooling preserves global information about the filling port, making the CAM module more robust when extracting overall features of the filling port. Max pooling captures the strongest response at each location, allowing the CAM module to focus on the salient regions of the filling port target, thus enhancing the saliency of the filling port features. Then, by concatenating the features f... avg and f max The CAM module achieves a comprehensive understanding of the injection port features from both global and local perspectives. Subsequently, the CAM module obtains the features f through two-dimensional convolution and the sigmoid function. L The former fuses the spliced features to enhance the learning ability of the injection port features, while the latter mainly highlights the injection port location on the feature map. Finally, the CAM module further integrates the features f s f c and f L Fusion is used to enhance the features of the injection port affected by lighting, thereby reducing feature omissions in the model. The calculation formula for the cascaded attention mechanism module is as follows:
[0100] f c =reshape(Conv1d(reshape(f s ))
[0101] f avg =GAP(f c )
[0102] f max =maxpool(f c )
[0103] f L =Sigmoid(Conv2d(concate(f avg +f max )))
[0104] f e =f s ×f c ×f L
[0105] In the formula, Conv1d(·) is a one-dimensional convolution, reshape(·) is a feature transformation, maxpool(·) is the maximum pooling along the channel direction, avgpooling(·) is the average pooling along the channel direction, concate(·) is feature concatenation, Conv2d(·) is a two-dimensional convolution, and f e For the output characteristics of the CAM module, f s For the characteristics of the filling port, f c For the characteristics of the filling port, f L For the characteristics of the filling port, f avg and f max All of them are spliced together.
[0106] Please see the appendix Figure 5 , attached Figure 5 This section shows a comparison of model detection heatmaps before and after adding the CAM module in low-light conditions. The intensity of colors in the heatmap represents the amount of attention the model pays to that region. A redder color indicates more attention to that region, and vice versa. Figure 5 (a) It can be seen that, due to the dim lighting, some features of the filling port are not obvious. Figure 5 (b) The heatmap visualization results show that the model's attention to the filling port area is not even, and it lacks effective attention to areas containing filling port features. In contrast, Figure 5 (c) The display model, after incorporating the CAM module, provides a more comprehensive view of the filling port feature area, significantly improving detection accuracy. Therefore, the CAM module design effectively mitigates the impact of lighting variations on filling port detection accuracy, thereby reducing missed detections of filling port features.
[0107] S4. Based on the YOLOv8n+LFP+CAM model, the dual-view attention mechanism module (DVAM) is fused to obtain the YOLO-LCD model; the dual-view attention mechanism module is used to improve the model's interference suppression ability and reduce the model's feature false detection.
[0108] In addition to the filling port, the unloading box of an oil tanker contains other components with similar color and texture features. Furthermore, the tanker's stopping position is uncertain during filling. Changes in the pose of the unloading box from the depth camera's perspective alter the visibility and feature representation of the filling port and surrounding components, increasing the number of interfering features. YOLOv8n effectively fuses features extracted from the backbone using an FPN+PAN structure and convolutional operations in the Neck section. The FPN+PAN structure fuses contextual information at different levels, while convolutional operations further extract important features, thus suppressing interfering information introduced by feature fusion at different levels. However, while convolutional operations enhance feature representation and suppress interference, they also amplify certain details and background information due to the introduction of a smoothing effect. Therefore, this convolutional operation makes it difficult for the model to distinguish interfering features that have subtle differences from the filling port features, leading to false detections of interfering features and ultimately affecting the model's detection accuracy.
[0109] Please see the appendix Figure 6 The dual-view attention mechanism module first processes the input features f through local max pooling. f Processing is performed to obtain feature f m This not only suppresses interference features in non-injection port areas but also reduces subsequent computational load. Then, the global vision portion of the DAM module first extracts overall features through global average pooling, and then generates global features f through one-dimensional convolution and the Sigmoid function. q In this operation, the DAM module, through self-learning, reduces the weight of non-injection port regions while increasing the weight of injection port regions, thus effectively suppressing significant interference information. Furthermore, the local vision portion of the DAM module first transforms the features into one-dimensional features, then uses one-dimensional convolution to learn the feature information of each region in the feature map, and finally uses the Sigmoid function to obtain the feature f. j This not only helps the module distinguish relatively small interference features but also enhances its attention to detailed information, thus helping the model to more accurately locate the injection port region. Finally, the features output from the global and local views are added together and mapped back to the input feature map, ensuring that interference information can be effectively suppressed for each region in the input feature map from both the global and local views, thereby reducing false detections of interference features by the model. The calculation formula for the dual-view attention mechanism module is as follows:
[0110] f m =MaxPooling(f f )
[0111] f j =Sigmoid(Conv1d(reshape(f m )))
[0112] f q =Sigmoid(Conv1d(GAP(f m )))
[0113] f z =f f ×(f j +f q )
[0114] In the formula, MaxPooling(·) is local max pooling, AvgPooling(·) is global average pooling, and f z This refers to the output characteristics of the DAM module.
[0115] Please see the appendix Figure 7 , attached Figure 7 This section presents a comparison of model detection heatmaps before and after adding a DAM module when the tilt angle of the tanker truck's unloading box changes. The uncertainty of the tanker truck's stopping position causes changes in the tilt angle of the unloading box and its internal filling port. For example... Figure 7 In the scenario shown in (a) where the filling nozzle is tilted, the YOLOv8n model, lacking the ability to suppress subtle differences that interfere with feature extraction, obtains similar features while extracting the true filling nozzle features. Figure 7 (b) The heatmap clearly shows that before adding the DAM module, the basic YOLOv8n model also gave high attention to the non-filling port region. However, after adding the DAM module, the improved YOLOv8n model, while reducing attention to the non-filling port feature region, further strengthened its attention to the target region, thus achieving effective suppression of interfering features, such as... Figure 7 As shown in (c). Therefore, the design of the DAM module helps the network model suppress interference from similar features caused by changes in the target tilt angle, thereby reducing false detections of features in the model.
[0116] S5. Train the YOLO-LCD model to obtain the filling port detection model; test the filling port detection model using the test set; evaluate the performance of the filling port detection model; the specific steps are as follows:
[0117] S5.1, as attached Figure 8 As shown, the training and testing of the injection port detection model of this invention are carried out in the same environment to minimize the interference of external factors on the experimental results; Table 1 details the hardware and software environment configurations used during model training and testing.
[0118] Table 1:
[0119]
[0120]
[0121] S5.2 Further verify the effectiveness and stability of the YOLO-LCD model; fixed hyperparameter settings were used during both training and testing, and the specific hyperparameter settings in the experiment are shown in Table 2. This fixed setting can eliminate the influence of parameter changes on the model evaluation index results, making the experimental results more objectively reflect the actual performance of the model in complex scenarios.
[0122] Table 2:
[0123]
[0124] S5.3. The YOLO-LCD model is fully trained using the training set and validation set to obtain the detection model for the fuel tank filling port target. Then, the fuel tank filling port target detection model is tested using the test set.
[0125] S5.4 Performance Evaluation of the Filling Port Detection Model. The effectiveness of the YOLO-LCD model in filling port target detection is verified through evaluation metrics. The model's classification and target detection performance is further evaluated. The calculation formulas for the evaluation metrics are as follows:
[0126]
[0127]
[0128] In the formula, TP represents the number of samples correctly predicted as the positive class of the target, i.e., the number of samples that are actually the positive class of the target and are correctly detected by the model; FP represents the number of samples that are predicted as the positive class of the target but are actually not the target, i.e., the number of samples that the model incorrectly detects as targets; FN represents the number of samples that are actually the positive class of the target but are incorrectly predicted as not the target, i.e., the number of samples that the model misses; TP+FP represents the total number of samples predicted as positive by the model; TP+FN represents the number of samples that are actually positive. time represents the time required for the model to process each frame of the image, in milliseconds.
[0129] This system calculates high-order classification metrics based on the elements of a binary confusion matrix model, including precision and recall. In addition, evaluation metrics such as parameter count, computational cost, model size, mAP, and FPS are introduced to assess the model's classification and object detection performance.
[0130] S6. Use the trained filling port detection model to detect the filling port and obtain the target area of the filling port.
[0131] To further evaluate the superiority of the YOLO-LCD model in object detection, this invention performed injection port detection under different lighting conditions, injection port layouts, injection port distances, and injection port tilt angles. The detection results were quantitatively compared with those of mainstream models in recent years, as shown in Table 3. These models include the classic Faster R-CNN and SSD models, the RetinaNet model with strong detection capabilities, and different versions of the YOLO series, namely YOLOv5s, YOLOv7-tiny, YOLOv8s, YOLOv8n, YOLOv9s, YOLOV9t, YOLOv10n, and YOLOv11. The experimental comparison results of these models on the injection port dataset in this invention are shown in Table 3.
[0132] Table 3:
[0133]
[0134] Table 3 shows that the detection accuracy of many models is low due to the influence of variations in the layout, lighting, distance, and tilt angle of the injection port in complex scenes. Faster R-CNN, consisting of a backbone network, region extraction network, ROI pooling layer, classification, and bounding box regression, is a two-stage object detection model. This model first generates candidate regions, then performs detailed classification and bounding box regression on each region. This multi-stage processing method increases computational complexity and inference time, resulting in relatively slow detection speed. Furthermore, the ROI pooling layer forcibly converts candidate regions of different sizes into fixed-size feature maps, leading to compression or truncation of detailed information in the feature maps. Especially when extracting injection port features in scenes with changing lighting, the model suffers significant information loss, affecting its detection accuracy. The SSD model's multi-scale feature fusion strategy is relatively simple, and its ability to adapt to injection ports in complex scenes is limited because it does not fully combine the detailed information of shallow features with the semantic information of deep features. SSD achieves object processing of different sizes by performing multi-scale detection on lower-resolution feature maps. However, because low-resolution feature maps lack sufficient feature information, the model's detection accuracy is easily affected by lighting conditions, particularly for refueling port features. The RetinaNet model uses Focal Loss to effectively suppress similar interference features in refueling scenarios, reducing false detections. However, for refueling port features affected by lighting, the model still relies on traditional feature extraction methods, making it difficult to accurately capture target features in low or high light conditions, leading to missed detections. Compared to Faster R-CNN, SSD, RetinaNet, and other models, the YOLO series offers significant improvements in detection speed, primarily due to its end-to-end training method and lightweight network structure. Furthermore, with optimizations to the Backbone and Neck structures, YOLO has gradually developed strong feature extraction and fusion capabilities. It can effectively extract rich spatial and semantic information from feature maps of different scales to improve target detection accuracy. Therefore, the YOLO series models exhibit high accuracy when handling refueling ports in complex scenes. However, some modules in the model have high computational complexity, which increases the model's computational load and inference time, thus affecting its real-time performance. Regarding feature extraction, YOLO models typically treat all regions in an image equally, employing a global feature extraction strategy for port feature extraction. This means YOLO lacks specific region-specific priority and targeted feature extraction strategies. For port feature regions affected by lighting conditions, the model lacks attention, making feature loss during feature processing more likely.Furthermore, while multi-scale feature fusion enhances the model's detection capabilities during YOLO's feature fusion process, it lacks the ability to accurately distinguish interference features with small differences in the scene, thus failing to effectively suppress similar interference features. This deficiency can easily lead to false detections during the injection port detection process, thereby reducing detection accuracy and reliability. Therefore, this invention proposes the YOLO-LCD model, which incorporates LFP, CAM, and DAM modules to further improve the model's detection speed and enhance its feature extraction and interference feature discrimination capabilities.
[0135] To effectively demonstrate the changing trends of model performance and to more intuitively observe the differences between models, this invention provides, as follows: Figure 9 The performance comparison of the models shown is as follows. Because the Faster R-CNN, SSD, RetinaNet, YOLOv5s, and YOLOv7-tiny models perform poorly on various performance metrics, they are difficult to effectively compare with other models in the same figure, and therefore are not visualized in this figure. As can be seen from the figure, although the YOLO-LCD model's Parameters and Modelseize performance metrics are slightly lower than YOLOv9t, and its FPS performance is slightly inferior to YOLOv10n, it performs well on key performance metrics such as Precision, Recall, mAP50, and mAP50-95, demonstrating the overall superior performance of the model of this invention. The comparison of various performance metrics shows that YOLO-LCD achieves a good balance of performance across all aspects, exhibiting high stability and adaptability, and can better meet the needs of target detection and precise localization in complex scenarios for autonomous oil filling arms.
[0136] Furthermore, to understand the specific contributions of the designed LFP, CAM, and DAM modules to improving the performance of the injection port target detection, ablation experiments were conducted on the detection model. In the ablation experiments, by progressively introducing the Lightweight Feature Processing (LFP) module, the Cascaded Attention Mechanism (CAM) module, and the Dual-view Attention Mechanism (DAM) module, and observing the changes in model performance metrics, the impact of each module on the overall model performance could be quantitatively analyzed. The ablation experiment results are shown in Table 4.
[0137] Table 4:
[0138]
[0139] As shown in Table 4, the LFP, CAM, and DAM modules proposed in this invention effectively improve the detection performance of refueling ports in complex refueling scenarios. Specifically, firstly, to reduce model complexity and thus improve refueling port detection speed, this invention replaces the C2f module in the YOLOv8n model with the LFP module. The LFP module improves detection efficiency by reducing computational load and parameter count while maintaining model feature processing capabilities. Compared to the original model, parameters, FLOPs, and model size are reduced by 23.59%, 25.61%, and 22.58%, respectively, while mAP50-95 and FPS are improved by 0.21% and 25%, respectively. Secondly, to address the issue of missed feature detection caused by lighting changes in complex scenarios, this invention adds a CAM module to the core of the model. This module enhances the saliency of regions where refueling port features are not obvious, making the model focus more on feature extraction from the refueling port area, thereby effectively reducing missed feature detections. Compared to the original model, the parameters, FLOPs, and model size metrics decreased by 22.59%, 24.39%, and 20.97%, respectively, while the mAP50-95 and FPS metrics improved by 0.63% and 19.56%, respectively. Finally, to address interference from similar features caused by the uncertainty of the target location in complex scenes, a DAM module was introduced into the model's Neck section. This module effectively suppresses interfering features from both global and local perspectives, thereby reducing false detections of these features. Compared to the original model, the parameters, FLOPs, and model size metrics decreased by 22.59%, 24.39%, and 20.97%, respectively, while the mAP50-95 and FPS metrics improved by 1.15% and 19.56%, respectively. Therefore, the design and synergistic effect of these three modules significantly improved the YOLO-LCD model's performance in filling port detection in complex scenes.
[0140] The YOLO-LCD model proposed in this invention improves both real-time performance and detection accuracy, meeting the requirements for efficient, accurate, and stable filling port detection in complex scenarios, and providing a guarantee for efficient and safe filling operations of autonomous filling arms.
[0141] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the scope of the invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
[0142] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A fuel tank filling port detection system with an autonomous filling arm, characterized in that: This includes an image acquisition platform that acquires image data of fuel tank filling ports in complex scenarios, constructs a fuel tank filling port dataset, and uses professional image annotation tools to annotate the acquired fuel tank filling port data images, dividing the fuel tank filling port data images into training set, validation set and test set according to proportion; Based on the YOLOv8n model, a lightweight feature processing module (LFP) is fused to reduce the computational complexity of the model and improve the real-time performance of detection, resulting in the YOLOv8n+LFP model. Based on the YOLOv8n+LFP model, a cascaded attention mechanism module (CAM) is fused to improve the model's feature extraction capability and reduce the model's feature miss detection, resulting in the YOLOv8n+LFP+CAM model. Based on the YOLOv8n+LFP+CAM model, the dual-view attention mechanism module (DVAM) is fused to improve the model's interference suppression capability and reduce the model's feature false detection, resulting in the YOLO-LCD model. The YOLO-LCD model was trained to obtain the injection port detection model; The filling port detection model was tested using a test set, and its performance was evaluated. The injection port detection is performed using a trained injection port detection model.
2. The fuel tank filling port detection system of the autonomous refueling arm according to claim 1, characterized in that: The YOLOv8n-based model, fused with a lightweight feature processing module, yields the YOLOv8n+LFP model, including: The YOLOv8n model includes a C2f module. All C2f modules in the YOLOv8n model are replaced with lightweight feature processing modules, which achieve lightweight feature processing through convolution, average pooling, multilayer perceptron, activation functions, and feature multiplication operations.
3. The fuel tank filling port detection system of the autonomous refueling arm according to claim 2, characterized in that: The C2f module of the YOLOv8n model has been completely replaced with a lightweight feature processing module, which performs convolution, average pooling, multilayer perceptron, activation functions, and feature multiplication operations. The lightweight feature processing module includes: f I =PConv(f P ) f G =Sigmoid((MLP(MLP(GAP(f I ))))) f O =f I ×f G In the formula, PConv(·) is a partial convolution, GAP(·) is a global average pooling, Sigmoid(·) is an activation function, MLP(·) is a multilayer perceptron, and f o For the LFP module output features, f P Given the input feature map, f I For the feature map, f G For feature maps; PConv convolution is used on the input feature map f P Feature extraction is performed on 1 / 4 of the channels, and the extracted features are concatenated with the remaining feature channels to obtain the feature map f. I ; For f I Average pooling is performed, and a multilayer perceptron is applied to scale the pooled features through channels. The LFP module finds a balance between global and detail features and selectively amplifies key details while retaining more important detail features. The feature map f is obtained by normalizing each channel using the Sigmoid function. G ; feature map f I with f G The LFP module extracts the features of the filling port in real time by performing fusion to highlight the key features of the filling port target.
4. The fuel tank filling port detection system of the autonomous refueling arm according to claim 3, characterized in that: The YOLOv8n+LFP model, fused with a cascaded attention mechanism (CAM) module, yields the YOLOv8n+LFP+CAM model, which includes: The YOLOv8n model includes a Backbone section, with a Cascaded Attention (CAM) module added to the Backbone section. Through feature transformation, convolution, max pooling, average pooling, activation functions, concatenation, and feature multiplication operations, the CAM module improves the model's feature extraction capabilities and reduces the model's missed features.
5. The fuel tank filling port detection system of the autonomous refueling arm according to claim 4, characterized in that: The calculation formula for the Cascaded Attention Mechanism (CAM) module is as follows: f c =reshape(Conv1d(reshape(f s )) f avg =GAP(f c ) f max =maxpool(f c ) f L =Sigmoid(Conv2d(concate(f avg +f max ))) f e =f s ×f c ×f L In the formula, Conv1d(·) is a one-dimensional convolution, reshape(·) is a feature transformation, maxpool(·) is the maximum pooling along the channel direction, avgpooling(·) is the average pooling along the channel direction, concate(·) is feature concatenation, Conv2d(·) is a two-dimensional convolution, and f e For the output characteristics of the CAM module, f s For the characteristics of the filling port, f c For the characteristics of the filling port, f L For the characteristics of the filling port, f avg and f max All of these features are spliced together; For the characteristics of the filling port f s Perform one-dimensional convolution processing to further extract the injection port features and obtain feature f. c In the channel direction, the CAM module targets feature f. c The feature f is obtained by performing average pooling separately. avg The CAM module performs max pooling to obtain the output feature fmax; Average pooling preserves global information about the filling port, making the CAM module robust in extracting overall features of the filling port; Max pooling captures the strongest response at each location, and the CAM module focuses on the salient region of the injection port target, enhancing the salience of the injection port features; By splicing feature f avg and f max The CAM module enables a comprehensive understanding of the filling port features from both global and local perspectives, and fuses the spliced features to enhance the learning ability of the filling port features. The CAM module then obtains the feature f through two-dimensional convolution and the Sigmoid function. L Highlight the location of the injection port on the feature map; The CAM module then adds feature f s f c and f L Fusion is used to enhance the features of the injection port that are affected by light, thereby reducing the model's missed features.
6. The fuel tank filling port detection system of the autonomous refueling arm according to claim 5, characterized in that: The YOLOv8n+LFP+CAM model is fused with a dual-view attention mechanism module (DVAM) to improve the model's interference suppression capability and reduce feature false detections, resulting in the YOLO-LCD model, which includes: The YOLOv8n model includes a Neck part, and a dual-view attention mechanism module is added to the three output positions of the Neck part. Through max pooling, global average pooling, one-dimensional convolution, feature transformation, activation function, feature addition and feature multiplication operations, the interference suppression capability of the model is improved and the false detection of features is reduced.
7. The fuel tank filling port detection system of the autonomous refueling arm according to claim 6, characterized in that: The calculation formula for the dual-vision attention mechanism module is as follows: f m =MaxPooling(f f ) f j =Sigmoid(Conv1d(reshape(f m ))) f q =Sigmoid(Conv1d(GAP(f m ))) f z =f f ×(f j +f q ) In the formula, MaxPooling(·) is local max pooling, AvgPooling(·) is global average pooling, and f z For the output characteristics of the DAM module, f f For the input features, f m For output features, f q For global features, f j To obtain features; The input feature f is processed by local max pooling. f Processing is performed to obtain the output feature f m, It suppresses interference features in non-filling port areas and reduces subsequent computational load; The global vision portion of the DAM module first extracts overall features through global average pooling, and then generates global features f by sequentially passing them through one-dimensional convolution and the sigmoid function. q ; The DAM module, through self-learning, reduces the weight of non-filling port areas while increasing the weight of filling port areas, effectively suppressing significant interference information. The local vision portion of the DAM module first transforms the features into one-dimensional features, then uses one-dimensional convolution to learn the feature information of each region in the feature map, and finally obtains the feature f using the Sigmoid function. j ; The features output from the global and local views are summed and mapped back to the input feature map. This ensures that interference information can be suppressed for each region in the input feature map from both the global and local views, thereby reducing the model's false detection of interference features.
8. A detection method for a fuel tank filling port detection system using an autonomous filling arm as described in claim 7, characterized in that: The control method includes the following steps: S1. Acquire image data of fuel tank filling port under complex scenarios through an image acquisition platform, construct a fuel tank filling port dataset, and after labeling the acquired fuel tank filling port data images, divide them into training set, validation set and test set according to the proportion; S1.
1. Use a depth camera to collect image data of the filling port under different layouts of the fuel tank, different lighting conditions, different shooting distances and shooting angles; S1.
2. Label the image data of the filling port to obtain the real labels, and then divide the image data into training set, validation set and test set according to 6:2:
2. S2. Based on the YOLOv8n model, a lightweight feature processing module (LFP) is fused to obtain the YOLOv8n+LFP model; S3. Based on the YOLOv8n+LFP model, the cascaded attention mechanism module (CAM) is fused to obtain the YOLOv8n+LFP+CAM model; S4. Based on the YOLOv8n+LFP+CAM model, the dual-view attention mechanism module (DVAM) is fused to obtain the YOLO-LCD model; S5. Train the YOLO-LCD model to obtain the filling port detection model; test the filling port detection model using the test set; evaluate the performance of the filling port detection model. S5.1 The training and testing of the filling port detection model are carried out in the same environment to minimize the interference of external factors on the experimental results. S5.2 Further verify the effectiveness and stability of the YOLO-LCD model; S5.
3. The YOLO-LCD model is fully trained using the training set and validation set to obtain the detection model for the fuel tank filling port target. Then, the fuel tank filling port target detection model is tested using the test set. S5.4 The performance of the filling port detection model is evaluated using evaluation metrics. These metrics verify the effectiveness of the YOLO-LCD model in filling port target detection and further assess the model's classification and target detection performance. The calculation formulas for the evaluation metrics are as follows: In the formula, TP represents the number of samples correctly predicted as the positive class of the target, i.e., the number of samples that are actually the positive class of the target and are correctly detected by the model; FP represents the number of samples that are predicted as the positive class of the target but are actually not the target, i.e., the number of samples that the model incorrectly detects as targets; FN represents the number of samples that are actually the positive class of the target but are incorrectly predicted as not the target, i.e., the number of samples that the model misses; TP+FP represents the total number of samples predicted as positive by the model; TP+FN represents the number of samples that are actually positive. time represents the time required for the model to process each frame of the image, in milliseconds. S6. Use the trained filling port detection model to detect the filling port and obtain the target area of the filling port.