Method and system for detecting a tilt angle

By using an image acquisition module to acquire the initial image, using an image processing module to perform image segmentation, and combining the pixel points of the image segmentation map to obtain the fitted contour line of the utility pole, the problem of high efficiency in detecting the tilt angle of the utility pole is solved, automated detection is achieved, and labor costs are reduced.

CN119006359BActive Publication Date: 2025-12-05SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410841131.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2025-12-05
Estimated Expiration
2044-06-26

AI Technical Summary

Technical Problem

Existing technologies for detecting the tilt of utility poles are inefficient, consume a lot of human resources, and are difficult to efficiently detect the tilt angle of utility poles.

Method used

An initial image is acquired using an image acquisition module, and the image is segmented using an image processing module. The image is then segmented using an image segmentation technology processing module, and the initial image is segmented using the image processing module. The image is then segmented using the image acquisition module, and the segmented image is sent to a tilt detection module based on the fitted contour line. The tilt angle of the object to be detected is then determined based on the fitted contour line.

Benefits of technology

This paper implements image segmentation of utility poles. Using the segmented image, the paper fits the pixel points of the utility pole to obtain a fitted contour line. The fitted contour line is then used to estimate the angle between the utility pole and the horizontal or vertical direction. This solves the technical problem of efficient utility pole detection, improves detection efficiency, and reduces labor costs for detecting the tilt angle of utility poles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119006359B_ABST
    Figure CN119006359B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of detection method and system of inclination angle, wherein the method comprises: obtaining the initial image collected by image acquisition module to the object to be detected is collected;Image segmentation processing is carried out to initial image using image processing module, so that image processing module carries out image segmentation to initial image, and the image segmentation graph of the object to be detected is obtained, wherein the image segmentation graph at least includes the object to be detected and the detection background of the object to be detected, the pixel value of the first pixel point of the object to be detected is greater than first preset value, the pixel value of the second pixel point of detection background is less than second preset value, and first preset value is greater than second preset value;The initial contour line of the object to be detected is determined based on the coordinate position of first pixel point on image segmentation graph;Fitting contour line fitting to initial contour line is sent to inclination detection module, so that inclination detection module determines the inclination angle of the object to be detected based on fitting contour line.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to the field of image data processing, and in particular, to a method and system for detecting an inclination angle. BACKGROUND

[0002] With the increasing demand for electricity, more and more power poles need to be installed. Since the power poles are basically installed outdoors, it is inevitable that the power poles will be tilted due to the influence of the outdoor environment or accidental events such as collisions. The power transmission capacity of the tilted power poles will decrease, and even cause safety hazards such as electric leakage. Therefore, it is necessary to regularly maintain and detect the power poles.

[0003] However, the current detection method is usually manual visual inspection of all power poles to determine whether the power poles are tilted, which not only consumes a lot of time cost and wastes valuable human resources, but also has low detection efficiency. Therefore, in the related art, there is a technical problem of how to efficiently detect the inclination angle of the power pole.

[0004] For the technical problem of how to efficiently detect the inclination angle of the power pole in the related art, no effective solution has been proposed so far.

[0005] Therefore, it is necessary to improve the related art to overcome the defects in the related art. SUMMARY

[0006] Embodiments of the present application provide a method and system for detecting an inclination angle to at least solve the technical problem of efficiently detecting the inclination angle of the power pole in the related art.

[0007] According to an embodiment of the present application, a method for detecting an inclination angle is provided, which is applied to a processing center. The processing center belongs to an inclination angle detection system, and the inclination angle detection system further includes an image acquisition module, an image processing module, and an inclination detection module. The method comprises: obtaining an initial image collected by the image acquisition module from a to-be-detected object; performing image segmentation processing on the initial image using the image processing module, so that the image processing module performs image segmentation on the initial image to obtain an image segmentation graph of the to-be-detected object, wherein the image segmentation graph at least includes the to-be-detected object and a detection background of the to-be-detected object, a pixel value of a first pixel point of the to-be-detected object is greater than a first preset value, a pixel value of a second pixel point of the detection background is less than a second preset value, and the first preset value is greater than the second preset value; determining an initial contour line of the to-be-detected object based on a coordinate position of the first pixel point on the image segmentation graph; and sending a fitting contour line fitting the initial contour line to the inclination detection module, so that the inclination detection module determines an inclination angle of the to-be-detected object based on the fitting contour line.

[0008] In an example embodiment, the image segmentation processing of the initial image by the image processing module includes: sending the initial image to an encoding layer of the image processing module, and extracting an image feature vector of the initial image based on the encoding layer; and performing decoding operation on the image feature vector by a decoding layer of the image processing module to obtain the image segmentation map of the object to be detected; and wherein the sending the initial image to the encoding layer of the image processing module and the extracting the image feature vector of the initial image based on the encoding layer include: inputting the initial image to an ASPP module of the encoding layer to obtain an encoding feature vector output by the ASPP module, wherein the ASPP module includes at least a first convolution layer, a second convolution layer, a global average pooling layer, and a third convolution layer; obtaining a first convolution feature vector processed by the initial image sequentially through the first convolution layer, the second convolution layer, and the global average pooling layer; and obtaining a second convolution feature vector processed by the initial image sequentially through the first convolution layer, the second convolution layer, the global average pooling layer, and the third convolution layer; and determining the image feature vector according to the first convolution feature vector and the second convolution feature vector.

