A visual inspection robot for detecting defects on the inner surface of oil and gas pipelines

By designing an oil and gas pipeline detection robot with a rotary cleaning unit and sapphire lens, the problem of stains affecting image quality is solved, and defect detection with high accuracy and stability is achieved, improving the detection effect and the robot's operation ability in complex environments.

CN120062472BActive Publication Date: 2025-08-22SICHUAN DEYUAN PETROLEUM & GAS CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202510563326.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-08-22
Estimated Expiration
2045-04-30

AI Technical Summary

Technical Problem

Existing oil and gas pipeline detection robots are susceptible to stains in wet or corrosive environments, resulting in blurred or distorted images, reducing detection accuracy and increasing potential risks.

Method used

A visual detection robot for detecting internal surface defects of oil and gas pipelines was designed, equipped with a power unit, an image acquisition unit and a rotary cleaning unit. The rotary cleaning unit drives the glass lens to rotate, remove stains, ensure image quality, and use multi-section structure and sapphire lenses to improve stability and cleaning effect.

Benefits of technology

It effectively avoids the accumulation of stains on the lens, ensures image quality, improves the accuracy and stability of surface defect detection of oil and gas pipelines, reduces detection risks, and enhances the passing and flexibility of the robot in complex pipeline environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120062472B_ABST
    Figure CN120062472B_ABST
Patent Text Reader

Abstract

The present invention relates to a visual inspection robot for detecting defects on the inner surface of an oil and gas pipeline, belonging to the technical field of pipeline inspection, and comprising: a power unit, an image acquisition unit and a rotation cleaning unit, wherein the power unit is used to drive the robot to move inside the oil and gas pipeline; the image acquisition unit comprises: a camera and a processing module; the camera is arranged at the tail end of the image acquisition unit and is used to capture images of the inner surface of the oil and gas pipeline; the camera comprises a glass lens; the processing module is used to perform defect detection based on the captured images of the inner surface of the oil and gas pipeline; the power unit comprises a leather cup drive unit, which drives the visual inspection robot to move in the pipeline through the pressure difference between the rear end and the front end of the leather cup drive unit; the rotation cleaning unit drives the glass lens to rotate and removes stains on the outer side of the glass lens.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of pipeline detection, and in particular relates to a visual inspection robot used for detecting defects on the inner surface of an oil and gas pipeline. Background Art

[0002] Internal inspection of oil and gas pipelines is crucial to ensuring pipeline safety. This is because oil and gas pipelines may suffer from a series of problems such as corrosion, cracks, and blockages during long-term use. If these problems are not discovered and addressed in a timely manner, they may lead to serious safety hazards and even accidents.

[0003] Current oil and gas pipeline inspection robots mainly use image detection methods, using cameras to capture images of the interior of the pipeline and then determine whether there are defects on the pipeline surface based on the images.

[0004] Working within pipelines is susceptible to internal stains, especially in humid, oily, or corrosive environments. These stains can easily adhere to the robotic camera lens. When these stains drip or accumulate on the lens, they significantly reduce the camera's light transmittance and image quality, resulting in blurred or distorted images. This degradation in image quality directly impacts the identification and analysis of pipeline defects, leading to inaccurate or missed inspection results and significantly increasing potential risks. Summary of the Invention

[0005] In order to solve the above-mentioned problems in the prior art, the present invention provides a visual inspection robot for detecting defects on the inner surface of oil and gas pipelines.

[0006] In order to achieve the above object, the technical solution adopted by the present invention is:

[0007] The present invention provides a visual inspection robot for detecting defects on the inner surface of an oil and gas pipeline, comprising: a power unit, an image acquisition unit, and a rotation cleaning unit;

[0008] The power unit is used to drive the robot to move inside the oil and gas pipeline;

[0009] The image acquisition unit includes: a camera and a processing module;

[0010] The camera is arranged at the tail end of the image acquisition unit and is used to capture images of the inner surface of the oil and gas pipeline; the camera includes a glass lens;

[0011] The processing module is used to perform defect detection based on the captured images of the inner surface of the oil and gas pipeline;

[0012] The power unit includes a cup drive unit;

[0013] The visual inspection robot is driven to move in the pipeline by the pressure difference between the rear end and the front end of the leather cup drive unit;

[0014] The rotating cleaning unit drives the glass lens to rotate and removes the stains on the outer side of the glass lens.

[0015] The beneficial effects of the present invention are embodied in:

[0016] The present invention provides a visual inspection robot for detecting defects on the inner surface of oil and gas pipelines. The rotating cleaning unit can drive the glass lens to rotate, and remove the stains on the outside of the glass lens, so as to prevent these stains from dripping or accumulating on the lens and causing image blur or distortion, thereby ensuring image quality, improving the accuracy of oil and gas pipeline surface defect detection, and reducing potential risks. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is a structural schematic diagram of a visual inspection robot for detecting defects on the inner surface of a single-section oil and gas pipeline provided by the present invention.

[0018] Figure 2 This is a structural schematic diagram of a visual inspection robot for detecting defects on the inner surface of a double-section oil and gas pipeline provided by the present invention.

[0019] Figure 3 This is a schematic diagram of the external structure of an image acquisition unit provided by the present invention.

[0020] Figure 4 This is a schematic diagram of the internal structure of an image acquisition unit provided by the present invention.

[0021] Figure 5 This is a schematic diagram of the internal structure of an image acquisition unit provided by the present invention from another perspective.

