A circular vision inspection robot for inner surface defect detection of oil and gas pipelines

Through the ring vision detection robot combined with conical mirror reflection and improved YOLOv5 network, the efficiency and accuracy problems of oil and gas pipeline detection technology in complex environments in high-pressure environments are solved, and high-quality defect detection is achieved.

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

Patent Information

Application Number
CN202510563327.8
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

The existing oil and gas pipeline in-house detection technology is inefficient, poor accuracy, unstable image quality, and difficult to achieve high-quality defect detection under high pressure and complex environments.

Method used

The ring vision detection robot is adopted, and the imaging technology of the cone mirror reflection ring is used to capture high-resolution images of the cone mirror reflection through the camera. Combined with the glass cylinder and mileage wheel unit of sapphire material, it realizes panoramic clear image acquisition of 360° pipe inner walls, and improves detection accuracy through improved YOLOv5 network and honey badger optimization algorithm.

Benefits of technology

It realizes efficient and accurate defect detection in complex pipeline environments, improves the field of view and image quality, and ensures accurate restoration and detection of defect areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120062473B_ABST
    Figure CN120062473B_ABST
Patent Text Reader

Abstract

The present invention relates to a circular visual inspection robot for detecting defects on the inner surface of an oil and gas pipeline, belonging to the field of pipeline inspection technology. The robot comprises: an imaging unit, a processing unit, a battery unit, and an odometer unit; the imaging unit, processing unit, battery unit, and odometer unit are connected in series; the imaging unit is used to capture images of the inner surface of the oil and gas pipeline; the processing unit is used to perform defect detection based on the captured images of the inner surface of the oil and gas pipeline; the battery unit is used to power the imaging unit and the processing unit; the odometer unit is used to record movement mileage; the imaging unit comprises a camera, a conical mirror, and a glass tube; the glass tube seals the imaging unit, and an accommodating space is formed inside the glass tube. The conical mirror is disposed in the accommodating space. External light passes through the glass tube to reach the conical mirror, and is projected onto the camera via the conical mirror, so that the camera captures an annular image of the inner surface of the oil and gas pipeline. The present invention improves the robot's field of view and image quality in complex pipeline environments.
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 ring-shaped 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. As critical infrastructure for oil and gas transportation, pipeline operational safety is directly linked to the stability of energy supply, environmental protection, and the safety of public life and property. However, due to the complex operating environments in which oil and gas pipelines operate for long periods of time, they are subject to numerous internal threats, including corrosion, cracks, weld defects, and foreign material accumulation. If these hazards are not promptly detected and addressed, they can easily lead to major accidents such as pipeline leaks and explosions. Therefore, conducting efficient and accurate internal inspections is a crucial technical guarantee for ensuring safe pipeline operation and a key means of preventing environmental pollution and economic losses.

[0003] However, traditional inspection methods suffer from low efficiency and accuracy, especially under high pressure and complex environments. Existing technologies for capturing in-pipe images of small-diameter pipes, such as CCTV (Closed Circuit Television), mostly rely on depth-of-field imaging, which suffers from field limitations, image clarity and resolution issues, and image distortion. Furthermore, pipeline internal inspections are often affected by factors such as pipe diameter variations, complex media, and insufficient lighting, resulting in unstable image quality. Therefore, existing technologies struggle to maintain device stability and image quality under high pressure and complex environments. Summary of the Invention

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

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

[0006] The present invention provides a ring-shaped visual inspection robot for detecting defects on the inner surface of oil and gas pipelines, comprising: an imaging unit, a processing unit, a battery unit, and a mileage wheel unit;

[0007] The imaging unit, the processing unit, the battery unit, and the mileage wheel unit are connected in series;

[0008] The imaging unit is used to capture images of the inner surface of the oil and gas pipeline;

[0009] The processing unit is used to perform defect detection based on the captured image of the inner surface of the oil and gas pipeline;

[0010] The battery unit is used to supply power to the imaging unit and the processing unit;

[0011] The mileage wheel unit is used to record the movement mileage;

[0012] The imaging unit includes a camera, a conical mirror, and a glass tube;

[0013] The glass tube seals the imaging unit, and an accommodating space is formed inside the glass tube. The conical mirror is arranged in the accommodating space. External light passes through the glass tube to reach the conical mirror, and is projected into the camera through the conical mirror, so that the camera can capture an annular image of the inner surface of the oil and gas pipeline.

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

