A kind of light YOLO-based tank mouth flange real-time detection method and system

By using the lightweight YOLO model (YOLO-LFP) for tank flange inspection, the problem of slow inspection speed of oil tank trucks has been solved, enabling rapid and accurate confirmation of flange condition, reducing safety risks, and improving operational efficiency and safety.

CN122347700APending Publication Date: 2026-07-07LIANYUNGANG TOP TECH DEV CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-03
Publication Date
2026-07-07

AI Technical Summary

Technical Problem

Existing methods for inspecting tanker flanges on oil tankers are slow in complex and variable operating environments, failing to provide rapid and real-time status confirmation. This leads to extended loading and unloading waiting times, increased oil exposure time to air, and safety risks.

Method used

The lightweight YOLO model (YOLO-LFP) is used for tank flange inspection. By introducing the LFP module to replace the C3K2 module, the number of model parameters and computational load are reduced. The CSAF module is used for feature processing to improve the detection speed and accuracy.

Benefits of technology

It significantly improves detection speed, achieves 99.1% detection accuracy, shortens flange condition confirmation and docking preparation time, reduces the risk of oil volatilization and static electricity accumulation, and improves operational safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122347700A_ABST
    Figure CN122347700A_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of machine vision, and discloses a kind of oil tank truck tank mouth flange rapid detection method, system, the method comprises: collecting oil tank truck tank mouth flange data image, constructs oil tank truck tank mouth flange dataset;With YOLOv11n real-time detection model as basic model, fusion lightweight feature processing (Lightweight Feature Processing, LFP) module, obtain YOLO-LFP lightweight real-time detection model;YOLO-LFP lightweight real-time detection model is trained and tested, and oil tank truck tank mouth flange lightweight real-time detection model is obtained;YOLO-LFP lightweight real-time detection model is carried out performance evaluation;YOLO-LFP lightweight real-time detection model is used to carry out oil tank truck tank mouth flange rapid detection.The scheme of the present application is helpful to realize the rapid detection of oil tank truck tank mouth flange in multiple scenes, effectively shorten the oil tank truck loading and unloading process time, reduce the safety risk in operation process, provide strong support for the efficiency improvement and safety risk reduction of oil tank truck loading and unloading operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of machine vision technology and relates to target detection technology based on deep learning, specifically a method and system for real-time detection of tank flanges based on lightweight YOLO. Background Technology

[0002] Tank trucks, as crucial tools for transporting hazardous chemicals, crude oil, and other liquid media, typically operate in flammable and explosive environments, placing high demands on both efficiency and safety. During loading and unloading, the tank flange is a critical component for achieving a sealed connection during material transfer. Its structural integrity, sealing performance, and docking condition directly affect whether oil leaks or abnormal volatilization occurs. On-site verification of the tank flange's condition is often a key step before loading and unloading begins, and the time spent on this step directly determines the overall duration of the operation. Longer docking times increase the oil's contact time with air, leading to accumulated risks such as volatilization loss, static electricity buildup, and leakage diffusion. This also increases the exposure time of personnel in hazardous environments, significantly raising safety hazards. Therefore, while ensuring accuracy, shortening the time for tank flange inspection and docking verification, and improving inspection speed, are of significant practical importance.

[0003] With the development of machine vision and intelligent recognition technologies, vision-based automatic inspection methods have been gradually introduced into the field of industrial inspection. However, they still have shortcomings in the inspection of tanker flanges on oil tankers. Existing methods, such as the YOLO series of algorithms, have achieved a good balance between detection accuracy and speed, but their network structure still has redundancy and requires relatively long image processing and computation time, making it impossible to achieve faster response in on-site operations. This also leads to longer waiting times for loading and unloading docking.

[0004] In summary, existing inspection methods still have room for improvement in terms of inspection speed for tank truck flanges. Therefore, achieving rapid, real-time inspection of tank truck flanges in complex and variable operating environments, significantly shortening flange condition confirmation and docking preparation time, reducing the contact time between oil and air, and mitigating the safety risks that accumulate over time has become an urgent technical problem to be solved in this field. Summary of the Invention