[0022] Figure 6 This is a structural schematic diagram of a rotary cleaning unit provided by the present invention.

[0023] Figure 7 This is a schematic structural diagram of another rotary cleaning unit provided by the present invention.

[0024] Figure 8 This is a schematic structural diagram of another rotary cleaning unit provided by the present invention.

[0025] Explanation of the accompanying drawings: 1. Power unit; 2. Image acquisition unit; 3. Anti-collision head; 4. Anti-collision head base; 5. Mileage wheel unit; 51. Mileage wheel; 52. Mileage wheel base; 53. Mileage wheel bracket; 6. Rear end connecting cover; 7. Cross universal joint; 8. Front end connecting cover; 9. Tail end sealing head; 10. Rear end sealing head; 11. Processing module; 111. Computer; 112. Power control board; 12. Camera; 121. Glass lens; 13. Battery unit; 14. Leather cup drive unit; 15. Rotation cleaning unit; 151. Rotating mechanism housing; 1511. Air inlet; 1512. Air outlet; 152. Rotating fan blades; 153. DC motor; 154. Rotating gear; 155. Rotating pulley; 156. Belt. DETAILED DESCRIPTION

[0026] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.

[0027] The specific embodiments provided by the present invention are as follows:

[0028] Refer to the instruction manual Figures 1 to 8 One embodiment of the present invention provides a visual inspection robot for detecting inner surface defects of oil and gas pipelines, including: a power unit 1, an image acquisition unit 2, and a rotating cleaning unit 15.

[0029] The power unit 1 is used to drive the robot to move inside the oil and gas pipeline.

[0030] Alternatively, the power unit 1 may use an electric motor to drive the robot to move through a transmission system such as gears, chains or belts.

[0031] Furthermore, the power unit 1 may have a built-in backup power supply to extend the battery life, ensuring that the robot can operate stably for a long time in the pipeline.

[0032] The image acquisition unit 2 includes a camera 12 and a processing module 11 .

[0033] The camera 12 is provided at the rear end of the image acquisition unit 2 and is used to capture images of the inner surface of the oil and gas pipeline. The camera 12 includes a glass lens 121 .

[0034] The processing module 11 is used to perform defect detection based on the captured image of the inner surface of the oil and gas pipeline. The specific defect detection algorithm used by the processing module 11 will be described later.

[0035] The power unit 1 includes a cup drive unit 14. The visual inspection robot is driven to move in the pipeline by the pressure difference between the rear end and the front end of the cup drive unit 14.

[0036] The rotating cleaning unit 15 drives the glass lens 121 to rotate, and removes the dirt on the outer side of the glass lens 121.

[0037] The beneficial effects of the present invention are embodied in:

[0038] The present invention provides a visual inspection robot for detecting defects on the inner surface of oil and gas pipelines. The rotating cleaning unit can drive the glass lens to rotate, and remove the stains on the outside of the glass lens, so as to prevent these stains from dripping or accumulating on the lens and causing image blur or distortion, thereby ensuring image quality, improving the accuracy of oil and gas pipeline surface defect detection, and reducing potential risks.

[0039] In practical applications, the visual inspection robot can adopt a multi-section structure. A dual-section structure is used as a possible implementation. The visual inspection robot adopts a dual-section structure, wherein the first section includes a power unit 1, and the second section includes an image acquisition unit 2, a cup drive unit 14, and a rotation cleaning unit 15. The first and second sections are connected by a hinge. Specifically, the rear end connection cover 6 of the first section is connected to the front end connection cover 8 of the second section via a cross universal joint 7.

[0040] In this invention, a multi-segment structure is employed. As the pipe diameter changes, the robot can adjust its angle and shape through two hinged segments, allowing for smoother passage through the pipe and avoiding problems caused by narrow or curved pipes. This design not only improves the robot's maneuverability in complex pipelines but also enhances its overall stability and flexibility, ensuring the robot can efficiently perform tasks in changing pipeline environments and capture high-quality images, thereby improving the accuracy and reliability of defect detection.

[0041] Furthermore, the visual inspection robot's external structure consists of a pressure-bearing cylinder made of stainless steel to withstand the high-pressure environment inside the pipeline. The cylinder is open at both ends, with a flange at the front end to secure the entire system and ensure stability during operation within the pipeline.

[0042] Furthermore, sealed aluminum alloy sealing heads are installed at both ends of the pressure-bearing cylinder, namely the tail end sealing head 9 and the rear end sealing head 10. Sealing is achieved by adding sealing rings between the sealing heads and the cylinder. In addition to sealing, the tail end sealing head is also used to install an aviation plug to connect to the external circuit to achieve data transmission.

[0043] In one possible embodiment, the rotary cleaning unit 15 includes: a rotary mechanism housing 151 and a rotary blade 152. The rotary mechanism housing 151 is provided with an air inlet 1511 and an air outlet 1512, and an air flow channel is provided between the air inlet 1511 and the air outlet 1512. The rotary blade 152 is provided in the air flow channel. The rotary blade 152 is fixedly connected to the glass lens 121. The airflow at the rear end of the leather cup drive unit 14 enters the air flow channel through the air inlet 1511, driving the rotary blade 152 to rotate, thereby driving the glass lens 121 to rotate, and removing the stains on the outside of the glass lens 121.

[0044] In the present invention, the airflow from the rotating cleaning unit 15 drives the rotating blades. The force of the airflow efficiently and continuously drives the rotating blades, ensuring a stable cleaning effect while also preventing image quality from being affected by accumulated stains, thereby improving image clarity and detection accuracy. This design eliminates the need for manual intervention and automatically cleans the lens during robot operation, reducing maintenance costs and improving reliability over extended periods of operation.