[0009] In an example embodiment, the decoding operation on the image feature vector by the decoding layer of the image processing module to obtain the image segmentation map of the object to be detected includes: performing 4 times linear up-sampling on the first convolution feature vector in the decoding layer to obtain a third convolution feature vector; performing feature fusion on the second convolution feature vector and the third convolution feature vector to obtain a fusion feature vector; inputting the fusion feature vector to a fourth convolution layer to obtain a fourth convolution feature vector output by the fourth convolution layer; obtaining a sampling feature vector obtained by performing 4 times linear up-sampling on the fourth convolution feature vector, and generating the image segmentation map according to the sampling feature vector.

[0010] In an example embodiment, before the image segmentation of the initial image is performed by using the image processing module to obtain the image segmentation graph of the object to be detected, the method further comprises: obtaining a training image set required when training the image segmentation model from all historical images of the object to be detected, wherein the image segmentation model is built-in the image processing module; training an initial segmentation model by taking a training image in the training image set as an input sample and taking a label corresponding to the training image as an output sample, to obtain the image segmentation model; wherein the training image at least includes one of the following: an image of the object to be detected at different historical angles, an image of the object to be detected at different historical times, an image of the object to be detected under different illuminations, and the label indicates the object to be detected in the training image.

[0011] In an example embodiment, after the image segmentation model is obtained, the method further comprises: obtaining a test image set required when testing the image segmentation model from all historical images of the object to be detected; inputting a test image in the test image set to the image segmentation model to obtain a test label output by the image segmentation model; in a case where the first object indicated by the test label is consistent with a second object indicated by a label corresponding to the test image, if it is determined that a difference between a proportion of the first object in the test image and a proportion of the second object in the test image is less than a preset value, it is determined that the image segmentation model passes the test.

[0012] In an example embodiment, determining the initial contour line of the object to be detected based on the coordinate position of the first pixel point on the image segmentation graph comprises: establishing an image coordinate system of the image segmentation graph by taking an image top corner of the image segmentation graph as an origin, taking a horizontal edge line where the image top corner is located as a horizontal axis, and taking a vertical edge line where the image top corner is located as a vertical axis; converting the first pixel point into a coordinate point on the image coordinate system to obtain a coordinate position of the first pixel point on the image coordinate system; and generating the initial contour line according to all coordinate positions; wherein sending the fitting contour line fitted on the initial contour line to the tilt detection module to enable the tilt detection module to determine the tilt angle of the object to be detected based on the fitting contour line comprises: obtaining the fitting contour line by linear fitting on all coordinate positions; sending the fitting contour line to the tilt detection module to enable the tilt detection module to determine a linear regression fitting function corresponding to the fitting contour line; and determining the tilt angle of the object to be detected according to a slope of the linear regression fitting function.

[0013] In an example embodiment, the tilt angle detection system further comprises an alarm module, and the method further comprises: sending the tilt angle to the alarm module, so that the alarm module compares the tilt angle with a preset angle and outputs a comparison result; and in a case where it is determined that the comparison result indicates that the tilt angle is greater than the preset angle, generating an alarm information and sending the alarm information to a target object, so that the target object processes the alarm information.

[0014] According to another embodiment of the present application, a tilt angle detection system is provided, comprising at least a processing center, an image acquisition module, an image processing module, and a tilt detection module. The processing center is configured to: acquire an initial image collected by the image acquisition module from a to-be-detected object; perform image segmentation processing on the initial image by using the image processing module, so that the image processing module performs image segmentation on the initial image to obtain an image segmentation graph of the to-be-detected object, wherein the image segmentation graph at least comprises the to-be-detected object and a detection background of the to-be-detected object, a pixel value of a first pixel point of the to-be-detected object is greater than a first preset value, a pixel value of a second pixel point of the detection background is less than a second preset value, and the first preset value is greater than the second preset value; determine an initial contour line of the to-be-detected object based on a coordinate position of the first pixel point on the image segmentation graph; and send a fitting contour line fitting the initial contour line to the tilt detection module, so that the tilt detection module determines a tilt angle of the to-be-detected object based on the fitting contour line.

[0015] According to still another embodiment of the present application, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. When the computer program is executed, the steps in any of the above method embodiments are performed.

[0016] According to still another embodiment of the present application, an electronic device is provided, comprising a memory and a processor. The memory stores a computer program, and the processor is configured to execute the computer program to perform the steps in any of the above method embodiments.

[0017] According to still another embodiment of the present application, a computer program product is provided, comprising a computer program. When the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0018] Through the application, based on the detection system of the tilt angle including the processing center, the image acquisition module, the image processing module, the tilt detection module, the initial image collected by the image acquisition module on the object to be detected is acquired by the processing center, and then the image segmentation processing is performed on the initial image by using the image processing module, so that the image processing module performs image segmentation on the initial image, and the image segmentation graph of the object to be detected is obtained, wherein the image segmentation graph at least includes the object to be detected and the detection background of the object to be detected, the pixel value of the first pixel point of the object to be detected is greater than the first preset value, the pixel value of the second pixel point of the detection background is less than the second preset value, the first preset value is greater than the second preset value, then the initial contour line of the object to be detected is determined based on the coordinate position of the first pixel point on the image segmentation graph, and then the fitting contour line fitting the initial contour line is sent to the tilt detection module, so that the tilt detection module determines the tilt angle of the object to be detected based on the fitting contour line. That is, the image segmentation technology processes the initial image of the power pole (i.e. the object to be detected), obtains the image segmentation graph, uses the power pole to fit the fitting contour line of the power pole at the pixel point of the image segmentation graph, estimates the included angle between the power pole and the horizontal or vertical direction to determine whether the power pole is tilted, solves the technical problem of efficiently detecting the tilt angle of the power pole, automatically detects the power pole, improves the detection efficiency, and reduces the labor cost. BRIEF DESCRIPTION OF DRAWINGS

