Pipeline compensator displacement detection method and device, inspection robot and storage medium

By using feature point detection models and perspective transformation technology, the displacement angle of pipeline compensators is automatically identified and calculated, solving the problem of reliance on manual judgment in existing technologies and achieving efficient and low-cost automated detection.

CN117218376BActive Publication Date: 2026-04-28BEIJING DISTRICT HEATING GRP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING DISTRICT HEATING GRP CO LTD
Filing Date
2023-09-12
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Existing methods for inspecting the displacement of pipeline compensators rely on manual judgment, which is costly and difficult to automate, making it hard to apply them widely to automated inspection scenarios.

Method used

The key feature points of the main hinge plate and the secondary hinge plate of the pipeline compensator are identified by the feature point detection model. Perspective transformation and vector calculation are performed to automatically detect the displacement angle of the pipeline compensator. If the displacement angle exceeds the threshold, an alarm is triggered.

Benefits of technology

The system automates the detection of pipeline compensator displacement, reduces manual intervention, lowers detection costs, and improves detection accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117218376B_ABST
    Figure CN117218376B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of pipeline displacement detection, and discloses a pipeline compensator displacement detection method, wherein the pipeline compensator comprises a main hinge plate and a secondary hinge plate, the method comprises the following steps: acquiring a scene image of the pipeline compensator taken by a camera, and identifying key feature points of the main hinge plate and the secondary hinge plate in the scene image according to a feature point detection model; performing perspective transformation on each scene image according to the width-height ratio of the pipeline compensator, obtaining a front scene image of the pipeline compensator, and obtaining the coordinates of each key feature point after the perspective transformation; performing vector calculation according to the key feature points after the perspective transformation, obtaining the displacement angle of the pipeline compensator, and if the displacement angle is greater than a preset threshold value, confirming that the pipeline compensator has deviated and performing alarm. Through image recognition, each key feature point of the main and secondary hinge plates of the pipeline compensator is accurately obtained, the displacement angle of the pipeline compensator is calculated, and the deviation degree of the pipeline compensator is determined.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of pipeline displacement detection technology, and in particular to a method, device, inspection robot, and storage medium for detecting pipeline compensator displacement. Background Technology

[0002] Currently, there are three methods for inspecting the displacement of pipeline compensators: 1. Manual inspection by going down into the well and visually judging; 2. Using a mobile camera (robot) to capture images, with manual judgment in the background; 3. Adding markings for automatic image recognition. The first two methods rely on manual judgment. The first method, in particular, is very costly due to the high cost of manual inspection, low frequency of checks, and potential safety hazards. Automated inspection is the trend. The second method is semi-automatic, still requiring manual judgment in the background. The third method requires printing specific markings, such as straight lines or circles, on the pipeline compensator to assist computer detection and recognition, using computer vision and pattern recognition technologies. Regardless of the method, the inspection cost is high and the process is too cumbersome, making it difficult to widely apply to automated inspection scenarios. Summary of the Invention

[0003] In a first aspect, this application provides a method for detecting the displacement of a pipeline compensator, the pipeline compensator comprising a main hinge plate and a secondary hinge plate, the method comprising:

[0004] Acquire scene images of the pipe compensator and identify key feature points of the main hinge plate and the secondary hinge plate in the scene images based on the feature point detection model;

[0005] Based on the aspect ratio of the pipe compensator, perspective transformation is performed on each of the scene images to obtain a frontal scene image of the pipe compensator, and the coordinates of each of the key feature points after the perspective transformation are obtained.

[0006] Vector calculations are performed on the key feature points after perspective transformation to obtain the displacement angle of the pipeline compensator. If the displacement angle is greater than a preset threshold, it is confirmed that the pipeline compensator has shifted and an alarm is triggered.

[0007] Furthermore, the step of identifying key feature points of the main hinge plate and the secondary hinge plate in the scene image based on the feature point detection model includes:

[0008] The location of the pipe compensator in the scene image is identified by the feature point detection model, and a positioning box is set according to the location of the pipe compensator.

[0009] Within the positioning frame, key feature points are extracted to obtain the key feature points at the four corners of the main hinge plate and the four corners of the secondary hinge plate.

[0010] Furthermore, the step of identifying the position of the pipe compensator in the scene image through the feature point detection model and setting a positioning box based on the position of the pipe compensator includes:

[0011] Identify the center of the pipe compensator, perform a positioning frame regression based on the center of the pipe compensator, and determine the distances of the four sides of the positioning frame from the center of the pipe compensator to obtain the positioning frame.

[0012] Furthermore, the feature point detection model includes the main body of a MobileNetV2 model arranged in sequence, a pyramid pooling structure, and finally several convolutional layers used as output.

[0013] Furthermore, the step of performing perspective transformation on each of the scene images based on the aspect ratio of the pipe compensator to obtain a frontal scene image of the pipe compensator includes:

[0014] Based on the four key feature points on the main hinge plate or the secondary hinge plate, the width of the single-sided hinge plate is calculated according to the two key feature points in the width direction.

[0015] Calculate the height of the single-sided hinge plate based on the aspect ratio and the width of the single-sided hinge plate;

[0016] Using any one key feature point as a reference, calculate the theoretical coordinates of other key feature points. Perform perspective transformation based on the theoretical coordinates and measured coordinates of each key feature point to obtain a frontal view image of each key feature point of the pipeline compensator.

[0017] Furthermore, after identifying the key feature points in the scene image, the method further includes:

[0018] If the number of identified key feature points is missing, the angular displacement of the pipeline compensator will not be judged, and the identified pipeline compensator will be identified as normal.

[0019] Furthermore, the step of performing vector calculations based on key feature points after perspective transformation to obtain the displacement angle of the pipe compensator includes:

[0020] Based on the key feature points after perspective transformation, determine the four sides of the main hinge plate and the four sides of the secondary hinge plate.

[0021] The displacement angle is calculated based on the vector represented by any width side of the main hinge plate and the vector represented by any width side of the secondary hinge plate.

[0022] The formula for calculating the displacement angle is:

[0023] ;

[0024] In the formula, Let be the displacement angle, 'a' be the vector represented by any width of the main hinge plate, and 'b' be the vector represented by any width of the secondary hinge plate.

[0025] Secondly, this application also provides a displacement detection device for a pipeline compensator, wherein the pipeline compensator includes a main hinge plate and a secondary hinge plate, and the device includes:

[0026] The recognition module is used to acquire a scene image of the pipe compensator and, based on the feature point detection model, identify the key feature points of the main hinge plate and the secondary hinge plate in the scene image.

[0027] The perspective transformation module is used to perform perspective transformation on each of the scene images according to the aspect ratio of the pipe compensator, to obtain a frontal scene image of the pipe compensator, and to obtain the coordinates of each of the key feature points after the perspective transformation;

[0028] The detection module is used to perform vector calculations based on key feature points after perspective transformation to obtain the displacement angle of the pipeline compensator. If the displacement angle is greater than a preset threshold, it is confirmed that the pipeline compensator has shifted and an alarm is triggered.

[0029] Thirdly, this application also provides an inspection robot, including a camera, a processor, and a memory. The camera is used to capture images, and the memory stores a computer program. When the computer program is run on the processor, it executes the pipeline compensator displacement detection method.

[0030] Fourthly, this application also provides a readable storage medium storing a computer program that executes the pipeline compensator displacement detection method when run on a processor.