[0045] In actual use, due to the unstable air pressure in the pipeline, a dual-joint robot may experience a large pressure differential between the two ends of the tail robot's leather cup and a small pressure differential between the two ends of the front robot's leather cup. This can cause the tail robot to push the front robot, and the cross universal joint coupling between the two to operate in a folded state, affecting the overall movement of the robot and the tail robot's photography quality. Therefore, a tail-end motor version of the rotary cleaning mechanism was designed. The tail robot's sealing leather cup was replaced with a supporting leather cup, and the rotating fan blade was modified to a rotating gear. The gear installed on the motor drives the rotating gear to rotate, thereby achieving cleaning of the tail end of the tail robot.

[0046] In one possible embodiment, the rotary cleaning unit 15 includes a rotary mechanism housing 151, a DC motor 153, and a rotary gear 154. The rotary mechanism housing 151 houses the DC motor 153 and the rotary gear 154. The DC motor 153 is in driving connection with the rotary gear 154. The glass lens 121 is fixedly connected to the rotary gear 154. The DC motor 153 drives the rotary gear 154 to rotate, which in turn drives the glass lens 121 to rotate, removing dirt from the outer surface of the glass lens 121.

[0047] In the present invention, a DC motor 153 drives a rotating gear 154, which in turn rotates the glass lens 121, thereby removing stains from the outside of the glass lens 121. The DC motor 153 provides stable power, and the rotating gear 154 efficiently transmits the rotational force, ensuring continuous rotation of the glass lens 121 and removing stains. This drive method is simple and reliable, and can automatically clean the glass lens 121 during robot operation, preventing image quality degradation caused by stain accumulation, ensuring image clarity and detection accuracy, thereby improving the effectiveness of oil and gas pipeline surface defect detection and the robot's ability to operate stably over the long term.

[0048] In one possible embodiment, the rotary cleaning unit 15 includes a rotary mechanism housing 151, a DC motor 153, and a rotating pulley 155. The rotary mechanism housing 151 houses the DC motor 153, the rotating pulley 155, and a belt 156. The DC motor 153 is connected to the rotating pulley 155 via the belt 156. The glass lens 121 is fixedly connected to the rotating pulley 155. The DC motor 153 drives the rotating pulley 155 via the belt 156, which in turn drives the glass lens 121 to rotate, removing dirt from the outside of the glass lens 121.

[0049] In this invention, the belt drive offers advantages such as simple structure, smooth operation, low noise, and strong vibration damping capabilities. It effectively reduces the vibration and wear caused by direct rigid connections, extending system life. Furthermore, the cleaning mechanism operates continuously during operation, ensuring the lens remains clean and transparent, guaranteeing image acquisition quality and improving the accuracy and stability of oil and gas pipeline defect detection. In one possible embodiment, the visual inspection robot further includes a battery unit 13, an odometer unit 5, and an LED fill light unit.

[0050] The battery unit 13 is used to supply power to the camera 12 and the processing module 11 .

[0051] The mileage wheel unit 5 is used to record the movement mileage.

[0052] The LED fill light unit is used to fill light inside the oil and gas pipeline.

[0053] It's important to note that the power system design is a critical component of a visual inspection robot. The battery is first connected to the switching circuit, whose load terminal is then connected to the power supply section of the power circuit. This power circuit is responsible for providing the required voltages for the odometer, camera optocoupler input, industrial camera, and pocket computer.

[0054] Specifically, the odometer and camera optocoupler inputs receive 5V, while the industrial camera and pocket computer each receive 12V. To prevent the pocket computer from shutting down due to a drop in battery voltage during LED operation, a farad capacitor is connected in parallel across the battery to provide instantaneous high current output, ensuring power stability during high-load operation.

[0055] In a possible implementation, the glass lens 121 on the camera 12 is made of sapphire material.

[0056] The sapphire material can withstand a pressure of up to 10 MPa, ensuring protection of the internal system in a high-pressure environment and preventing damage to the camera 12. The sapphire glass lens 121 protects the camera 12 so that it can operate in a high-pressure environment of 10 MPa.

[0057] In this invention, the hardness and pressure resistance of sapphire effectively protects the camera lens and internal systems from damage or cracking in harsh environments, ensuring reliable and long-term image acquisition. This not only improves the durability of the device but also extends the life of the camera, ensuring continuous high-quality defect detection in high-pressure and harsh environments.

[0058] In one possible embodiment, the processing module 11 includes a computer 111, a power control board 112, and an LED control board. The power control board 112 is connected to the battery unit 13. The power control board 112 and the camera 12 are also connected to the computer 111. The camera 12, the odometer unit 5, the LED control board, and the LED fill light unit are all connected to the power control board. The LED control board is used to implement the fill light function of the LED fill light unit. The configuration of the LED fill light unit ensures clear image capture in low-light environments.

[0059] In this invention, when the robot encounters insufficient light inside an oil or gas pipeline, the LED fill light unit provides sufficient light, ensuring that camera 12 can capture clear, bright images. This design not only improves image acquisition quality but also enhances the ability to perform inspection tasks in complex, dimly lit environments, ensuring the accuracy and reliability of defect detection.