[0019] Figure 1 is a hardware structure block diagram of a server device of a tilt angle detection method according to an embodiment of the application.

[0020] Figure 2 is a flowchart of a tilt angle detection method according to an embodiment of the application;

[0021] Figure 3 is a schematic block diagram of a Deeplabv3+ network according to an embodiment of the application;

[0022] Figure 4 is a schematic diagram of an initial image of a tilted power pole according to an embodiment of the application;

[0023] Figure 5 is a schematic diagram of an image segmentation graph of a tilted power pole according to an embodiment of the application;

[0024] Figure 6 is a schematic diagram of an initial image of a vertical power pole according to an embodiment of the application;

[0025] Figure 7 is a schematic diagram of an image segmentation graph of a vertical power pole according to an embodiment of the application;

[0026] Figure 8 This is a schematic diagram of the linear fitting process according to an embodiment of this application;

[0027] Figure 9 This is a schematic diagram of the fitted contour line of a vertical utility pole according to an embodiment of this application;

[0028] Figure 10 This is a schematic diagram of the tilt angle detection process according to an embodiment of this application;

[0029] Figure 11 This is a schematic diagram of the tilt angle detection system according to an embodiment of this application. Detailed Implementation

[0030] The embodiments of this application will be described in detail below with reference to the accompanying drawings and examples.