[0015] The present invention provides an annular visual inspection robot for detecting defects on the inner surface of oil and gas pipelines. It adopts conical mirror reflection annular imaging technology and captures high-resolution images reflected by the conical mirror through a camera, achieving a 360-degree panoramic clear image of the inner wall of the pipeline, reducing image distortion, ensuring the accurate restoration of the defect area, improving the robot's field of view and image quality in complex pipeline environments, and thus improving the accuracy of defect detection based on visual images. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 This is a schematic diagram of the three-dimensional structure of a ring-shaped visual inspection robot for detecting defects on the inner surface of oil and gas pipelines provided by the present invention.

[0017] Figure 2 A schematic diagram of the three-dimensional structure of another annular visual inspection robot provided by the present invention for detecting defects on the inner surface of oil and gas pipelines.

[0018] Figure 3 This is a structural schematic diagram of a pressure differential rotary cleaning unit provided by the present invention.

[0019] Figure 4 A schematic flow chart of a method for detecting inner surface defects of an oil and gas pipeline provided by the present invention.

[0020] Description of reference numerals:

[0021] 1-imaging unit, 11-camera, 12-conical mirror, 13-glass cylinder, 2-processing unit, 3-battery unit, 4-mileage wheel unit, 41-mileage wheel, 42-mileage wheel base, 43-mileage wheel bracket, 5-sealing head, 6-leather cup drive unit, 7-pressure difference rotation cleaning unit, 71-base, 72-rotating fan blades, 73-rotating glass cylinder, 711-air inlet, 712-air outlet. DETAILED DESCRIPTION

[0022] 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.

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

[0024] Refer to the instruction manual Figure 1 , showing a schematic diagram of the three-dimensional structure of a ring-shaped visual inspection robot for detecting inner surface defects of oil and gas pipelines provided by an embodiment of the present invention.

[0025] Refer to the instruction manual Figure 2 , shows a three-dimensional structural schematic diagram of another annular visual inspection robot for detecting inner surface defects of oil and gas pipelines provided by an embodiment of the present invention.

[0026] One embodiment of the present invention provides a ring-shaped visual inspection robot for detecting inner surface defects of oil and gas pipelines, comprising: an imaging unit 1 , a processing unit 2 , a battery unit 3 and an odometer unit 4 .

[0027] The imaging unit 1 , the processing unit 2 , the battery unit 3 and the odometer unit 4 are connected in series.

[0028] The imaging unit 1 is used to capture images of the inner surface of the oil and gas pipeline.

[0029] The processing unit 2 is used to perform defect detection based on the captured image of the inner surface of the oil and gas pipeline.

[0030] The battery unit 3 is used to supply power to the imaging unit 1 and the processing unit 2 .

[0031] The mileage wheel unit 4 is used to record the movement mileage.

[0032] The imaging unit 1 includes a camera 11 , a conical mirror 12 , and a glass tube 13 .

[0033] The glass tube 13 seals the imaging unit 1, and an accommodating space is formed inside the glass tube 13. The conical mirror 12 is set in the accommodating space. External light passes through the glass tube 13 to reach the conical mirror 12, and is projected into the camera 11 through the conical mirror 12, so as to capture an annular image of the inner surface of the oil and gas pipeline through the camera 11.

[0034] Optionally, the inclination angle of the conical mirror 12 is 45°.

[0035] Through the above-described implementation, the annular visual inspection robot of the present invention can effectively adapt to inspection tasks in high-pressure and complex environments. Through rational equipment layout and pressure-resistant protection design, it achieves high-quality image acquisition and stable equipment operation, improving the efficiency and accuracy of oil and gas pipeline inner surface defect detection. The design of the odometer wheel further enhances the robot's navigation and positioning capabilities, making the inspection process more precise and reliable.

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

[0037] The present invention provides an annular visual inspection robot for detecting defects on the inner surface of oil and gas pipelines. It adopts conical mirror reflection annular imaging technology and captures high-resolution images reflected by the conical mirror through a camera, achieving a 360-degree panoramic clear image of the inner wall of the pipeline, reducing image distortion, ensuring the accurate restoration of the defect area, improving the robot's field of view and image quality in complex pipeline environments, and thus improving the accuracy of defect detection based on visual images.

[0038] In a possible implementation, the conical mirror 12 and the camera 11 are both centrally arranged.