[0060] In one possible embodiment, the odometry wheel unit 5 includes an odometry wheel 51, an odometry wheel base 52, an odometry wheel bracket 53, a rotating shaft, a magnet, and a magnetic encoder. The odometry wheel bracket 53 is connected to the odometry wheel base 52, and the odometry wheel 51 is mounted on the odometry wheel bracket 53 via a rotating shaft. A radially magnetized magnet is mounted on the rotating shaft, located at the geometric center of the rotating shaft. When the visual inspection robot operates within a pipeline, the odometry wheel 51 contacts the inner wall of the pipeline, driving the rotating shaft connected via a key to rotate. As the rotating shaft rotates, the magnet rotates with it. The magnetic encoder senses the change in magnet position and generates a pulse signal, which triggers the camera 12 to capture an image.

[0061] It's important to note that when the system operates in a pipeline, the odometer wheel contacts the inner wall and rotates accordingly. A magnetic encoder, working in conjunction with a radially magnetized magnet mounted on the odometer wheel's shaft, senses the wheel's mileage and generates pulse signals. These pulse signals are then transmitted to the optocoupler input of the industrial camera. The optocoupler outputs a capture pulse signal based on the number of received pulses and a preset pulse count.

[0062] Furthermore, when the optocoupler input receives a preset number of pulse signals, indicating that the odometer wheel has traveled a fixed distance, camera 12 sends a photo pulse signal to the power circuit. Upon receiving this pulse signal, the MOS transistor controls the battery connected directly to the LED light board, illuminating the LED fill light unit. Simultaneously, camera 12 begins image acquisition, ensuring clear images of the pipeline interior even in low-light environments.

[0063] In this invention, by combining an odometer unit with a magnetic encoder, the mileage of a visual inspection robot within a pipeline can be accurately recorded. The odometer unit contacts the inner wall of the pipeline, driving the rotating shaft to rotate, which in turn rotates the magnet. The magnetic encoder generates a pulse signal and triggers the camera to take a picture. This design ensures that image acquisition is synchronized with the robot's movement, allowing the camera to automatically take a picture after a predetermined movement distance, effectively improving the accuracy and timeliness of image acquisition. Furthermore, the integration of an LED fill light unit ensures clear images even in low-light environments, improving the efficiency and reliability of inspection tasks and ensuring that defects on the pipeline's inner wall can be accurately identified.

[0064] In one possible embodiment, the visual inspection robot further includes an anti-collision head 3 . The anti-collision head 3 is disposed at the front end of the power unit 1 and is used to prevent the visual inspection robot from colliding with the inner surface of the oil and gas pipeline, thereby causing damage. The anti-collision head 3 is mounted on an anti-collision head base 4 .

[0065] In the present invention, the anti-collision head can absorb impact force, protect the operation stability of the robot in a complex or irregular pipeline environment, reduce the occurrence of equipment failures, extend the service life of the robot, and ensure the smooth progress of the detection task.

[0066] In one possible embodiment, the visual inspection robot further includes an eddy current detection unit. The eddy current detection unit is connected to the battery unit 13. In the forward direction of the visual inspection robot, the eddy current detection unit is positioned forward, while the camera 12 is positioned backward. When the eddy current detection unit detects an abnormality on the oil and gas pipeline wall, it triggers a start signal for the camera 12, which then captures an image of the pipeline's inner surface.

[0067] In the present invention, when the eddy current detection unit detects a problem, it can trigger the camera's start signal and perform image acquisition in a timely manner. This design ensures that the camera takes pictures when it detects the location of potential defects, thereby improving the accuracy and efficiency of defect detection. Identifying anomalies in advance and accurately triggering image acquisition avoids the acquisition of invalid images, optimizes the detection process, and enhances the robot's detection capabilities within the pipeline. At the same time, it can ensure that the camera is activated only when needed, avoiding invalid image acquisition and thus saving energy consumption. By reducing unnecessary photography and image processing, the robot can use batteries more efficiently, extend operating time, and improve overall energy efficiency.

[0068] In one possible embodiment, the visual inspection robot further includes a cleaning unit. In the direction of travel of the visual inspection robot, the cleaning unit is positioned forward, and the camera 12 is positioned backward. After the cleaning unit cleans the oil and gas pipeline's inner surface, the camera 12 captures an image of the pipeline's inner surface.

[0069] In the present invention, by configuring a cleaning unit in the visual inspection robot and setting it at the front end, the oil stains and other dirt on the inner surface of the pipeline can be effectively cleaned, ensuring that the image captured by the camera reflects the actual condition of the pipeline, thereby improving the accuracy of pipeline surface defect detection.

[0070] In a possible implementation, the processing module 11 is specifically configured to:

[0071] S1: Acquire an image of the inner surface of the oil and gas pipeline taken by the camera 12.

[0072] S2: Preprocess the oil and gas pipeline inner surface image.

[0073] Among them, preprocessing includes: noise reduction and contrast enhancement.

[0074] Specifically, the interference of uneven light or environmental noise is removed through median filtering or adaptive filtering technology.

[0075] Furthermore, histogram equalization or gamma correction technology is used to enhance the image brightness and contrast, highlighting the detailed features of the defective area.

[0076] S3: Based on the preprocessed image of the inner surface of the oil and gas pipeline, defects are detected on the inner surface of the oil and gas pipeline through a convolutional neural network.

[0077] Specifically, the present invention can use an improved YOLOv5 network structure to realize defect detection on the inner surface of oil and gas pipelines.