[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0032] The methods and embodiments provided in this application can be executed on a server device or a similar computing device. Taking running on a server device as an example, Figure 1 This is a hardware structure block diagram of a server device for a tilt angle detection method according to an embodiment of this application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the diagram. A processor 102 (which may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.) and a memory 104 for storing data are also shown. The server device may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the server equipment described above. For example, the server equipment may also include components that are more... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0033] The memory 104 can be used to store computer programs, for example, software programs of application software and modules, such as a computer program corresponding to the tilt angle detection method in the embodiments of the present application. The processor 102 performs various functional applications and data processing by running the computer programs stored in the memory 104, that is, implements the above method. The memory 104 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, which can be connected to a server device through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0034] The transmission device 106 is used to receive or send data via a network. The specific examples of the above network can include a wireless network provided by a communication provider of a server device. In one example, the transmission device 106 includes a network adapter (NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet in a wireless manner.

[0035] In the present embodiment, a tilt angle detection method is provided, which is applied to a processing center. The processing center belongs to a tilt angle detection system. The tilt angle detection system further includes an image acquisition module, an image processing module, and a tilt detection module. As shown in the figure, the tilt angle detection process specifically includes the following steps: Figure 2

[0036] In step S202, an initial image collected by the image acquisition module on a to-be-detected object is acquired.

[0037] The image acquisition module corresponds to a collection area. The to-be-detected object and an environment background in which the to-be-detected image is located can be collected in the collection area. The to-be-detected object is, for example, a telegraph pole.

[0038] In step S204, the image processing module is used to perform image segmentation processing on the initial image, so that the image processing module performs image segmentation on the initial image to obtain an image segmentation image of the to-be-detected object. The image segmentation image at least includes the to-be-detected object and a detection background of the to-be-detected object. A pixel value of a first pixel point of the to-be-detected object is greater than a first preset value. A pixel value of a second pixel point of the detection background is less than a second preset value. The first preset value is greater than the second preset value.​

[0039] In step S206, the initial contour line of the object to be detected is determined based on the coordinate position of the first pixel point on the image segmentation map.

[0040] In step S208, the fitting contour line fitted to the initial contour line is sent to the tilt detection module, so that the tilt detection module determines the tilt angle of the object to be detected based on the fitting contour line.

[0041] Based on the detection system of the tilt angle including a processing center, an image acquisition module, an image processing module, and a tilt detection module, the initial image collected by the image acquisition module on the object to be detected is acquired by the processing center, and then the image segmentation processing is performed on the initial image by using the image processing module, so that the image processing module performs image segmentation on the initial image to obtain the image segmentation map of the object to be detected. The image segmentation map at least includes the object to be detected and the detection background of the object to be detected. The pixel value of the first pixel point of the object to be detected is greater than a first preset value, the pixel value of the second pixel point of the detection background is less than a second preset value, the first preset value is greater than the second preset value. Then, the initial contour line of the object to be detected is determined based on the coordinate position of the first pixel point on the image segmentation map. Then, the fitting contour line fitted to the initial contour line is sent to the tilt detection module, so that the tilt detection module determines the tilt angle of the object to be detected based on the fitting contour line. That is, the image segmentation technology processes the initial image of the power pole (i.e. the object to be detected) to obtain the image segmentation map. The fitting contour line of the power pole is fitted by using the pixel points of the power pole on the image segmentation map. The included angle between the power pole and the horizontal or vertical direction is estimated by using the fitting contour line, so as to determine whether the power pole is tilted. The technical problem of efficiently detecting the tilt angle of the power pole is solved. The power pole is automatically detected, the detection efficiency is improved, and the labor cost is reduced.

[0042] Optionally, the execution subject of the above steps can be a server, a terminal, etc., but is not limited thereto.

[0043] In an example embodiment, the image segmentation processing of the initial image by the image processing module is further implemented by the following steps: sending the initial image to an encoding layer of the image processing module, extracting an image feature vector of the initial image based on the encoding layer; performing decoding operation on the image feature vector by a decoding layer of the image processing module to obtain the image segmentation graph of the object to be detected; wherein the sending the initial image to the encoding layer of the image processing module and extracting the image feature vector of the initial image based on the encoding layer comprises: inputting the initial image into an ASPP module of the encoding layer to obtain an encoding feature vector output by the ASPP module, wherein the ASPP module at least includes a first convolution layer, a second convolution layer, a global average pooling layer, and a third convolution layer; obtaining a first convolution feature vector processed by the initial image through the first convolution layer, the second convolution layer and the global average pooling layer in sequence; and obtaining a second convolution feature vector processed by the initial image through the first convolution layer, the second convolution layer, the global average pooling layer and the third convolution layer in sequence; determining the image feature vector according to the first convolution feature vector and the second convolution feature vector. In this embodiment, the initial image is segmented to facilitate subsequent identification of objects in the image, thereby improving the image data processing efficiency.

[0044] In an example embodiment, the image segmentation processing of the initial image by the image processing module is further implemented by the following steps: sending the initial image to an encoding layer of the image processing module, extracting an image feature vector of the initial image based on the encoding layer; performing decoding operation on the image feature vector by a decoding layer of the image processing module to obtain the image segmentation graph of the object to be detected; wherein the sending the initial image to the encoding layer of the image processing module and extracting the image feature vector of the initial image based on the encoding layer comprises: inputting the initial image into an ASPP module of the encoding layer to obtain an encoding feature vector output by the ASPP module, wherein the ASPP module at least includes a first convolution layer, a second convolution layer, a global average pooling layer, and a third convolution layer; obtaining a first convolution feature vector processed by the initial image through the first convolution layer, the second convolution layer and the global average pooling layer in sequence; and obtaining a second convolution feature vector processed by the initial image through the first convolution layer, the second convolution layer, the global average pooling layer and the third convolution layer in sequence; determining the image feature vector according to the first convolution feature vector and the second convolution feature vector. In this embodiment, the initial image is segmented to facilitate subsequent identification of objects in the image, thereby improving the image data processing efficiency.

[0045] In an example embodiment, before the image segmentation processing of the initial image by the image processing module is performed to obtain the image segmentation image of the to-be-detected object, further, a training image set required for training the image segmentation model is obtained from all historical images of the to-be-detected object, wherein the image segmentation model is built-in the image processing module; the initial segmentation model is trained by taking a training image in the training image set as an input sample and taking a labeling result corresponding to the training image as an output sample, to obtain the image segmentation model; wherein the training image at least includes one of the following: an image of the to-be-detected object at different historical angles, an image of the to-be-detected object at different historical times, an image of the to-be-detected object under different illuminations, and the labeling result indicates that the to-be-detected object is labeled in the training image. This embodiment uses multiple images for training, enriches the training set of the model, and improves the accuracy of the model.

[0046] In an example embodiment, after the image segmentation model is obtained, a test image set required for testing the image segmentation model can also be obtained from all historical images of the to-be-detected object; a test image in the test image set is input into the image segmentation model to obtain a test labeling result output by the image segmentation model; in a case where the first object indicated by the test labeling result is consistent with a second object indicated by a labeling result corresponding to the test image, if it is determined that a difference between a proportion of the first object in the test image and a proportion of the second object in the test image is less than a preset value, it is determined that the image segmentation model passes the test.

[0047] In one example embodiment, a technical solution is proposed which can determine the initial contour line of the object to be detected based on the coordinate position of the first pixel point on the image segmentation map, specifically comprising: establishing an image coordinate system of the image segmentation map with the image top corner of the image segmentation map as the origin, with the horizontal edge line where the image top corner is located as the horizontal axis, and with the vertical edge line where the image top corner is located as the vertical axis; converting the first pixel point into a coordinate point on the image coordinate system to obtain the coordinate position of the first pixel point on the image coordinate system; generating the initial contour line according to all coordinate positions; wherein the fitting contour line fitting the initial contour line is sent to the tilt detection module, so that the tilt detection module determines the tilt angle of the object to be detected based on the fitting contour line, comprising: obtaining the fitting contour line by linearly fitting all coordinate positions; sending the fitting contour line to the tilt detection module so that the tilt detection module determines the linear regression fitting function corresponding to the fitting contour line; determining the tilt angle of the object to be detected according to the slope of the linear regression fitting function.

[0048] Wherein, for the image top corner, for example, the top left corner, but not limited to this.

[0049] Wherein, the process of linearly fitting all coordinate positions is the process of fitting the initial contour line.

[0050] In one example embodiment, the tilt angle detection system further comprises an alarm module, and further, the tilt angle is sent to the alarm module to make the alarm module compare the tilt angle with a preset angle and output a comparison result; in a case where it is determined that the comparison result is used to indicate that the tilt angle is greater than the preset angle, alarm information is generated and sent to a target object to make the target object process the alarm information.

[0051] Optionally, in a case where it is determined that the comparison result is used to indicate that the tilt angle is less than or equal to the preset angle, no alarm information needs to be generated.

[0052] Wherein, the target object can represent a maintenance personnel. Or it can also represent a processor with a preset processing program.

[0053] Further, in one embodiment, the tilt angle detection process is explained in combination with the following steps:

[0054] Step one: data collection and preparation.

[0055] Specifically, images containing tilted and normal vertical poles can be obtained from different angles, different times, and different lighting conditions, and then image datasets are obtained. In order to train the model, the poles in each image must be accurately labeled. This means that for each pixel in the image, it needs to be specified whether it belongs to the pole.

[0056] The dataset is divided into a training set (equivalent to the above training image set) and a test set (equivalent to the above test image set), and the different samples in the training set must be relatively uniform, and the number of tilted poles and non-tilted poles is about 1:1, and the total number is not less than 2000. That is, the proportion of different samples in the training set can be pre-set. This proportion is not fixed and can be adjusted according to actual needs.

[0057] Among them, the tilted pole refers to Figure 4 The non-tilted pole (i.e. the vertical pole) refers to Figure 6 .

[0058] Step two: select an image segmentation model. Taking DeepLab as an example, since each version has different performance and complexity, a version can be selected from DeepLabv1, DeepLabv2, DeepLabv3, DeepLabv3+, etc. according to specific needs. The present application selects DeepLabv3+, and the architecture of DeepLabv3+ is shown in Figure 3 .

[0059] DeepLab is a deep learning-based image segmentation model that uses a convolutional neural network (CNN) architecture to achieve high-precision semantic segmentation. One of the key innovations of DeepLab is the introduction of Atrous convolution (also known as dilated convolution or dilated convolution), which is used to expand the receptive field while maintaining computational efficiency. By increasing the dilation rate in the convolutional layers, DeepLab can handle different scales of contextual information, allowing it to better capture semantic information around the target. In addition, DeepLab also incorporates post-processing methods such as Conditional Random Fields (CRF) to better eliminate boundary ambiguity and detail errors. Later versions of DeepLab, such as DeeplabV2 and DeeplabV3, have introduced other improvements. In DeeplabV3, a deeper network structure and more complex feature processing mechanism are used to further improve segmentation performance. At the same time, multi-scale feature fusion (such as pyramid pooling) is used in the network to capture multi-scale contextual information, and skip connections are used to utilize low-level features. DeepLab is mainly used for pixel-level semantic segmentation, which provides class predictions for each pixel, allowing you to draw bounding boxes or other forms of visualization to highlight the location of the target as needed.

[0060] DeepLabv3+ model adopts an encoder-decoder structure. The encoder part is responsible for extracting image features, while the decoder part is used to restore the spatial resolution of the feature map, which helps to more accurately identify the image. At the same time, DeepLabv3+ has shown excellent segmentation accuracy on multiple standard datasets, especially in handling complex scenes and edge details. Due to its advanced features, DeepLabv3+ performs well for various image segmentation tasks and has strong generalization ability. Moreover, the ASPP module enables DeepLabv3+ model to effectively handle objects of different sizes, which is particularly important for image segmentation tasks.

[0061] Step three: model training.

[0062] For example, based on the open-source deep learning platform PaddlePaddle, the paddleSeg module embeds the DeepLabv3+ model to quickly establish an engineering training model. The specific training process can be referred to the guidance of PaddlePaddle.

[0063] The return value of the DeepLabv3+ model is a segmentation map, which has the same size as the input image (or may be scaled according to different implementations), and the value of each pixel represents which category the pixel belongs to. Here, the pixels only contain two categories, "pole" (i.e., the object to be detected) and "background" (i.e., the detection background).

[0064] Step four: result verification. The trained model needs to clearly segment the pixels of the two categories of "pole" and "background", as shown in Figure 5 or Figure 7 The white part is the recognized pole, and the black part is the background image.

[0065] The white part of the pixel point represents the first pixel point mentioned above, and the pixel value is 255. The black part of the pixel point represents the second pixel point mentioned above, and the pixel value is 0.

[0066] Step five: find the regression function of the white pixel points and calculate the inclination angle by using statistical machine learning. As shown in Figure 8 The specific implementation process is as follows:

[0067] S801, establish a coordinate system with a picture.

[0068] S802, record the pixel point coordinates of the pole.

[0069] S803, perform linear regression calculation on the pixel point coordinates.

[0070] S804, obtain the linear regression equation.

[0071] S805, calculate the included angle by using the slope.

[0072] Through the above steps, a rectangular coordinate system is established on the segmentation map, with the upper left corner as the origin, the upper edge of the picture as the X-axis, and the left edge as the Y-axis. The coordinates corresponding to the white pixel points can be fitted by a linear regression fitting function, as shown in Figure 9 The red fine line is the fitted function. For example, the fitted function is y = 0.53x + 102.27, and the slope of the function shows that the included angle between the pole and the horizontal direction is about 28 degrees, and the included angle with the vertical direction is about 62 degrees, and it is determined whether the pole has a tilt.

[0073] Among them, linear regression is a supervised learning method, which aims to describe the relationship between input variables (independent variables) and output variables (dependent variables) by fitting a linear equation. The model is trained based on a set of known input features and corresponding output values, and the parameters of the model are estimated by minimizing the sum of squared residuals.

[0074] Step six: set the tilt threshold, if the tilt angle is greater than the threshold, the recognition system generates an alarm information feedback to the relevant departments for emergency treatment, if the tilt angle is less than the threshold, it is considered that the recognition passes without taking measures.

[0075] Step seven: arrange the above steps to get the corresponding implementation process. As shown in figure 0, the overall process includes the following steps: Figure 1

[0076] Step S1, collect the pictures of the electric pole.

[0077] Step S2, data preprocessing.

[0078] Step S3, picture annotation.

[0079] Step S4, DeepLabv3 model training.

[0080] Step S5, verify the model effect. If the segmentation is not accurate, execute step S6, if the segmentation is accurate, execute step S7.

[0081] Step S6, add new pictures with poor effect.

[0082] Step S7, regression analysis.

[0083] Step S8, calculate the tilt angle.

[0084] Step S9, whether greater than the threshold. If yes, execute step S10, if no, execute step S13.

[0085] Step S10, system alarm.

[0086] Step S11, report to the relevant departments.

[0087] Step S12, emergency treatment.

[0088] Step S13, recognition pass.

[0089] Through the above steps, whether the electric pole is tilted can be detected based on artificial intelligence. In this process, DeepLabv3 image segmentation model is used to detect the specific position of electric pole in the picture. Then, a right angle coordinate system is established based on the detected picture, a linear regression function is fitted according to the position information of the pixel points of the electric pole in the image, and the size of the angle between the electric pole and the horizontal line is calculated by using the function, so as to calculate the tilt angle of the electric pole.

[0090] ​Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software on a general hardware platform as necessary, and of course can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product in essence or in the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk), and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device) to execute the method described in each embodiment of the present application.