[0039] In the present invention, by arranging the conical mirror 12 and the camera 11 in the center, the symmetry of the optical system can be ensured, 360° panoramic coverage can be maximized, local aberration and distortion of the image can be effectively reduced, and the optical path transmission efficiency can be optimized, thereby improving the imaging quality and the accuracy of defect detection.

[0040] In a possible implementation manner, the glass cylinder 13 is made of sapphire material.

[0041] It should be noted that the glass cylinder 13 made of sapphire material can ensure that the system can withstand a pressure of 10 MPa, and light can pass through the cylinder wall to reach the cone surface for reflection.

[0042] In this invention, the glass cylinder 13 is made of sapphire, which offers excellent pressure resistance, withstanding pressures up to 10 MPa, ensuring safe operation of the device in high-pressure environments. Furthermore, sapphire possesses extremely high optical transmittance, effectively transmitting light to the conic mirror and ensuring high-quality imaging. It also exhibits excellent corrosion resistance, making it suitable for complex pipeline inspection environments.

[0043] In one possible embodiment, the processing unit 2 includes a computer, a power control board, and a delay switch board. The power control board is connected to the battery unit 3. The power control board and the imaging unit 1 are also connected to the computer. The imaging unit 1, the odometer unit 4, the LED control board, and the LED light are all connected to the power control board. The LED control board is used to trigger the fill light function of the LED fill light, thereby optimizing energy consumption.

[0044] Furthermore, the processing unit 2 may also include a farad capacitor, which is used to provide instantaneous high current output to ensure power supply stability when the device is working under high load.

[0045] The battery is first connected to the switching circuit, and the load end of the switching circuit is connected to the power supply section of the power supply circuit. The power supply circuit is responsible for providing the required voltages for the odometer, camera optocoupler input, industrial camera, and pocket computer. 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 the LED lighting process, a farad capacitor is connected in parallel across the battery to provide instantaneous high current output, ensuring power supply stability during high-load operation.

[0046] In the present invention, by configuring a delayed switch board in the processing unit 2, the time-sharing startup of the various components of the equipment can be achieved, avoiding the impact of high load on the battery at the startup moment, thereby optimizing energy consumption, extending battery life, and improving the stability of system operation, especially in a complex pipeline inspection environment where multiple modules work in parallel, ensuring reliable and efficient operation of the equipment.

[0047] In one possible embodiment, the odometry wheel unit 4 includes an odometry wheel 41, an odometry wheel base 42, an odometry wheel bracket 43, a rotating shaft, a magnet, and a magnetic encoder. The odometry wheel bracket 43 is connected to the odometry wheel base 42, and the odometry wheel 41 is mounted on the odometry wheel bracket 43 via the rotating shaft. A radially magnetized magnet is mounted on the rotating shaft, located at the geometric center of the rotating shaft. When the annular visual inspection robot operates within a pipeline, the odometry wheel 41 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. This pulse signal triggers the camera 11 to capture images, ensuring accurate recording and analysis of images at different locations within the pipeline.

[0048] Specifically, the pulse signal is then sent to the optocoupler input of the industrial camera, and the optocoupler input outputs a photo pulse signal based on the number of pulses received and the preset number of pulses.

[0049] In the present invention, the use of magnets and a magnetic encoder in odometry wheel unit 4 enables real-time sensing of the odometry wheel's rotational position, and the resulting pulse signal precisely triggers camera 11 to capture images. This ensures that images captured at different locations within the pipeline correspond precisely to their specific locations, improving positioning accuracy during inspection and the spatial consistency of image data, thereby enabling more accurate defect recording and analysis.

[0050] In a possible embodiment, the imaging unit 1 further includes an LED fill light, and the fill light function of the LED fill light is triggered by the mileage wheel unit 4 and the LED control board.

[0051] Optionally, the LED light board is installed on the same plane as the industrial camera lens, and the fill light function is realized through the mileage wheel trigger, LED control board and power supply circuit to ensure clear images in low-light environments.

[0052] Specifically, when the optocoupler input receives a preset number of pulse signals, indicating that the odometer wheel has traveled a fixed distance, the industrial camera sends a photo pulse signal to the power circuit. After receiving this pulse signal, the LED control board controls the battery connected directly to the LED light board, illuminating it. Simultaneously, the industrial camera begins capturing images of the conical mirror, ensuring clear images of the pipe interior even in low-light conditions.