[0031] This invention discloses a method for detecting the displacement of a pipeline compensator. The pipeline compensator includes a main hinge plate and a secondary hinge plate. The method includes: acquiring a scene image of the pipeline compensator and identifying key feature points in the main hinge plate and the secondary hinge plate according to a feature point detection model; performing perspective transformation on the coordinates of each key feature point according to the aspect ratio of the pipeline compensator to obtain a frontal view image of each key feature point; performing vector calculation on the perspective-transformed key feature points to obtain the displacement angle of the pipeline compensator; if the displacement angle is greater than a preset threshold, the pipeline compensator is confirmed to be offset and an alarm is triggered. Through image recognition, the key feature points of the main and secondary hinge plates of the pipeline compensator are accurately obtained, and perspective transformation is performed to calculate the displacement angle of the pipeline compensator and determine the degree of offset. This makes the detection process more automated and precise, eliminating the need to print specific auxiliary identification marks on the object being inspected, enhancing recognition capability and accuracy, and reducing costs. Attached Figure Description

[0032] To more clearly illustrate the technical solution of the present invention, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope of protection of the present invention. In the various drawings, similar components are numbered similarly.

[0033] Figure 1 This paper presents a schematic flowchart of a pipeline compensator displacement detection method according to an embodiment of the present application.

[0034] Figure 2 This illustration shows a schematic diagram of a pipeline compensator identification image according to an embodiment of this application;

[0035] Figure 3 This paper shows a schematic diagram of the displacement angle of a pipeline compensator according to an embodiment of the present application;

[0036] Figure 4 A schematic diagram of a pipeline compensator displacement detection device according to an embodiment of this application is shown. Detailed Implementation

[0037] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.

[0038] The components of the embodiments of the invention described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0039] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of the invention, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.

[0040] Furthermore, the terms "first," "second," and "third" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.

[0041] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of the invention pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be interpreted as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of the invention.

[0042] This application is used for displacement inspection of pipeline compensators. Images of the pipeline compensator are captured using cameras or other imaging tools. The captured images are then identified to obtain key feature points on the pipeline compensator. Perspective conversion processing is then performed to obtain frontal images of these key feature points. Finally, the displacement angle of the pipeline compensator is calculated based on these key feature points to detect whether the offset of the pipeline compensator has exceeded the warning line.

[0043] The technical solution of this application will now be described with reference to specific implementation methods.

[0044] Example 1

[0045] like Figure 1 As shown, the pipeline compensator detection method in this embodiment includes:

[0046] Step S100: Acquire a scene image of the pipe compensator and identify key feature points of the main hinge plate and the secondary hinge plate in the scene image based on the feature point detection model.

[0047] In heating pipe trenches, pipe compensators are typically used to connect two sections of large-diameter heating pipes. In northern heating systems, a type commonly used is the hinged corrugated pipe compensator. In this type, the two pipes are connected by a corrugated pipe to ensure airtightness while allowing for a certain degree of spatial displacement. Hinges are used to limit the relative position of the two pipes; typically two hinges are installed at each connection. This device generally only allows for relative rotational displacement within a certain angle, such as 15 degrees, restricting other degrees of freedom.

[0048] The pipeline compensator detection method of this embodiment can be implemented as a program on a computer or on an inspection robot. Regardless of whether it's on a robot or a computer, it can acquire scene images of the pipeline compensator via a camera. There are also certain requirements for taking the photos.

[0049] Because the pipe compensator includes a main hinge plate and a secondary hinge plate, the camera needs to be able to see one side of the main and secondary hinge plates; secondly, it should be centered as much as possible and in clear focus; at the same time, the pipe compensator should be magnified as much as possible to ensure that details are seen; the camera's line of sight should be as perpendicular as possible to the plane of the pipe compensator's hinge plate (i.e., shooting directly at the hinge plate).

[0050] After obtaining actual images of the pipeline compensator, we can begin extracting the necessary key feature points.

[0051] This embodiment uses a feature point detection model improved from MobileNetV2 (a classification model suitable for mobile devices) for recognition. It mainly uses the main part of MobileNetV2, expands the receptive field through a pyramid pooling structure, and finally connects three 3×3 convolutions for output, forming the feature point detection model used in this embodiment.