[0078] The traditional YOLOv5 network structure mainly consists of: input, backbone network, neck network, and head network. Given an image of the inner surface of an oil or gas pipeline, the backbone network extracts image features from the image, the neck network fuses the extracted features, and the head network performs defect detection based on the fused features.

[0079] The backbone network primarily utilizes the CSPDarknet53 architecture. Drawing on the concepts of CSPNet, the YOLOv5 backbone network Darknet53, a five-module CSP architecture was designed. Each CSP module has a 3×3 convolution kernel with a stride of 2 for downsampling. The CSP module first splits the feature map of the base layer into two parts and then merges them using a cross-stage approach, reducing computational complexity while maintaining accuracy. Therefore, the CSP network architecture used in the YOLOv5 backbone network enhances network learning capabilities, reduces computational bottlenecks, and reduces memory costs.

[0080] In order to further improve the feature extraction capability of the backbone network, the present invention adds a recursive gated convolution module to the backbone network. The recursive gated convolution module consists of standard convolution, linear mapping and element multiplication. Layer normalization is added after the recursive gated convolution module. During the layer normalization process, the mean and variance of all channels are calculated and then normalized. The recursive gated convolution module adjusts the number of channels of the incoming feature map through two convolution layers, and then divides the output features of the depth-separable convolution into multiple parts. Each part is element-by-element multiplied with the previous part to finally obtain the output features. Through element-by-element multiplication and recursive design, the interactive fusion of high-order and low-order information of the feature map is realized, so that the information contained in the feature map is richer, the gradient diffusion phenomenon is reduced, and the feature extraction capability of the network is enhanced. The recursive operation is achieved by continuously performing element-by-element multiplication.

[0081] Furthermore, the recursive gated convolution module is specifically:

[0082]

[0083] Among them, x represents the input feature map, Represents a linear projection map, which is used to mix channel information. p0 and q0 represent two projection features obtained by segmenting the input feature map. f represents a deep convolution operation. represents element-by-element multiplication, p1 represents the interaction feature, represents the inverse linear projection map, which is used to remap the interaction features back to the original channels of the input.

[0084] Furthermore, recursive design can be introduced to perform multi-order mapping:

[0085]

[0086] Among them, p0, q0, ..., q n-1 Represents a set of projected features obtained by segmentation from the input feature map.

[0087] Then recursively perform gated convolution:

[0088]

[0089] Among them, p k+1 represents the k+1th order interaction feature, f k represents the k-th order depth convolution operation, q k represents the k-th order projection feature, g k represents the linear mapping used to match the k-th feature dimension, and α represents the scaling factor.

[0090]

[0091] Among them, Identity represents the identity function, Linear represents the linear mapping function, C k-1 Indicates the number of feature channels of the k-1th order, C k Represents the number of feature channels of the kth order, C represents the number of feature channels of the input feature map, n represents the total order of recursive gated convolution, and β represents the channel number reduction factor, which is generally 2.

[0092] In the present invention, by adding a recursive gated convolution module to the backbone network and combining layer normalization and multi-order recursive design, the feature extraction capability of the network can be effectively improved. The recursive gated convolution module realizes the interactive fusion of high-order and low-order information of the feature map through element-by-element multiplication, making the feature expression richer, while reducing the gradient diffusion phenomenon and enhancing the stability of the model. Layer normalization further standardizes the feature distribution and optimizes the network training process. In addition, through multi-order recursive design and gradual adjustment of the number of channels, deep interaction of features and efficient integration of information are achieved, while ensuring that the computational cost is controllable, the accuracy of feature extraction and the model's ability to characterize complex patterns are greatly improved.

[0093] In order to further enhance the backbone network's ability to extract surface defect features of oil and gas pipelines while suppressing the interference of useless features, the present invention introduces a coordinate attention mechanism, which takes into account the relationship between position information and channels. It can not only capture cross-channel information, but also capture direction perception and position perception information, thereby enabling the model to more accurately locate and identify target areas.

[0094] The coordinate attention mechanism decomposes global pooling into a pair of one-dimensional feature encoding operations. Given an input X, using pooling kernels of size (H, 1) and (1, W), each channel is encoded along the horizontal and vertical coordinates respectively. The coordinate information embedding transformation is specifically:

[0095]

[0096] Among them, z h Represents the horizontal perception feature map after horizontal pooling, represents the feature map of the c-th channel after horizontal pooling, x c represents the input feature map in the cth channel, h represents the channel height, i represents the width direction index value, W represents the feature map width, z w Represents the feature map after vertical pooling, It represents the vertical perception feature map of the c-th channel after vertical pooling, w represents the channel width, j represents the height direction index value, and H represents the feature map height.

[0097] Through the above two transformation operations, a pair of direction (X direction and Y direction) perceived feature maps are obtained.

[0098] The X-direction and Y-direction perception feature maps are input into the shared 1×1 convolution transformation function to generate intermediate feature maps:

[0099]

[0100] Among them, f represents the intermediate feature map, δ represents the nonlinear activation function, F1 represents the 1×1 convolution transformation function, z h Represents the horizontal perception feature map, z w Represents the vertical perception feature map.

[0101] The intermediate feature map is decomposed into two independent tensors along the spatial dimension to obtain two independent feature maps.

[0102] Use two 1×1 convolutions to convert the two independent feature maps to the same number of channels as the input:

[0103]

[0104] Among them, g hRepresents the horizontal attention weight map, g w represents the vertical attention weight map, σ represents the Sigmoid activation function, F h represents the horizontal 1×1 convolution function, Represents the horizontal independent feature map obtained by decomposition, F w Represents the 1×1 convolution function in the vertical direction, Represents the vertical independent feature map obtained by decomposition.