[0053] In this invention, by integrating an LED fill light into the imaging unit 1 and triggering its fill light function via the odometer unit 4, precise and synchronized illumination can be provided in low-light or no-light environments, ensuring image quality. Furthermore, the use of an optical coupler and an LED control board enables intelligent control of the fill light, illuminating it only when needed for imaging. This effectively reduces energy consumption, extends battery life, and ensures clarity of images of the pipe interior and reliability of detection.

[0054] In one possible embodiment, the annular visual inspection robot further includes a sealing head 5 and a sealing ring. The sealing heads 5 are provided at both ends of the annular visual inspection robot, and sealing rings are added between the sealing heads 5 and the cylinder of the annular visual inspection robot to achieve a seal. The odometer unit 4 is provided on the sealing heads 5.

[0055] Optionally, the sealing head 5 is made of aluminum alloy.

[0056] Furthermore, the sealing head 5 at the tail end is not only responsible for sealing, but is also used to install an aviation plug so as to connect to an external line to realize data transmission.

[0057] Furthermore, a through hole is designed at the front sealing head 5 to accommodate the front lens of the camera, so as to photograph the inner wall of the pipe. The through hole is made of a 6mm thick sapphire lens and sealed by a sealing ring to protect the camera lens and internal systems from high pressure.

[0058] Furthermore, an aluminum alloy plate is fixed inside the sealing head 5 by a hinge, and the position of the aluminum alloy plate is adjusted to ensure that the camera is installed in the center. The two are installed on both sides of the aluminum alloy plate to realize image acquisition and data processing, and the tail end is connected to a circular support by a hinge.

[0059] In this invention, by installing sealing heads 5 and sealing rings at both ends of the annular visual inspection robot, the device's sealing is effectively ensured, preventing external liquids, gases, or impurities from entering the device, thereby protecting the safe operation of internal precision components in high-pressure or corrosive environments. Furthermore, integrating the odometer unit 4 into the sealing head 5 optimizes the device's structural layout, enhancing its overall durability and stability, and providing reliable support for inspections in complex environments.

[0060] In one possible embodiment, the annular visual inspection robot further includes an eddy current detection unit. The eddy current detection unit is connected to the battery unit 3. In the forward direction of the annular visual inspection robot, the eddy current detection unit is positioned forward, while the imaging unit 1 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 imaging unit 1, which then captures an image of the pipeline's inner surface.

[0061] In this invention, by integrating an eddy current detection unit into the annular visual inspection robot and positioning it at the front end in its forward direction, rapid pre-screening for abnormalities on the pipeline wall can be achieved. When an abnormal area is detected, the eddy current unit promptly triggers the imaging unit 1 to capture the focused image, thereby improving inspection efficiency, reducing unnecessary image acquisition and energy consumption, and providing more accurate high-resolution images for subsequent defect analysis, thereby enhancing the accuracy and reliability of the overall inspection.

[0062] In one possible embodiment, the circular visual inspection robot further includes a cleaning unit. The cleaning unit is connected to the battery unit 3. In the forward direction of the circular visual inspection robot, the cleaning unit is positioned forward, and the imaging unit 1 is positioned backward. After the cleaning unit cleans the oil and gas pipeline's inner surface, the imaging unit 1 captures an image of the pipeline's inner surface.

[0063] In this invention, by integrating a cleaning unit into the circular visual inspection robot and positioning it at the front end in its forward direction, the inner wall of the pipeline can be cleaned before image acquisition, effectively removing oil stains and impurities. This not only ensures clearer images captured by the imaging unit 1, but also improves the accuracy of defect detection, avoiding misidentifications due to surface contamination. This design also reduces the complexity of post-processing data, improving the overall efficiency and reliability of inspections.

[0064] Refer to the instruction manual Figure 3 , shows a structural schematic diagram of a pressure differential rotary cleaning unit provided by an embodiment of the present invention.

[0065] In a possible embodiment, the annular visual inspection robot also includes: a leather cup drive unit 6 and a pressure difference rotation cleaning unit 7. The annular 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 6. The pressure difference rotation cleaning unit 7 includes: a base 71, a rotating fan blade 72 and a rotating glass cylinder 73. An air inlet 711 and an air outlet 712 are provided on the base 71, and an air flow channel is provided between the air inlet 711 and the air outlet 712. A rotating fan blade 72 is provided in the air flow channel. The rotating fan blade 72 is fixedly connected to the rotating glass cylinder 73. The airflow at the rear end of the leather cup drive unit 6 enters the air flow channel, drives the rotating fan blade 72 to rotate, and then drives the rotating glass cylinder 73 to rotate, and removes the stains on the outside of the rotating glass cylinder 73.