[0052] In the training data, in addition to labeling the positions of the above 8 key feature points, the center point of the pipeline compensator is also labeled. In this way, the feature point detection model trained can also identify the center point of the pipeline compensator.

[0053] Meanwhile, the loss function of the feature point detection model in this embodiment includes classification loss and regression loss, and the specific loss function expression is as follows:

[0054] ;

[0055] ;

[0056] In the above formula, γ represents the positive and negative samples of focal loss, p represents the classification output probability, IOU represents the intersection-union ratio of the predicted box and the label box, A represents the minimum convex closed box of the predicted box and the label box, and U represents the union of the predicted box and the label box.

[0057] The regression losses for the hinge center and key points are denoted as follows: The classification loss for key points uses cross-entropy loss, denoted as... The total loss is:

[0058]

[0059] In the above formula, This represents the classification loss of the detection branch. To regress the loss, To detect the total loss, f 1 ,f 2 represents the weight coefficients corresponding to the loss function. The final model obtained by training according to the above loss function is the feature point detection model used in this embodiment.

[0060] Set the two weight values ​​mentioned above. f 1 ,f 2. The efficiency of the model can be adjusted, for example, by... Configure the settings as needed.

[0061] The captured image serves as the input to the aforementioned feature point detection model. First, it detects the approximate location of the pipe compensator in the image, that is, it uses a positioning box to delineate the area where the pipe compensator is located. Then, it identifies the pipe compensator within the area delineated by the positioning box to obtain its eight key feature points.

[0062] The pipe compensator is divided into a main hinge plate and a secondary hinge plate. Each hinge plate is a rectangular plate-shaped object, so each has 4 vertices. Therefore, the entire pipe compensator needs to identify 8 key feature points.

[0063] In obtaining the positioning frame, this application primarily locates the center of the pipe compensator, and then outputs the distances L, T, R, and B of the four sides of the positioning frame from the center of the pipe compensator to determine the position and size of the positioning frame. Specifically, as follows... Figure 2 As shown, the solid dot is the center of the pipe compensator, the hollow dot is the center of the positioning frame, L is the distance from the left side to the center of the pipe compensator, T is the distance from the top side to the center of the pipe compensator, R is the distance from the right side to the center of the pipe compensator, and B is the distance from the bottom side to the center of the pipe compensator.

[0064] Because the center of the pipeline compensator has higher recognition accuracy and is strongly correlated with the eight key feature points that need to be obtained, this embodiment uses the center of the pipeline compensator as the reference for location box regression, which has a higher accuracy rate than regression based on the location box center.

[0065] Assuming the center of the bounding box is located at the (i, j) grid in the output layer, the bounding box regression equation is:

[0066] ;

[0067] ;

[0068] ;

[0069] ;

[0070] ;

[0071] ;

[0072] In the formula, C x C is the x-coordinate of the center of the positioning frame. y The ordinate of the center of the positioning frame. dx is the activation function of the neural network, dy is the x-coordinate of the center of the pipeline compensator, and dy is the y-coordinate of the center of the pipeline compensator.

[0073] The above dx, dy, l, t, r, and b are the bounding box regression values ​​output by the feature point detection model after recognizing the image. After calculating the position of the bounding box based on the above bounding box regression equation and bounding box regression values, the eight key feature points to be obtained can be recognized within the bounding box.