[0005] In view of the shortcomings of existing tank truck flange inspection methods mentioned in the background art, this invention provides a real-time inspection method and system for tank truck flanges based on lightweight YOLO, which has the advantages of significantly improving inspection speed and realizing rapid inspection of tank truck flanges, thus solving the technical problems mentioned in the background art.

[0006] This invention provides the following technical solution: a method and system for real-time detection of tank flanges based on lightweight YOLO, comprising: S1: Using dataset collection facilities, image data of tank truck flanges in different postures under multiple scenarios are collected. The collected data is labeled and divided to construct a tank truck flange dataset, which includes a training set, a validation set and a test set.

[0007] S2: Based on the YOLOv11n real-time detection model, the YOLO-LFP model is obtained by fusing the LFP module; the LFP module is used to reduce the number of model parameters and computational cost, and improve the detection speed of the model. S3: Train the constructed YOLO-LFP model to obtain a real-time detection model for lightweight tanker flanges; test and verify the model using a test set; evaluate the performance of the YOLO-LFP model using relevant metrics. S4: Conduct actual testing using a real-time detection model for lightweight tanker flanges that meets the test requirements.

[0008] Preferably, step S2 includes: replacing the C3K2 module in the Neck part of the YOLOv11n model with an LFP module, wherein the LFP module mainly consists of a Channel Split Attention Fusion (CSAF) module, convolution, feature addition, and concatenation.

[0009] Preferably, the module also includes a CSAF module consisting of channel splitting, depthwise separable convolution, max pooling, sigmoid activation function, feature multiplication, and feature concatenation, which efficiently processes the input features. While ensuring detection accuracy, this effectively reduces the number of model parameters and computational load, thereby improving the detection speed of tanker flanges.

[0010] Preferably, it includes: first, inputting feature maps It is split into two sub-feature maps according to the channel dimension. and These are used for different feature processing. Secondly, depthwise separable convolution pairs are used for sub-feature maps. Perform feature transformation to obtain features This effectively reduces the number of parameters and computational cost while enhancing the network's ability to model local and contextual information. Simultaneously, it improves the sub-feature maps... The features are obtained by sequentially performing global max pooling, sigmoid activation function multiplication, and feature multiplication. This achieves adaptive enhancement of key channel information and suppression of irrelevant channels. Finally, the features... and The data is concatenated along the channel dimension to form the fused output features. This ensures the model's feature representation ability and detection accuracy while maintaining low computational complexity. The CSAF module calculation formula is as follows: In the formula, It is a channel splitting operation; It is a depthwise separable convolution; It is global max pooling; It is an activation function; It's a splicing operation.

[0011] Preferably, when evaluating the performance of the YOLO-LFP model, Precise, Recall, mAP@0.5, FPS, and Param are used as evaluation indicators to evaluate the accuracy and speed of the tanker flange inspection.

[0012] Preferably, the evaluation index calculation formula is as follows: Preferably, rapid detection of tank truck flanges is achieved through the collaborative work of multiple functional modules, including a dataset construction module, a lightweight feature processing module, a model training and testing module, and a rapid detection module for tank truck flanges. The dataset construction module collects image data from multiple scenarios and constructs a tank truck flange dataset by labeling and partitioning the collected data. The lightweight feature processing module uses the YOLOv11n real-time detection model as a foundation and integrates the LFP module to obtain the YOLO-LFP model. The LFP module reduces the number of model parameters and computational load, improving the model's detection speed. The model training and testing module trains the constructed YOLO-LFP model to obtain a lightweight real-time detection model for tank truck flanges. The model is then tested and validated using a test set. The performance of the YOLO-LFP model is evaluated using relevant metrics. The rapid detection module uses the lightweight real-time detection model for tank truck flanges, whose test results meet the requirements, for actual detection.

[0013] The present invention has the following beneficial effects: 1. This invention introduces the LFP lightweight module to replace the original C3K2 module, which enables the model to reduce the number of parameters and the amount of computation while maintaining high detection accuracy. This greatly reduces the redundancy of the network structure and significantly improves the response speed of image processing.