[0066] In the present invention, the airflow during the movement of the robot is cleverly utilized, and the automatic cleaning function of the equipment is realized without the need for additional energy supply. This not only keeps the glass tube clean and the field of view clear, but also reduces energy consumption and structural complexity, and improves the reliability of equipment operation and detection efficiency.

[0067] Refer to the instruction manual Figure 4 , which shows a flow chart of a method for detecting inner surface defects of an oil and gas pipeline provided by an embodiment of the present invention.

[0068] In a possible implementation, the processing unit 2 is specifically configured to:

[0069] S1: Acquire a ring image of the inner surface of the oil and gas pipeline captured by the imaging unit 1.

[0070] S2: Perform geometric correction on the annular image of the inner surface of the oil and gas pipeline.

[0071] Specifically, the pixel points of the annular image use polar coordinates, while the actual image needs to be presented in a rectangular coordinate system. The farther the image point is from the center, the more severe the distortion is, and it needs to be corrected to the actual rectangular coordinate system. Therefore, the polar coordinate to rectangular coordinate conversion and distortion compensation technology can be used to correct the annular image. The annular image is converted from a polar coordinate system to a rectangular coordinate system to achieve flattening correction. By expanding the polar coordinates into rectangular coordinates, the annular image can be "straightened" into a two-dimensional expansion image. The annular image may have radial distortion due to the reflection of the conical mirror, which needs to be corrected by a distortion model. The distortion correction formula is:

[0072]

[0073] Among them, r c Represents the corrected radial distance, r m It represents the actual measured radial distance of the pixel point, and k1 and k2 represent the radial distortion coefficients.

[0074] Furthermore, geometric correction can be implemented through computer vision libraries such as OpenCV.

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

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

[0077] 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.

[0078] 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.

[0079] 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.

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

[0081]

[0082] 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.

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

[0084]

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

[0086] Then recursively perform gated convolution:

[0087]

[0088] 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.

[0089]

[0090] 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.

[0091] 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.

[0092] 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.

[0093] 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:

[0094]

[0095] 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.

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

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

[0098]

[0099] 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 direction perception feature map.

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

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

[0102]

[0103] 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.

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

[0105]

[0106] 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.

[0107] 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.

[0108] 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.

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

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

[0111] 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.

[0112] 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.

[0113] 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.

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

[0115] 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:

[0116]

[0117] 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.

[0118] 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.

[0119] 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.

[0120] 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.

[0121] 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:

[0122]

[0123] 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.

[0124] 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.

[0125]

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

[0127] 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.

[0128]

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

[0130] 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.

[0131]

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

[0133] 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.

[0134]

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

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

[0137]

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

[0139] 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.

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

[0141] 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.

[0142] 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.

[0143] 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 circular visual inspection robot for detecting defects on the inner surface of oil and gas pipelines, characterized in that: include: Imaging unit (1), processing unit (2), battery unit (3) and mileage wheel unit (4); The imaging unit (1), the processing unit (2), the battery unit (3), and the mileage wheel unit (4) are connected in series; The imaging unit (1) is used to capture images of the inner surface of the oil and gas pipeline; The processing unit (2) is used to perform defect detection based on the captured image of the inner surface of the oil and gas pipeline; The battery unit (3) is used to supply power to the imaging unit (1) and the processing unit (2); The mileage wheel unit (4) is used to record the movement mileage; The imaging unit (1) comprises a camera (11), a conical mirror (12), and a glass tube (13); The glass cylinder (13) seals the imaging unit (1), and a containing space is formed inside the glass cylinder (13). The conical mirror (12) is arranged in the containing space. External light passes through the glass cylinder (13) and reaches the conical mirror (12). The light is projected into the camera (11) through the conical mirror (12), so that a ring-shaped image of the inner surface of the oil and gas pipeline is captured by the camera (11); The processing unit (2) is specifically used for: S1: Acquire an annular image of the inner surface of the oil and gas pipeline captured by the imaging unit (1); S2: performing geometric correction on the annular image of the inner surface of the oil and gas pipeline; S3: Based on the geometrically corrected annular image of the inner surface of the oil and gas pipeline, a convolutional neural network is used to detect defects on the inner surface of the oil and gas pipeline. The network parameters of the convolutional neural network are optimized using the Honey Badger optimization algorithm; Constructing the fitness function of the honey badger optimization algorithm with 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 population is filtered by retaining half of the honey badger individuals with the highest fitness values ​​and discarding the other half. 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 annular visual inspection robot for oil and gas pipeline inner surface defect detection according to claim 1 is characterized in that: The conical mirror (12) and the camera (11) are both centrally arranged.