[0074] These 8 key points are marked as [ , ], [ , ], [ , ], [ , ], [ , ], [ , ], [ , ], [ , Because the main and secondary hinge plates are separated on the left and right sides, L and R are used to distinguish whether the key feature point is on the left hinge plate or the right hinge plate.

[0075] It should be noted that during the shooting process, due to factors such as distance and angle, some key feature points may be missing. In this case, the subsequent steps to detect the pipeline compensator will not be performed, and the pipeline compensator will be considered normal to avoid making incorrect judgments based on missing data.

[0076] Step S200: Based on the aspect ratio of the pipe compensator, perform perspective transformation on each of the scene images to obtain a frontal scene image of the pipe compensator, and obtain the coordinates of each of the key feature points after the perspective transformation.

[0077] After obtaining the eight key feature points, perspective transformation processing is required to obtain the distribution of these key feature points in a frontal shot.

[0078] It's understandable that while the shooting should adhere to the aforementioned requirements and aim for a frontal view as much as possible, the inspection robot is limited by factors such as the location, so perspective transformation processing is necessary.

[0079] First, a set of key feature points on the left or right hinge plate needs to be selected for calculation. For ease of explanation, this embodiment uses the four key feature points on the left as an example.

[0080] set up[ , ], [ , The distance between two points is the pixel distance dw, in practice [ , ], [ , The physical distance between ] and [ , ], [ , The ratio of the physical distances of the two hinge plates is r, which is a priori value. It can be understood that the pipe compensator is set according to a certain standard, so the width-to-height ratio of the two hinge plates is a fixed value. Therefore, based on this fixed value r and a certain key feature point, the theoretical position of each key feature point can be calculated.

[0081] For example, with [ , ], [ , If the distance between two points is taken as the pixel distance dw as the reference, then we can obtain [ , ], [ , The theoretical pixel distance is dh = dw / r, therefore the theoretical coordinates of the four key points on the left are [ , ], [ , ], [ , ], [ , Similarly, the four key feature points on the right can be transformed to obtain their theoretical coordinate positions.

[0082] While obtaining the theoretical coordinates, the original identification coordinates of each key feature point obtained through step S100 are also retained. Therefore, perspective transformation can be performed based on these two coordinates. Specifically, the transformation can be performed using methods within OpenCV to obtain the transformed 8 key feature points. It can be understood that the transformed 8 key feature points are equivalent to the 8 key feature points obtained from a frontal view of the pipe compensator.

[0083] For ease of explanation, the eight key points after the transformation are still marked as: [ , ], [ , ], [ , ], [ , ], [ , ], [ , ], [ , ], [ , ].

[0084] Step S300: Perform vector calculation based on the key feature points after perspective transformation to obtain the displacement angle of the pipeline compensator. If the displacement angle is greater than a preset threshold, confirm that the pipeline compensator has shifted and issue an alarm.

[0085] Once the eight key feature points are obtained after conversion, the displacement angle of the pipeline compensator can be calculated. Figure 3 As shown, the offset angle θ of the pipeline compensator can be considered as the angle between lines AB and CD, where points A, B, C, and D are... Therefore, after determining the above 8 key feature points, the offset angle θ can be further calculated. Assume the coordinates of the above four points A, B, C, and D are... , ], [ , ], [ , ], [ , Then, based on these coordinate points, the corresponding vector can be obtained, and then the offset angle θ can be calculated.

[0086] The formula for calculating the displacement angle is:

[0087] ;

[0088] In the formula, Let be the displacement angle, 'a' be the vector represented by any width of the main hinge plate, and 'b' be the vector represented by any width of the secondary hinge plate.

[0089] It can be understood that AB and CD are the top edges of the two hinge plates, and the calculation can also be performed using the bottom edges, or one top edge and one bottom edge. The corresponding offset angle θ can be obtained according to the above formula.

[0090] By comparing the offset angle θ with the preset limit value, it can be determined whether the current offset angle of the pipeline compensator exceeds the specification. If it exceeds the limit value, an alarm will be triggered to warn the staff that the pipeline compensator has an excessive offset angle and needs to be repaired.

[0091] The aforementioned limit can be around 15 degrees Celsius. The specific limit can be set according to the actual working scenario.

[0092] The pipeline compensator displacement detection method of this embodiment can be applied to a variety of devices. After acquiring the image of the pipeline compensator through a camera device, eight key points can be quickly identified, and the offset angle of the pipeline compensator can be quickly calculated. It does not have many requirements for the shooting environment and does not require markers, which greatly reduces the detection cost and improves the efficiency of automated detection.

[0093] Example 2

[0094] like Figure 4 As shown, this application also provides a pipeline compensator displacement detection device, wherein the pipeline compensator includes a main hinge plate and a secondary hinge plate, and the device includes:

[0095] The recognition module 10 is used to acquire a scene image of the pipe compensator and, based on the feature point detection model, identify the key feature points of the main hinge plate and the secondary hinge plate in the scene image.

[0096] The perspective transformation module 20 is used to perform perspective transformation on each of the scene images according to the aspect ratio of the pipe compensator, to obtain a front scene image of the pipe compensator, and to obtain the coordinates of each of the key feature points after the perspective transformation.

[0097] The detection module 30 is used to perform vector calculation based on the key feature points after perspective transformation to obtain the displacement angle of the pipeline compensator. If the displacement angle is greater than a preset threshold, it is confirmed that the pipeline compensator has shifted and an alarm is triggered.

[0098] Thirdly, this application also provides an inspection robot, including a camera, a processor, and a memory. The camera is used to capture images, and the memory stores a computer program. When the computer program is run on the processor, it executes the pipeline compensator displacement detection method.

[0099] Fourthly, this application also provides a readable storage medium storing a computer program that, when run on a processor, executes the pipeline compensator displacement detection method. The method includes: acquiring a captured scene image of the pipeline compensator; identifying key feature points in the main hinge plate and the secondary hinge plate based on a feature point detection model; performing perspective transformation on the coordinates of each key feature point according to the aspect ratio of the pipeline compensator to obtain a frontal view image of each key feature point; performing vector calculation based on the perspective-transformed key feature points to obtain the displacement angle of the pipeline compensator; and confirming pipeline compensator displacement and triggering an alarm if the displacement angle is greater than a preset threshold. Through image recognition, each key feature point of the main and secondary hinge plates of the pipeline compensator is accurately obtained, and perspective transformation is performed to calculate the displacement angle of the pipeline compensator and determine the degree of pipeline compensator displacement. This reduces recognition costs and increases work efficiency.

[0100] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that, as an alternative implementation, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0101] In addition, the functional modules or units in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.

[0102] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a smartphone, personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0103] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for detecting the displacement of a pipeline compensator, characterized in that, The pipe compensator includes a main hinge plate and a secondary hinge plate, and the method includes: Acquire scene images of the pipe compensator and identify key feature points of the main hinge plate and the secondary hinge plate in the scene images based on the feature point detection model; Based on the aspect ratio of the pipe compensator, perspective transformation is performed on each of the scene images to obtain a frontal scene image of the pipe compensator, and the coordinates of each of the key feature points after the perspective transformation are obtained. Vector calculations are performed on the key feature points after perspective transformation to obtain the displacement angle of the pipe compensator. If the displacement angle is greater than a preset threshold, it is confirmed that the pipe compensator has shifted and an alarm is triggered. The step of identifying key feature points of the main hinge plate and the secondary hinge plate in the scene image based on the feature point detection model includes: The location of the pipe compensator in the scene image is identified by the feature point detection model, and a positioning box is set according to the location of the pipe compensator. Within the positioning frame, key feature points are extracted to obtain the key feature points at the four corners of the main hinge plate and the four corners of the secondary hinge plate. The step of identifying the position of the pipe compensator in the scene image using the feature point detection model and setting a positioning box based on the position of the pipe compensator includes: Identify the center of the pipe compensator, perform a positioning frame regression based on the center of the pipe compensator, and determine the distances of the four sides of the positioning frame from the center of the pipe compensator to obtain the positioning frame; The feature point detection model consists of the main body of a MobileNetV2 model arranged in sequence, a pyramid pooling structure, and several convolutional layers at the end for use as output.

2. The pipeline compensator displacement detection method according to claim 1, characterized in that, The step of performing perspective transformation on each of the scene images based on the aspect ratio of the pipeline compensator to obtain a frontal scene image of the pipeline compensator includes: Based on the four key feature points on the main hinge plate or the secondary hinge plate, the width of the single-sided hinge plate is calculated according to the two key feature points in the width direction. Calculate the height of the single-sided hinge plate based on the aspect ratio and the width of the single-sided hinge plate; Using any one key feature point as a reference, calculate the theoretical coordinates of other key feature points. Perform perspective transformation based on the theoretical coordinates and measured coordinates of each key feature point to obtain a frontal scene image of the pipeline compensator.

3. The method for detecting displacement of a pipeline compensator according to claim 1, characterized in that, After identifying the key feature points in the scene image, the method further includes: If the number of identified key feature points is missing, the angular displacement of the pipeline compensator will not be judged, and the identified pipeline compensator will be identified as normal.

4. The method for detecting displacement of a pipeline compensator according to claim 1, characterized in that, The step of calculating the displacement angle of the pipeline compensator by performing vector calculation based on key feature points after perspective transformation includes: Based on the key feature points after perspective transformation, determine the four sides of the main hinge plate and the four sides of the secondary hinge plate. The displacement angle is calculated based on the vector represented by any width side of the main hinge plate and the vector represented by any width side of the secondary hinge plate. The formula for calculating the displacement angle is: ; In the formula, Let be the displacement angle, 'a' be the vector represented by any width of the main hinge plate, and 'b' be the vector represented by any width of the secondary hinge plate.

5. A displacement detection device for a pipeline compensator, characterized in that, The pipeline compensator includes a main hinge plate and a secondary hinge plate, and the device includes: The recognition module is used to acquire a scene image of the pipe compensator and, based on the feature point detection model, identify the key feature points of the main hinge plate and the secondary hinge plate in the scene image. The perspective transformation module is used to perform perspective transformation on each of the scene images according to the aspect ratio of the pipe compensator, to obtain a frontal scene image of the pipe compensator, and to obtain the coordinates of each of the key feature points after the perspective transformation; The detection module is used to perform vector calculations based on key feature points after perspective transformation to obtain the displacement angle of the pipe compensator. If the displacement angle is greater than a preset threshold, it is confirmed that the pipe compensator has shifted and an alarm is triggered. The step of identifying key feature points of the main hinge plate and the secondary hinge plate in the scene image based on the feature point detection model includes: The location of the pipe compensator in the scene image is identified by the feature point detection model, and a positioning box is set according to the location of the pipe compensator. Within the positioning frame, key feature points are extracted to obtain the key feature points at the four corners of the main hinge plate and the four corners of the secondary hinge plate. The step of identifying the position of the pipe compensator in the scene image using the feature point detection model and setting a positioning box based on the position of the pipe compensator includes: Identify the center of the pipe compensator, perform a positioning frame regression based on the center of the pipe compensator, and determine the distances of the four sides of the positioning frame from the center of the pipe compensator to obtain the positioning frame; The feature point detection model consists of the main body of a MobileNetV2 model arranged in sequence, a pyramid pooling structure, and several convolutional layers at the end for use as output.

6. An inspection robot, characterized in that, The device includes a camera, a processor, and a memory. The camera is used to capture images, and the memory stores a computer program that, when run on the processor, executes the pipeline compensator displacement detection method according to any one of claims 1 to 4.

7. A readable storage medium, characterized in that, It stores a computer program that, when run on a processor, executes the pipeline compensator displacement detection method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Electric energy meter mounting position deviation detection method based on perspective transformation matrix

    CN106530270A

  • Vehicle type pipeline detection remote control robot, positioning method, device, equipment and medium

    CN115760809A