[0014] 2. By designing a CSAF module that includes channel splitting and attention fusion, this invention enables the model to accurately capture the key features of tank flanges in complex and ever-changing operating environments. In testing, it achieved a detection accuracy of 99.1%, effectively avoiding false detections or missed detections caused by environmental interference.

[0015] 3. By increasing the model detection speed, this invention can significantly shorten the flange condition confirmation time before loading and unloading operations, thereby reducing the risk of oil contact with air and static electricity accumulation, reducing the exposure time of operators in hazardous environments, and improving the overall safety of operations. Attached Figure Description

[0016] Figure 1 This is a flowchart of a rapid detection method for tanker flanges of oil tankers disclosed in an embodiment of the present invention; Figure 2 This is a schematic diagram of the LFP module disclosed in an embodiment of the present invention; Figure 3 This is a schematic diagram of the principle structure of a CSAF module disclosed in an embodiment of the present invention; Figure 4 This is a schematic diagram of the structure of the lightweight real-time detection model for the tanker flange of an oil tanker disclosed in an embodiment of the present invention; Figure 5 This is a schematic diagram of the structure of a rapid detection system for tanker flanges of oil tankers disclosed in an embodiment of the present invention. Detailed Implementation

[0017] 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. Example 1:

[0018] Please see Figure 1 This invention discloses a rapid inspection method for the flange at the mouth of an oil tanker. The specific steps are as follows: S1. Using dataset collection facilities, image data of tank truck flanges in different postures under various scenarios are collected. A tank truck flange dataset is constructed by labeling and segmenting the collected data. The dataset includes a training set, a validation set, and a test set. Specific steps are as follows: S1.1. Take photos of the tanker truck's flange in different positions, postures, and scenarios using a dataset acquisition device to collect a sufficient number of data images. S1.2. Use annotation software to annotate the collected data images to obtain category information and regression box information, and divide the annotated dataset into training set, validation set and test set according to a certain ratio; S2. Based on the YOLOv11n real-time detection model, the YOLO-LFP model is obtained by fusing the LFP module; the LFP module is used to reduce the number of model parameters and computational load, and improve the detection speed of the model.

[0019] Tanker trucks transport oil and chemicals with flammable and volatile properties. During loading and unloading operations, the longer the operation time, the longer the contact time between the medium and air, increasing the probability of volatilization. If adverse factors such as static electricity accumulation are also present, it further increases the risk of fire and explosion accidents. Therefore, improving the inspection speed of tanker flanges, shortening the preparation time for loading and unloading operations, and promptly identifying sealing hazards are crucial for reducing the risk of medium volatilization, minimizing static electricity-induced hazards, and improving overall operational safety. The backbone network of the YOLOv11n model primarily undertakes the function of basic feature extraction. Its output features are used to characterize the texture, edges, and mid-to-high-level semantic information of the image, playing a decisive role in the overall detection accuracy. The Neck structure, on the other hand, is mainly used for multi-scale feature fusion and information reorganization, focusing more on processing and transferring existing features. Therefore, the numerous convolutional operations and channel transformations included in the C3K2 module of the Neck part to some extent lead to repetitive processing of similar features, causing computational redundancy and increasing inference latency. In view of this, this invention proposes a method to ensure that the feature extraction capability of the backbone network is not compromised. Figure 2 The LFP module shown is used to replace the C3K2 module in Neck with a lightweight version. This can significantly reduce the number of parameters and computational load without affecting the detection accuracy as much as possible, thereby effectively improving the real-time performance of tanker flange detection.