[0105] According to the attention weight map, the input feature map is processed:

[0106]

[0107] Among them, y c Represents the output feature map after the c-th channel introduces coordinate attention, represents the horizontal attention weight map of the c-th channel, Represents the vertical attention weight map of the c-th channel.

[0108] In this paper, by introducing a coordinate attention mechanism into the backbone network, the network's ability to extract surface defect features from oil and gas pipelines is effectively improved, while also suppressing the interference of useless features. The coordinate attention mechanism combines the relationship between position information and channels, decomposing global pooling into one-dimensional feature encodings in the horizontal and vertical directions to capture directional and positional information. By generating and fusing horizontal and vertical attention weights, the network can more accurately locate and identify target areas, enhancing the precision and specificity of feature expression, and making the model more robust and performant in complex detection tasks.

[0109] The neck network adopts the FPN+PAN structure, in which the FPN (Feature Pyramid Network) layer transmits strong semantic features from top to bottom, and the PAN (Path Aggregation Network) layer transmits strong localized features from bottom to top. Features of different detection layers are aggregated at different backbone layers to improve feature extraction capabilities.

[0110] The head network can use the Softmax activation function to classify defects.

[0111] Optionally, the main defect categories include: deformation, dislocation, breakage, corrosion, oxide layer peeling, deposits, and penetration.

[0112] To improve the fault detection accuracy of convolutional neural networks, it is necessary to optimize the network parameters of the convolutional neural network. Traditionally, gradient descent has been used for this optimization. However, the optimization results of gradient descent often depend on the choice of initial parameters. Poor initial values ​​can lead to low optimization efficiency or unsatisfactory results. Furthermore, gradient descent is prone to falling into local optimal solutions in high-dimensional non-convex optimization problems, making it impossible to find a global optimal solution. Therefore, the present invention uses an improved heuristic algorithm (the Honey Badger optimization algorithm) to optimize the network parameters of convolutional neural networks.

[0113] The Honey Badger Algorithm (HBA) is an intelligent optimization algorithm inspired by the foraging behavior of honey badgers. By simulating the honey badger's olfactory tracking and mining strategies in the search for prey, it performs global search and local optimization within the solution space. This algorithm combines a balanced exploration and exploitation mechanism, possesses a strong ability to escape local optima, and is suitable for solving complex nonlinear optimization problems.

[0114] Specifically, a loss function for convolutional neural network detection of inner surface defects in oil and gas pipelines can be constructed. The loss function can adopt target box loss function, cross entropy loss function, and confidence loss function.

[0115] The loss function is then used to construct the fitness function of the honey badger optimization algorithm.

[0116] Sine chaotic mapping is used to initialize honey badger individuals. Each honey badger individual represents a feasible set of network parameters. Each honey badger individual is composed of multiple dimensional components, and each component represents a network parameter:

[0117]

[0118] Among them, x i represents the initial position of the i-th honey badger individual, lb i represents the lower bound of the i-th feasible solution, ub i represents the upper bound of the i-th feasible solution, y i represents the chaotic number corresponding to the i-th honey badger individual, y i-1 represents the chaos number corresponding to the i-1th honey badger individual, μ represents the chaos parameter, which is generally taken as 0.99.

[0119] In this paper, the ergodic nature and initial sensitivity of chaotic mapping are exploited to generate initial solutions that are more evenly distributed and cover a wider range in the solution space, thereby enhancing population diversity and avoiding being trapped in local optima. Furthermore, the Sine mapping is simple and efficient, improving the algorithm's global search capability and convergence performance at a low computational cost, laying a good foundation for subsequent optimization processes.

[0120] An elite selection strategy is adopted to retain half of the honey badger individuals with the highest fitness values ​​and discard the other half to filter the population.

[0121] In this paper, an elite selection strategy is used to retain the top half of the honey badger individuals with the highest fitness values, which can effectively improve the overall quality of the population and accelerate the convergence of the algorithm. By eliminating the weakest individuals and retaining the best performing individuals, it helps to inherit the excellent characteristics and guide the search direction, reducing the interference of low-quality individuals on the optimization process, thereby improving the efficiency and stability of the search for the global optimal solution.

[0122] In the mining phase, a random number r1 is introduced to select between searching around the global optimal individual or the current individual and updating the individual position:

[0123]

[0124] in, represents the position of the i-th honey badger individual at the t+1th iteration, ω t represents the nonlinear weight factor at the tth iteration, represents the position of the i-th honey badger individual at the t-th iteration, x best represents the location of the global optimal individual, F represents the search direction control parameter, β represents the ability of the honey badger individual to obtain food, which is generally fixed at 6, and I i represents the intensity factor of the i-th honey badger individual, α represents the density factor, and r1, r2, r3 and r4 represent random numbers between 0 and 1.

[0125] In the present invention, the random number r1 is introduced in the mining phase and parallel search is performed around the global optimal individual or the current individual, which helps to achieve a dynamic balance between local development and global exploration. When , individuals mainly make fine adjustments around themselves to enhance local search capabilities. When , individuals move closer to the global optimal position, strengthening global search capabilities. This mechanism can effectively avoid falling into local optimal solutions while improving the algorithm's convergence speed, enhancing its robustness and optimization efficiency. In addition, the use of sine and cosine functions to introduce nonlinear perturbations further increases the diversity of search paths and improves its adaptability to complex optimization problems.