[0091] In the present embodiment, a tilt angle detection system is also provided, which is used to implement the above embodiments and preferred embodiments, and will not be described again. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, hardware or a combination of software and hardware is also possible and contemplated.

[0092] Figure 11 is a structural schematic diagram of a tilt angle detection system according to an embodiment of the present application, as shown in Figure 11 the system at least includes a processing center 1102, an image acquisition module 1104, an image processing module 1106, and a tilt detection module 1108.

[0093] The processing center is configured to: acquire an initial image collected by the image acquisition module from a to-be-detected object; perform image segmentation processing on the initial image using the image processing module, so that the image processing module performs image segmentation on the initial image to obtain an image segmentation graph of the to-be-detected object, wherein the image segmentation graph at least includes the to-be-detected object and a detection background of the to-be-detected object, a pixel value of a first pixel point of the to-be-detected object is greater than a first preset value, a pixel value of a second pixel point of the detection background is less than a second preset value, and the first preset value is greater than the second preset value; determine an initial contour line of the to-be-detected object based on a coordinate position of the first pixel point on the image segmentation graph; and send a fitting contour line fitting the initial contour line to the tilt detection module, so that the tilt detection module determines a tilt angle of the to-be-detected object based on the fitting contour line.

[0094] The detection system of the inclination angle through the above processing center, the image acquisition module, the image processing module, the inclination detection module, the processing center acquires the initial image collected by the image acquisition module for collecting the to-be-detected object, then the image processing module is used for image segmentation processing on the initial image, so that the image processing module performs image segmentation on the initial image to obtain the image segmentation graph of the to-be-detected object, wherein the image segmentation graph at least includes the to-be-detected object and the detection background of the to-be-detected object, the pixel value of the first pixel point of the to-be-detected object is greater than the first preset value, the pixel value of the second pixel point of the detection background is less than the second preset value, the first preset value is greater than the second preset value, then the initial contour line of the to-be-detected object is determined based on the coordinate position of the first pixel point on the image segmentation graph, and then the fitting contour line fitting the initial contour line is sent to the inclination detection module, so that the inclination detection module determines the inclination angle of the to-be-detected object based on the fitting contour line. That is, the image segmentation technology processes the initial image of the power pole (i.e. the to-be-detected object) to obtain an image segmentation graph, a fitting contour line of the power pole is fitted using the pixel points of the power pole in the image segmentation graph, and the angle between the power pole and the horizontal or vertical direction is estimated using the fitting contour line to determine whether the power pole is inclined, thereby solving the technical problem of efficiently detecting the inclination angle of the power pole, automatically detecting the power pole, improving the detection efficiency, and reducing the labor cost.