[0020] The core of the LFP module lies in, for example, Figure 3 The CSAF module design is shown below. In this embodiment, the CSAF module first processes the input feature map... It is split into two sub-feature maps according to the channel dimension. and These are used for different feature processing. Secondly, depthwise separable convolution pairs are used for sub-feature maps. Perform feature transformation to obtain features This effectively reduces the number of parameters and computational cost while enhancing the network's ability to model local and contextual information. Simultaneously, it improves the sub-feature maps... The features are obtained by sequentially performing global max pooling, sigmoid activation function multiplication, and feature multiplication. This achieves adaptive enhancement of key channel information and suppression of irrelevant channels. Finally, the features... and The data is concatenated along the channel dimension to form the fused output features. This ensures the model's feature representation ability and detection accuracy while maintaining low computational complexity. The CSAF module calculation formula is as follows: In the formula, It is a channel splitting operation; It is a depthwise separable convolution; It is global max pooling; It is an activation function; It's a splicing operation.

[0021] S3. Train the constructed YOLO-LFP model to obtain a real-time detection model for lightweight tanker flanges; test and verify the model using a test set; evaluate the performance of the YOLO-LFP model using relevant metrics. The specific steps are as follows: S3.1, such as Figure 4 As shown, the hardware and software configurations used in the training and testing of the model of this invention are identical. The computer operating system is Windows 10, the CPU is an AMD Ryzen 74800H, and the GPU is a GeForce RTX 2060. The software uses the PyTorch deep learning framework in PyCharm Community Edition, with a compilation environment of Python 3.9.13 + CUDA 11.6.2 + PyTorch 2.0.1.

[0022] S3.2 The model of this invention uses the same hyperparameter settings during training and testing. The training period is 100, the input size is 640×640, the batch size is 8, the optimizer is Adam, the momentum is 0.937, and the initial learning rate is 0.01.

[0023] S3.3. Train the YOLO-LFP lightweight real-time detection model using the training and validation sets, and then use the model to perform detection on the test set.

[0024] S3.4 After the test is completed, the performance of the YOLO-LFP lightweight real-time detection model is evaluated.

[0025] In this embodiment, when evaluating the performance of the YOLO-LFP model, Precise, Recall, mAP@0.5, Param, FLOPs, and FPS were used as evaluation metrics to verify the accuracy and speed of the tanker flange inspection. The calculation formulas for the evaluation metrics are as follows: S3.5. Use the YOLO-LFP lightweight real-time detection model, which has been trained and tested, to perform actual detection of the tanker flange of the oil tanker.

[0026] To demonstrate the superiority of the proposed model in achieving rapid detection of tanker flanges, the test results of the model are compared with those of some mainstream detection models in recent years, as shown in Table 1.

[0027] Table 1 As shown in Table 1, the YOLO-LFP lightweight real-time detection model exhibits the best detection performance across multiple performance metrics. This is mainly due to the LFP module proposed in this invention, which improves the model's detection speed while ensuring that the model's detection accuracy does not decrease significantly, thereby enabling rapid and accurate detection of tanker flanges in various scenarios. Example 2

[0028] like Figure 5 As shown, the present invention provides a rapid inspection system for tanker flanges on oil tankers, specifically comprising: The dataset construction module is used to collect image data from multiple scenarios and to construct a tanker flange dataset by labeling and segmenting the collected data. The lightweight feature processing module is based on the YOLOv11n real-time detection model. By fusing the LFP module, a YOLO-LFP model is obtained. The LFP module is used to reduce the number of model parameters and computational cost, thereby improving the detection speed of the model. The model training and testing module trains the constructed YOLO-LFP model to obtain a real-time detection model for lightweight tanker flanges; it uses a test set to test and verify the model; and it uses relevant metrics to evaluate the performance of the YOLO-LFP model. The rapid inspection module for tanker flanges of oil tankers utilizes a lightweight real-time inspection model of tanker flanges that meets the test requirements for actual inspection.

[0029] In an optional embodiment, the method for detecting the fuel tank filling port of the autonomous refueling arm includes: a) collecting image data of fuel tanker flanges exhibiting different postures in multiple scenarios, and constructing a fuel tanker flange dataset by labeling and dividing the collected data, the dataset including a training set, a validation set, and a test set; b) obtaining a YOLO-LFP model by fusing the LFP module based on the YOLOv11n real-time detection model; c) training the constructed YOLO-LFP model to obtain a lightweight real-time detection model for fuel tanker flanges; testing and validating the model using the test set; evaluating the performance of the YOLO-LFP model using relevant metrics; and d) performing actual detection using the lightweight real-time detection model for fuel tanker flanges that meets the test results requirements.