[0126]

[0127] Where t represents the current number of iterations, and T represents the maximum number of iterations.

[0128] In this invention, a nonlinear weighting factor is used to gradually reduce the weight during the iteration process. This makes the search process more exploratory in the early stages of the algorithm, allowing for a broad search of the solution space. In the later stages, as the number of iterations increases, the weight is gradually reduced, allowing the algorithm to conduct more localized exploration and refine the solution quality. This weight decay strategy balances the capabilities of global search and local optimization, preventing premature convergence and ensuring that the global optimal solution, or one closer to it, is found.

[0129]

[0130] Among them, r5 represents a random number between 0 and 1, and S represents the concentration strength.

[0131] In this paper, the strength factor is inversely proportional to distance, ensuring that individuals closer to the global optimal solution have a higher "perception" strength, leading to a more active search. The strength of an individual's perception of the target is dynamically measured by combining the position of the global optimal individual, the current individual's position, and the positional relationship of its neighbors.

[0132]

[0133] Where C represents the density constant, and exp represents the exponential function with the natural constant as the base.

[0134] In this invention, the density factor causes the density to decay gradually with the number of iterations, thereby maintaining a large perturbation range in the early stages of the algorithm and enhancing global exploration capabilities. As iterations progress, the perturbation gradually decreases, prompting the algorithm to focus more on local, refined search in the later stages. This exponential decay mechanism helps implement the "exploration first, exploitation later" strategy during the optimization process, improving overall convergence speed and optimization accuracy, and enhancing the algorithm's ability to escape local optima and approach the global optimal solution.

[0135]

[0136] Here, r6 represents a random number between 0 and 1.

[0137] During the honey collection phase, update individual positions:

[0138]

[0139] Here, r7 represents a random number between 0 and 1.

[0140] In this method, during the honey-collecting phase, individual honey badgers are enabled to make appropriate adjustments based on the global optimal solution while maintaining their exploratory nature. The random factor r7 provides greater search diversity, preventing individuals from over-relying on the global optimal solution and premature convergence. By gradually decreasing the density factor, the algorithm can gradually reduce disturbances during the search process, enhancing local search capabilities, and ultimately improving convergence accuracy and the ability to find the global optimal solution.

[0141] Update the fitness value of each honey badger individual and the global optimal individual.

[0142] Determine whether the current number of iterations has reached the maximum number of iterations. If so, output the network parameter set representing the honey badger individual with the highest fitness. Otherwise, return to continue iteration.

[0143] In this paper, an improved Honey Badger optimization algorithm is used to optimize the network parameters of convolutional neural networks. Compared with the traditional gradient descent method, the Honey Badger optimization algorithm has stronger global search capabilities, can effectively avoid falling into local optimal solutions, and improve the reliability of the optimization results. It can significantly improve the optimization effect and application performance of CNN, providing more powerful model support for high-precision fault detection.

[0144] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.

Claims

1. A visual inspection robot for detecting defects on the inner surface of oil and gas pipelines, characterized in that: include: A power unit (1), an image acquisition unit (2), and a rotation cleaning unit (15); The power unit (1) is used to drive the robot to move inside the oil and gas pipeline; The image acquisition unit (2) comprises: a camera (12) and a processing module (11); The camera (12) is arranged at the rear end of the image acquisition unit (2) and is used to capture images of the inner surface of the oil and gas pipeline; the camera (12) includes a glass lens (121); The processing module (11) is used to perform defect detection based on the captured image of the inner surface of the oil and gas pipeline; The power unit (1) includes a leather cup drive unit (14); The visual inspection robot is driven to move in the pipeline by the pressure difference between the rear end and the front end of the leather cup drive unit (14); The rotating cleaning unit (15) drives the glass lens (121) to rotate, thereby removing the dirt on the outside of the glass lens (121); Wherein, the processing module (11) is specifically used for: S1: Acquire an image of the inner surface of the oil and gas pipeline taken by the camera (12); S2: Preprocessing the inner surface image of the oil and gas pipeline; S3: Based on the pre-processed image of the inner surface of the oil and gas pipeline, the inner surface of the oil and gas pipeline is subjected to defect detection through a convolutional neural network. The network parameters of the convolutional neural network are optimized using the Honey Badger optimization algorithm: The fitness function of the honey badger optimization algorithm is constructed using the loss function; Sine chaotic mapping is used to initialize honey badger individuals. Each honey badger individual represents a feasible set of network parameters. Each honey badger individual is composed of multiple dimensional components, and each component represents a network parameter: ; Among them, x i represents the initial position of the i-th honey badger individual, lb i represents the lower bound of the i-th feasible solution, ub i represents the upper bound of the i-th feasible solution, y i represents the chaotic number corresponding to the i-th honey badger individual, y i-1 represents the chaotic number corresponding to the i-1th honey badger individual, μ represents the chaotic parameter; Adopting the elite selection strategy, the half of honey badger individuals with the highest fitness values ​​are retained, and the other half are discarded to filter the population; In the mining phase, a random number r1 is introduced to select between searching around the global optimal individual or the current individual and updating the individual position: ; in, represents the position of the i-th honey badger individual at the t+1th iteration, ω t represents the nonlinear weight factor at the tth iteration, represents the position of the i-th honey badger individual at the t-th iteration, x best represents the location of the global optimal individual, F represents the search direction control parameter, β represents the ability of the honey badger individual to obtain food, which is generally fixed at 6, and I i represents the intensity factor of the i-th honey badger individual, α represents the density factor, r1, r2, r3 and r4 represent random numbers between 0 and 1; ; Where t represents the current number of iterations, and T represents the maximum number of iterations; ; Among them, r5 represents a random number between 0 and 1, and S represents the concentration intensity; ; Where C represents the density constant, and exp represents the exponential function with the natural constant as the base; ; Among them, r6 represents a random number between 0 and 1; During the honey collection phase, update individual positions: ; Among them, r7 represents a random number between 0 and 1; Update the fitness value of each honey badger individual and the global optimal individual; Determine whether the current number of iterations has reached the maximum number of iterations; if so, output the network parameter set represented by the honey badger individual with the highest current fitness; otherwise, return to continue iteration.