[0095] In one example embodiment, the processing center is further configured to: send the initial image to an encoding layer of the image processing module, extract an image feature vector of the initial image based on the encoding layer; and obtain the image segmentation graph of the to-be-detected object by performing a decoding operation on the image feature vector through a decoding layer of the image processing module; wherein the sending of the initial image to the encoding layer of the image processing module and the extracting of the image feature vector of the initial image based on the encoding layer comprises: inputting the initial image into an all-space pyramid pooling (ASPP) module of the encoding layer to obtain an encoding feature vector output by the ASPP module, wherein the ASPP module at least includes a first convolutional layer, a second convolutional layer, a global average pooling layer, and a third convolutional layer; obtaining a first convolutional feature vector by sequentially processing the initial image through the first convolutional layer, the second convolutional layer, and the global average pooling layer; and obtaining a second convolutional feature vector by sequentially processing the initial image through the first convolutional layer, the second convolutional layer, the global average pooling layer, and the third convolutional layer; and determining the image feature vector according to the first convolutional feature vector and the second convolutional feature vector.

[0096] In an example embodiment, the processing center is further configured to perform 4 times linear up-sampling on the first convolutional feature vector in the decoding layer to obtain a third convolutional feature vector; perform feature fusion on the second convolutional feature vector and the third convolutional feature vector to obtain a fused feature vector; input the fused feature vector into a fourth convolutional layer to obtain a fourth convolutional feature vector output by the fourth convolutional layer; obtain a sampling feature vector obtained by performing 4 times linear up-sampling on the fourth convolutional feature vector, and generate the image segmentation map according to the sampling feature vector.