[0030] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.

[0031] 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 real-time inspection method for tank flanges based on lightweight YOLO, characterized in that, include: S1: Using dataset collection facilities, image data of tank truck flanges in different poses under multiple scenarios are collected. The collected data is labeled and divided to construct a tank truck flange dataset, which includes a training set, a validation set and a test set. S2: Based on the YOLOv11n real-time detection model, the YOLO-LFP model is obtained by fusing the LFP module; the LFP module is used to reduce the number of model parameters and computational cost, and improve the detection speed of the model. S3: Train the constructed YOLO-LFP model to obtain a real-time detection model for lightweight tanker flanges; test and verify the model using a test set; evaluate the performance of the YOLO-LFP model using relevant metrics. S4: Conduct actual testing using a real-time detection model for lightweight tanker flanges that meets the test requirements.

2. The method for real-time detection of tank flanges based on lightweight YOLO according to claim 1, characterized in that, Step S2 includes replacing the C3K2 module in the Neck part of the YOLOv11n model with the LFP module, wherein the LFP module mainly consists of a Channel Split Attention Fusion (CSAF) module, convolution, feature addition and concatenation.

3. The method for real-time detection of tank flanges based on lightweight YOLO according to claim 2, characterized in that, Also includes: CS The AF module consists of channel splitting, depthwise separable convolution, max pooling, sigmoid activation function, feature multiplication and feature concatenation, etc., to efficiently process input features; While ensuring detection accuracy, the number of model parameters and computational load are effectively reduced, thereby improving the detection speed of tanker flanges.

4. The method for real-time detection of tank flanges based on lightweight YOLO according to claim 3, characterized in that, include: First, input feature map It is split into two sub-feature maps according to the channel dimension. and These are used for different feature processing; secondly, depthwise separable convolution pairs are used for sub-feature maps. Perform feature transformation to obtain features While effectively reducing the number of parameters and computational cost, it enhances the network's ability to model local and contextual information; at the same time, it improves the sub-feature maps. The features are obtained by sequentially performing global max pooling, sigmoid activation function multiplication, and feature multiplication. This achieves adaptive enhancement of key channel information and suppression of irrelevant channels; finally, the features... and The data is concatenated along the channel dimension to form the fused output features. This ensures the model's feature representation ability and detection accuracy while maintaining low computational complexity; the CSAF module calculation formula is as follows: In the formula, It is a channel splitting operation; It is a depthwise separable convolution; It is global max pooling; It is an activation function; It's a splicing operation.

5. The method for real-time detection of tank flanges based on lightweight YOLO according to claim 1, characterized in that: When evaluating the performance of the YOLO-LFP model, Precision, Recall, mAP@0.5, FPS, and Param were used as evaluation indicators to assess the accuracy and speed of the tanker flange inspection.

6. The method for real-time detection of tank flanges based on lightweight YOLO according to claim 1, characterized in that: The formulas for calculating the evaluation indicators are as follows:

7. A real-time inspection system for tank flanges based on lightweight YOLO, characterized in that: This system achieves rapid detection of tank truck flanges through the collaborative work of multiple functional modules, including a dataset construction module, a lightweight feature processing module, a model training and testing module, and a rapid detection module for tank truck flanges. The dataset construction module collects image data from multiple scenarios and constructs a tank truck flange dataset by labeling and partitioning the collected data. The lightweight feature processing module uses the YOLOv11n real-time detection model as a foundation and integrates the LFP module to obtain the YOLO-LFP model. The LFP module reduces the number of model parameters and computational load, improving the model's detection speed. The model training and testing module trains the constructed YOLO-LFP model to obtain a lightweight real-time detection model for tank truck flanges. The model is then tested and validated using a test set. The performance of the YOLO-LFP model is evaluated using relevant indicators; the rapid detection module for tanker flanges of oil tankers is used for actual detection using a lightweight real-time detection model for tanker flanges that meets the test requirements.