2. The visual inspection robot for detecting inner surface defects of oil and gas pipelines according to claim 1, characterized in that: The rotary cleaning unit (15) comprises: a rotary mechanism housing (151) and rotary blades (152); An air inlet (1511) and an air outlet (1512) are provided on the rotating mechanism housing (151), and an air flow channel is provided between the air inlet (1511) and the air outlet (1512); The rotating fan blade (152) is provided in the air flow channel; The rotating fan blade (152) is fixedly connected to the glass lens (121); The airflow at the rear end of the leather cup drive unit (14) enters the airflow channel through the air inlet hole (1511), driving the rotating fan blade (152) to rotate, thereby driving the glass lens (121) to rotate, thereby removing the stains on the outside of the glass lens (121).

3. The visual inspection robot for detecting inner surface defects of oil and gas pipelines according to claim 1, characterized in that: The rotary cleaning unit (15) comprises: a rotary mechanism housing (151), a DC motor (153), and a rotary gear (154); The DC motor (153) and the rotating gear (154) are arranged in the rotating mechanism housing (151); The DC motor (153) is drivingly connected to the rotating gear (154); The glass lens (121) is fixedly connected to the rotating gear (154); The DC motor (153) drives the rotating gear (154) to rotate, thereby driving the glass lens (121) to rotate, thereby removing the dirt on the outside of the glass lens (121).

4. The visual inspection robot for detecting inner surface defects of oil and gas pipelines according to claim 1, characterized in that: The rotary cleaning unit (15) comprises: a rotary mechanism housing (151), a DC motor (153), a rotary pulley (155), and a belt (156); The DC motor (153), the rotating pulley (155) and the belt (156) are arranged in the rotating mechanism housing (151); The DC motor (153) is drivingly connected to the rotating pulley (155) via the belt (156); The glass lens (121) is fixedly connected to the rotating pulley (155); The DC motor (153) drives the rotating pulley (155) to rotate via the belt (156), thereby driving the glass lens (121) to rotate, thereby removing the dirt on the outside of the glass lens (121).

5. The visual inspection robot for detecting inner surface defects of oil and gas pipelines according to claim 1, characterized in that: Also includes: A battery unit (13), a mileage wheel unit (5), and an LED fill light unit; The battery unit (13) is used to supply power to the camera (12) and the processing module (11); The mileage wheel unit (5) is used to record the movement mileage; The LED light-filling unit is used to fill light inside the oil and gas pipeline.

6. The visual inspection robot for detecting inner surface defects of oil and gas pipelines according to claim 1, characterized in that: The glass lens (121) on the camera (12) is made of sapphire material.

7. The visual inspection robot for detecting inner surface defects of oil and gas pipelines according to claim 1, characterized in that: Also includes: Anti-collision head (3); The anti-collision head (3) is arranged at the front end of the power unit (1) and is used to prevent the visual inspection robot from colliding with the inner surface of the oil and gas pipeline and causing damage.

8. The visual inspection robot for detecting inner surface defects of oil and gas pipelines according to claim 5, characterized in that: The processing module (11) includes: a computer (111), a power control board (112) and an LED control board; The power control board (112) is connected to the battery unit (13); the power control board (112) and the camera (12) are both connected to the computer (111); the camera (12), the mileage wheel unit (5), the LED control board, and the LED fill light unit are all connected to the power control board; the LED control board is used to realize the fill light function of the LED fill light unit.

9. The visual inspection robot for detecting inner surface defects of oil and gas pipelines according to claim 5, characterized in that: The mileage wheel unit (5) comprises: a mileage wheel (51), a mileage wheel base (52), a mileage wheel bracket (53), a rotating shaft, a magnet, and a magnetic encoder; The mileage wheel bracket (53) is connected to the mileage wheel base (52), and the mileage wheel (51) is arranged on the mileage wheel bracket (53) via the rotating shaft; The radially magnetized magnet is mounted on the rotating shaft, and the magnet is located at the geometric center of the rotating shaft; When the visual inspection robot operates in a pipeline, the mileage wheel (51) contacts the inner wall of the pipeline, driving the rotating shaft connected by a key to rotate. When the rotating shaft rotates, the magnet rotates along with the rotating shaft. The magnetic encoder senses the position change of the magnet and generates a pulse signal, which triggers the camera (12) to capture an image through the pulse signal.

Citation Information

Patent Citations

  • Tunnel disease detection device, system and method

    CN110346370A

  • Automatic driving vehicle camera cleaning system

    CN114640778A

  • Modularized pipeline defect detection soft robot

    CN114738600A

  • Speed-controllable pipeline endoscopic detection device based on fluid driving

    CN116792605A

  • Mileage detection structure

    CN215725979U