[0097] In an example embodiment, the processing center is further configured to obtain a training image set required when training the image segmentation model from all historical images of the object to be detected, wherein the image segmentation model is built-in in the image processing module; train an initial segmentation model by taking a training image in the training image set as an input sample and taking a labeling result corresponding to the training image as an output sample to obtain the image segmentation model; wherein the training image at least includes one of the following: an image of the object to be detected at different historical angles, an image of the object to be detected at different historical times, an image of the object to be detected under different illuminations, and the labeling result indicates that the object to be detected is labeled in the training image.

[0098] In an example embodiment, the processing center is further configured to obtain a test image set required when testing the image segmentation model from all historical images of the object to be detected; input a test image in the test image set into the image segmentation model to obtain a test labeling result output by the image segmentation model; in a case where the test labeling result indicates a first object is consistent with a second object indicated by a labeling result corresponding to the test image, if it is determined that a difference between a proportion of the first object in the test image and a proportion of the second object in the test image is less than a preset value, it is determined that the image segmentation model passes the test.

[0099] In an example embodiment, the processing center is further configured to: establish an image coordinate system of the image segmentation map, with a top corner of the image segmentation map as an origin, with a horizontal edge line where the top corner is located as a horizontal axis, and with a vertical edge line where the top corner is located as a vertical axis; convert the first pixel point into a coordinate point in the image coordinate system to obtain a coordinate position of the first pixel point in the image coordinate system; and generate the initial contour line according to all coordinate positions; wherein the fitting contour line fitted to the initial contour line is sent to the tilt detection module, so that the tilt detection module determines the tilt angle of the object to be detected based on the fitting contour line, including: obtaining the fitting contour line by linear fitting on all coordinate positions; sending the fitting contour line to the tilt detection module, so that the tilt detection module determines a linear regression fitting function corresponding to the fitting contour line; and determining the tilt angle of the object to be detected according to a slope of the linear regression fitting function.

[0100] In an example embodiment, the tilt angle detection system further includes an alarm module, and the processing center is further configured to: send the tilt angle to the alarm module, so that the alarm module compares the tilt angle with a preset angle and outputs a comparison result; and in a case where it is determined that the comparison result is used to indicate that the tilt angle is greater than the preset angle, generate an alarm information and send the alarm information to a target object, so that the target object processes the alarm information.

[0101] It should be noted that the above various modules can be implemented by software or hardware, and for the latter, the following implementation manners can be used, but are not limited thereto: the above modules are located in the same processor; or the above various modules are located in different processors in any combination.

[0102] Embodiments of the present application also provide a computer readable storage medium, which stores a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.

[0103] In an example embodiment, the above computer readable storage medium can include, but is not limited to: a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.

[0104] The embodiment of the present application further provides an electronic device, comprising a memory and a processor, the memory stores a computer program, and the processor is configured to execute the computer program to perform the steps in any of the method embodiments.

[0105] In an example embodiment, the electronic device further comprises a transmission device connected to the processor and an input / output device connected to the processor.

[0106] The embodiment of the present application further provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps in any of the method embodiments.

[0107] The embodiment of the present application further provides another computer program product, which comprises a non-volatile computer readable storage medium, and the non-volatile computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in any of the method embodiments.

[0108] The embodiment of the present application further provides a computer program, which comprises computer instructions stored in a computer readable storage medium; a processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to perform the steps in any of the method embodiments.

[0109] The specific examples in the embodiment can refer to the examples described in the above embodiments and example embodiments, and the embodiment will not be described here.

[0110] Obviously, those skilled in the art should understand that the modules or steps of the present application described above can be realized by general computing devices, which can be concentrated on a single computing device or distributed on a network composed of multiple computing devices, and they can be realized by program codes executable by computing devices, so that they can be stored in storage devices and executed by computing devices, and in some cases, the steps shown or described can be executed in different order, or they can be manufactured into individual integrated circuit modules, or multiple modules or steps can be manufactured into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.

[0111] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Those skilled in the art can make various modifications and changes to the present application. Any modification, equivalent replacement, improvement, etc. within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method of detecting a tilt angle, characterized by, The application is applied to a processing center belonging to a tilt angle detection system, the tilt angle detection system further comprises an image acquisition module, an image processing module, a tilt detection module, comprising: An initial image collected by the image acquisition module is acquired; An image segmentation process is performed on the initial image by using the image processing module, so that the image processing module performs image segmentation on the initial image to obtain an image segmentation image of the object to be detected, wherein the image segmentation image at least includes the object to be detected and a detection background of the object to be detected, a pixel value of a first pixel point of the object to be detected is greater than a first preset value, a pixel value of a second pixel point of the detection background is less than a second preset value, and the first preset value is greater than the second preset value; An initial contour line of the object to be detected is determined based on a coordinate position of the first pixel point on the image segmentation image; A fitting contour line fitting the initial contour line is sent to the tilt detection module, so that the tilt detection module determines a tilt angle of the object to be detected based on the fitting contour line.