3. The annular visual inspection robot for oil and gas pipeline inner surface defect detection according to claim 1 is characterized in that: The glass cylinder (13) is made of sapphire material.

4. The annular visual inspection robot for inner surface defect detection of oil and gas pipelines according to claim 1 is characterized in that: The processing unit (2) includes: a computer, a power control board and an LED control board; The power control board is connected to the battery unit (3), the power control board and the imaging unit (1) are both connected to the computer, the imaging unit (1), the mileage wheel unit (4), the LED control board and the LED light are all connected to the power control board, and the LED control board is used for the LED light flashing function.

5. The annular visual inspection robot for oil and gas pipeline inner surface defect detection according to claim 1 is characterized in that: The mileage wheel unit (4) comprises: a mileage wheel (41), a mileage wheel base (42), a mileage wheel bracket (43), a rotating shaft, a magnet, and a magnetic encoder; The mileage wheel bracket (43) is connected to the mileage wheel base (42), and the mileage wheel (41) is arranged on the mileage wheel bracket (43) 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 annular visual inspection robot runs in a pipeline, the mileage wheel (41) 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 (11) unit to capture an image through the pulse signal.

6. The annular visual inspection robot for oil and gas pipeline inner surface defect detection according to claim 1 is characterized in that: Also includes: Sealing head (5) and sealing ring; The sealing heads (5) are provided at both ends of the annular visual inspection robot, and sealing is achieved by adding the sealing ring between the sealing head (5) and the cylinder of the annular visual inspection robot; The mileage wheel unit (4) is arranged on the sealing head (5).

7. The annular visual inspection robot for oil and gas pipeline inner surface defect detection according to claim 1 is characterized in that: Also included: an eddy current detection unit; The eddy current detection unit is connected to the battery unit (3); In the forward direction of the annular visual inspection robot, the eddy current detection unit is located in front and the imaging unit (1) is located in the rear; When the eddy current detection unit detects an abnormality on the wall surface of the oil and gas pipeline, a start signal of the imaging unit (1) is triggered, and an image of the inner surface of the oil and gas pipeline is captured by the imaging unit (1).

8. The annular visual inspection robot for oil and gas pipeline inner surface defect detection according to claim 1 is characterized in that: Also includes: Cleaning unit; The cleaning unit is connected to the battery unit (3); In the forward direction of the annular visual inspection robot, the cleaning unit is located in front and the imaging unit (1) is located in the rear; After the cleaning unit cleans the oil stains on the inner surface of the oil and gas pipeline, the imaging unit (1) takes an image of the inner surface of the oil and gas pipeline.

9. The annular visual inspection robot for oil and gas pipeline inner surface defect detection according to claim 1 is characterized in that: Also includes: Leather cup drive unit (6) and pressure differential rotation cleaning unit (7); The annular 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 (6); The pressure differential rotary cleaning unit (7) comprises: a base (71), rotating blades (72) and a rotating glass cylinder (73); An air inlet (711) and an air outlet (712) are provided on the base (71), and an air flow channel is provided between the air inlet (711) and the air outlet (712); The rotating fan blade (72) is provided in the air flow channel; The rotating fan blade (72) is fixedly connected to the rotating glass cylinder (73); The airflow at the rear end of the leather cup driving unit (6) enters the airflow channel, driving the rotating blades (72) to rotate, thereby driving the rotating glass cylinder (73) to rotate, thereby removing the dirt on the outside of the rotating glass cylinder (73).

Citation Information

Patent Citations

  • Pneumatic rotary window system

    CN102849182A

  • Pipeline cleaner

    CN106583366A

  • Energy-saving field shooting system

    CN110121028A

  • Tunnel disease detection device, system and method

    CN110346370A

  • Modularized pipeline defect detection soft robot

    CN114738600A