2. The method of claim 1, wherein the image segmentation process is performed on the initial image by using the image processing module, so that the image processing module performs image segmentation on the initial image to obtain an image segmentation image of the object to be detected, comprising: sending the initial image to an encoding layer of the image processing module, and extracting an image feature vector of the initial image based on the encoding layer; decoding the image feature vector by a decoding layer of the image processing module to obtain the image segmentation image of the object to be detected; wherein the initial image is input to an ASPP module of the encoding layer to obtain an encoding feature vector output by the ASPP module, wherein the ASPP module at least includes a first convolutional layer, a second convolutional layer, a global average pooling layer, and a third convolutional layer; a first convolutional feature vector processed by the initial image through the first convolutional layer, the second convolutional layer, and the global average pooling layer is obtained; and a second convolutional feature vector processed by the initial image through the first convolutional layer, the second convolutional layer, the global average pooling layer, and the third convolutional layer is obtained; the image feature vector is determined according to the first convolutional feature vector and the second convolutional feature vector.

3. The method of claim 2, wherein the decoding operation of the image feature vector by the decoding layer of the image processing module to obtain the image segmentation image of the object to be detected, comprising: performing 4 times linear upsampling on the first convolutional feature vector in the decoding layer to obtain a third convolutional feature vector; performing feature fusion on the second convolutional feature vector and the third convolutional feature vector to obtain a fused feature vector; ​ input the fusion feature vector into a fourth convolutional layer to obtain a fourth convolutional feature vector output by the fourth convolutional layer; obtain a sampling feature vector obtained by performing 4 times linear up-sampling on the fourth convolutional feature vector, and generate the image segmentation map according to the sampling feature vector.

4. The method of claim 2, wherein, before the image segmentation processing of the initial image by using the image processing module is performed, the method further comprises: obtaining a training image set required when a training image segmentation model is obtained from all historical images of the to-be-detected object, wherein the image segmentation model is built-in the image processing module; training an initial segmentation model by taking a training image in the training image set as an input sample and taking a label corresponding to the training image as an output sample, to obtain the image segmentation model; wherein the training image comprises at least one of the following: an image of the to-be-detected object at different historical angles, an image of the to-be-detected object at different historical times, an image of the to-be-detected object under different illuminations, and the label indicates that the to-be-detected object is labeled in the training image.

5. The method of claim 4, wherein, after the image segmentation model is obtained, the method further comprises: obtaining a test image set required when the image segmentation model is tested from all historical images of the to-be-detected object; inputting a test image in the test image set into the image segmentation model to obtain a test label output by the image segmentation model; in a case where the first object indicated by the test label is consistent with a second object indicated by a label corresponding to the test image, if a difference between a proportion of the first object in the test image and a proportion of the second object in the test image is less than a preset value, it is determined that the image segmentation model passes the test.

6. The method of claim 1, wherein, determining an initial contour line of the to-be-detected object based on the coordinate position of the first pixel point on the image segmentation map comprises: establishing an image coordinate system of the image segmentation map with a top corner of the image segmentation map as an origin, a horizontal edge line where the top corner is located as a horizontal axis, and a vertical edge line where the top corner is located as a vertical axis; converting the first pixel point into a coordinate point in the image coordinate system to obtain a coordinate position of the first pixel point in the image coordinate system; generating the initial contour line according to all coordinate positions; wherein the fitting contour line fitted on the initial contour line is sent to the tilt detection module, so that the tilt detection module determines the tilt angle of the to-be-detected object based on the fitting contour line, comprises: obtaining the fitting contour line by linear fitting on all coordinate positions. sending the fitted contour line to the tilt detection module, so that the tilt detection module determines a linear regression fitting function corresponding to the fitted contour line; determining the tilt angle of the object to be detected according to the slope of the linear regression fitting function.

7. The method of claim 6, wherein, The tilt angle detection system further comprises an alarm module, and the method further comprises: sending the tilt angle to the alarm module, so that the alarm module compares the tilt angle with a preset angle and outputs a comparison result; in a case where it is determined that the comparison result indicates that the tilt angle is greater than the preset angle, generating an alarm information and sending the alarm information to a target object, so that the target object processes the alarm information.

8. A tilt angle detection system, characterized in that, at least comprising a processing center, an image acquisition module, an image processing module, and a tilt detection module; the processing center is configured to acquire an initial image collected by the image acquisition module from an object to be detected; the image processing module is configured to perform image segmentation processing on the initial image, so as to obtain an image segmentation image of the object to be detected, wherein the image segmentation image at least comprises the object to be detected and a detection background of the object to be detected, a first pixel point of the object to be detected has a pixel value greater than a first preset value, a second pixel point of the detection background has a pixel value less than a second preset value, the first preset value is greater than the second preset value; an initial contour line of the object to be detected is determined based on the coordinate position of the first pixel point on the image segmentation image; a fitted contour line fitted from the initial contour line is sent to the tilt detection module, so that the tilt detection module determines a tilt angle of the object to be detected based on the fitted contour line.

9. A computer readable storage medium, characterized in that, the computer readable storage medium stores a computer program, wherein the computer program is executed by a processor to implement the steps of the method in any one of claims 1 to 7.

10. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, the processor executes the computer program to implement the steps of the method in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Text detection method and device based on image processing, medium and electronic equipment

    CN110781885A

  • Image direction correction method and device and electronic equipment

    CN111104941A