Inclination angle detection method and system

Through image acquisition and processing technology, the DeepLabv3+ model is used to automatically detect the inclination angle of the telephone pole, which solves the problem of inefficient detection in the existing technology, and realizes efficient automatic detection of the inclination angle of the telephone pole, reducing labor costs.

CN119006359AActive Publication Date: 2024-11-22SHANDONG YUNHAI GUOCHUANG CLOUD COMPUTING EQUIP IND INNOVATION CENT CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the prior art, the method of detecting the inclination angle of the electric pole is inefficient and relies on manual visual inspection, resulting in high time and labor costs and lack of efficient solutions.

Method used

The image acquisition module is used to obtain the initial image, and the image segmentation is performed through the image processing module, feature vectors are extracted, the contour lines of the object to be detected are determined, and the inclination angle of the telephone pole is estimated using the fitted contour lines, and automated detection is performed in conjunction with the DeepLabv3+ model.

Benefits of technology

It realizes efficient and automated detection of the inclination angle of the telephone pole, improves detection efficiency, reduces labor costs, and ensures the accuracy and efficiency of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119006359A_ABST
    Figure CN119006359A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an inclination angle detection method and system, and the method comprises the steps: obtaining an initial image obtained through the collection of a to-be-detected object by an image collection module; performing image segmentation processing on the initial image by using an image processing module to enable the image processing module to perform image segmentation on the initial image to obtain an image segmentation image of the to-be-detected object, the image segmentation image at least comprising the to-be-detected object and a detection background of the to-be-detected object; the pixel value of a first pixel point of the to-be-detected object is greater than a first preset value, the pixel value of a second pixel point of the detection background is smaller 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 the coordinate position of the first pixel point on the image segmentation map; and sending a fitting contour line obtained by fitting the initial contour line to an 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.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of image data processing, and more specifically, to a method and system for detecting a tilt angle. Background Art

[0002] As the demand for electricity continues to increase, more utility poles need to be installed. Since utility poles are basically installed outdoors, it is inevitable that the utility poles will tilt due to the influence of the outdoor environment or accidents such as collisions. The power transmission capacity of tilted utility poles will decrease, and even cause safety hazards such as leakage. Therefore, utility poles need to be regularly maintained and inspected.

[0003] However, the current detection method is often to manually visually inspect all the poles to determine whether the poles are tilted, which not only consumes a lot of time and wastes precious human resources, but also has low detection efficiency. Therefore, in the related art, there is a technical problem of how to efficiently detect the tilt angle of the poles.

[0004] With regard to the technical problem of how to efficiently detect the inclination angle of a utility pole in the related technology, no effective solution has been proposed so far.

[0005] Therefore, it is necessary to improve the related technology to overcome the above-mentioned defects in the related technology. Summary of the invention

[0006] The embodiments of the present application provide a method and system for detecting an inclination angle, so as to at least solve the technical problem of efficiently detecting the inclination angle of a utility 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, wherein the processing center belongs to an inclination angle detection system, and the inclination angle detection system also includes an image acquisition module, an image processing module, and an inclination detection module, including: acquiring an initial image acquired by the image acquisition module for acquiring an object to be detected; 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 map of the object to be detected, wherein the image segmentation map 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; determining an initial contour line of the object to be detected based on the coordinate position of the first pixel point on the image segmentation map; and sending a fitted contour line obtained by fitting the initial contour line to the inclination detection module, so that the inclination detection module determines the inclination angle of the object to be detected based on the fitted contour line.

[0008] In an exemplary embodiment, 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 map of the object to be detected, including: 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; decoding the image feature vector through the decoding layer of the image processing module to obtain the image segmentation map of the object to be detected; wherein, 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, includes: The image is input to the atrous spatial pyramid pooling ASPP module of the coding layer to obtain the coding 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 is obtained by sequentially processing the initial image through the first convolutional layer, the second convolutional layer, and the global average pooling layer; and a second convolutional feature vector is obtained 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 the image feature vector is determined according to the first convolutional feature vector and the second convolutional feature vector.

[0009] In an exemplary embodiment, the image feature vector is decoded by the decoding layer of the image processing module to obtain an image segmentation map of the object to be detected, including: performing 4-fold linear upsampling 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 fused feature vector; inputting the fused 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-fold linear upsampling on the fourth convolution feature vector, and generating the image segmentation map according to the sampling feature vector.

[0010] In an exemplary embodiment, before using the image processing module 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 map of the object to be detected, the method also includes: acquiring a training image set required for training the image segmentation model from all historical images of the object to be detected, wherein the image segmentation model is built into the image processing module; using the training images in the training image set as input samples and the annotation results corresponding to the training images as output samples to train the initial segmentation model to obtain the image segmentation model; wherein the training images include at least one of the following: images of the object to be detected at different historical angles, images of the object to be detected at different historical times, and images of the image to be detected under different lighting, and the annotation results indicate that the object to be detected is annotated in the training images.

[0011] In an exemplary embodiment, after obtaining the image segmentation model, the method further includes: obtaining a test image set required for testing the image segmentation model from all historical images of the object to be detected; inputting the test images of the test image set into the image segmentation model to obtain a test marking result output by the image segmentation model; and when it is determined that the first object indicated by the test marking result is consistent with the second object indicated by the annotation result corresponding to the test image, if it is determined that the difference between the proportion of the first object in the test image and the proportion of the second object in the test image is less than a preset value, then determining that the image segmentation model has passed the test.

[0012] In an exemplary embodiment, 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, including: establishing an image coordinate system of the image segmentation map with the image vertex of the image segmentation map as the origin, the horizontal edge line where the image vertex is located as the horizontal axis, and the vertical edge line where the image vertex 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, sending the fitted contour line that is fitted to the initial contour line to the tilt detection module so that the tilt detection module determines the tilt angle of the object to be detected based on the fitted contour line, includes: obtaining the fitted contour line by linearly fitting all the coordinate positions; sending the fitted contour line to the tilt detection module so that the tilt detection module determines the linear regression fitting function corresponding to the fitted contour line; and determining the tilt angle of the object to be detected according to the slope of the linear regression fitting function.

[0013] In an exemplary embodiment, the tilt angle detection system also includes an alarm module, and the method also includes: 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; when it is determined that the comparison result is used to indicate that the tilt angle is greater than the preset angle, generating an alarm message, and sending the alarm message to the target object so that the target object processes the alarm message.

[0014] According to another embodiment of the present application, a tilt angle detection system is provided, which at least includes a processing center, an image acquisition module, an image processing module, and a tilt detection module; the processing center is used to obtain an initial image acquired by the image acquisition module for acquiring an object to be detected; 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 map of the object to be detected, wherein the image segmentation map at least includes the object to be detected and a detection background of the object to be detected, the pixel value of a first pixel point of the object to be detected is greater than a first preset value, the 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; 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; and the fitted 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 fitted contour line.

[0015] According to another embodiment of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when run.

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

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

[0018] According to the present application, a detection system for the tilt angle including a processing center, an image acquisition module, an image processing module, and a tilt detection module is provided. The processing center obtains an initial image acquired by the image acquisition module for acquiring the object to be detected, and then 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 map of the object to be detected, wherein the image segmentation map at least includes the object to be detected and a 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, and the first preset value is greater than the second preset value, and 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, and then the fitted contour line that is 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 fitted contour line. That is, the image segmentation technology processes the initial image of the utility pole (i.e., the object to be detected) to obtain an image segmentation map, and the utility pole is fitted at the pixel points of the image segmentation map to obtain the fitting contour line of the utility pole. The fitting contour line is used to estimate the angle between the utility pole and the horizontal or vertical direction to determine whether the utility pole is tilted, thereby solving the technical problem of efficiently detecting the tilt angle of the utility pole, automatically detecting the utility pole, improving detection efficiency, and reducing labor costs. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0020] Figure 2 is a flow chart of a method for detecting an inclination angle according to an embodiment of the present application;

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

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

[0023] Figure 5 is a schematic diagram of an image segmentation diagram of an inclined utility pole according to an embodiment of the present application;

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

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

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

[0027] Fig. 9 is a schematic diagram of a fitted contour line of a vertical utility pole according to an embodiment of the present application;

[0028] Fig.10 is a schematic diagram of a tilt angle detection process according to an embodiment of the present application;

[0029] Fig.11 It is a structural schematic diagram of a tilt angle detection system according to an embodiment of the present application. DETAILED DESCRIPTION

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

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

[0032] The method embodiments provided in the embodiments of the present application can be executed in a server device or a similar computing device. Taking running on a server device as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a server device of a tilt angle detection method according to an embodiment of the present application. Figure 1 As shown, the server device may include one or more ( Figure 1 Only one is shown in the figure) processor 102 (processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the server device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above server device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

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

[0034] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the server device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as 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 wirelessly.

[0035] In this 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 also includes an image acquisition module, an image processing module, and a tilt detection module. Figure 2 As shown, the tilt angle detection process specifically includes the following steps:

[0036] Step S202, obtaining an initial image acquired by the image acquisition module from the object to be detected;

[0037] The image acquisition module corresponds to an acquisition area, and the object to be detected and the environmental background of the image to be detected can be acquired in the acquisition area. The object to be detected is, for example, a telephone pole.

[0038] Step S204, using the image processing module 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 map of the object to be detected, wherein the image segmentation map at least includes the object to be detected and a detection background of the object to be detected, the pixel value of a first pixel point of the object to be detected is greater than a first preset value, the 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;

[0039] Step S206, determining an initial contour line of the object to be detected based on the coordinate position of the first pixel point on the image segmentation map;

[0040] Step S208: sending a fitted contour line obtained by fitting the initial contour line to the tilt detection module, so that the tilt detection module determines the tilt angle of the object to be detected based on the fitted contour line.

[0041] Based on a tilt angle detection system including a processing center, an image acquisition module, an image processing module, and a tilt detection module, an initial image acquired by the image acquisition module for acquiring an object to be detected is acquired through the processing center, and then 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 map of the object to be detected, wherein the image segmentation map 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, then 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 map, and then a fitted contour line that is 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 fitted contour line. That is, the image segmentation technology processes the initial image of the utility pole (i.e., the object to be detected) to obtain an image segmentation map, and the utility pole is fitted at the pixel points of the image segmentation map to obtain the fitting contour line of the utility pole. The fitting contour line is used to estimate the angle between the utility pole and the horizontal or vertical direction to determine whether the utility pole is tilted, thereby solving the technical problem of efficiently detecting the tilt angle of the utility pole, automatically detecting the utility pole, improving detection efficiency, and reducing labor costs.

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

[0043] In an exemplary embodiment, the image processing module is further 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 the image segmentation map of the object to be detected by the following steps: 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; decoding the image feature vector through the decoding layer of the image processing module to obtain the image segmentation map of the object to be detected; wherein, 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, includes: The initial image is input to the atrous spatial pyramid pooling ASPP module of the coding layer to obtain the coding feature vector output by the ASPP module, wherein the ASPP module includes at least a first convolutional layer, a second convolutional layer, a global average pooling layer, and a third convolutional layer; a first convolutional feature vector is obtained by sequentially processing the initial image through the first convolutional layer, the second convolutional layer, and the global average pooling layer; and a second convolutional feature vector is obtained 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; the image feature vector is determined according to the first convolutional feature vector and the second convolutional feature vector. In this embodiment, by performing image segmentation on the initial image, it is convenient to subsequently identify objects in the image, thereby improving the efficiency of image data processing.

[0044] In an exemplary embodiment, for the step of decoding the image feature vector through the decoding layer of the image processing module to obtain the image segmentation map of the object to be detected, the following implementation process is further proposed: the first convolution feature vector is linearly upsampled 4 times in the decoding layer to obtain a third convolution feature vector; the second convolution feature vector and the third convolution feature vector are feature fused to obtain a fused feature vector; the fused feature vector is input to the fourth convolution layer to obtain a fourth convolution feature vector output by the fourth convolution layer; the sampling feature vector obtained by linearly upsampling the fourth convolution feature vector 4 times is obtained, and the image segmentation map is generated according to the sampling feature vector. This embodiment improves the accuracy of the image segmentation map by combining the sampling results of different convolution layers.

[0045] In an exemplary embodiment, before 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 the image segmentation map of the object to be detected, further, a training image set required for training the image segmentation model is obtained from all historical images of the object to be detected, wherein the image segmentation model is built into the image processing module; the initial segmentation model is trained using the training images in the training image set as input samples and the annotation results corresponding to the training images as output samples to obtain the image segmentation model; wherein the training images include at least one of the following: images of the object to be detected at different historical angles, images of the object to be detected at different historical times, images of the image to be detected under different illuminations, and the annotation results indicate that the object to be detected is annotated in the training images. This embodiment uses a variety of images for training, enriches the training set of the model, and improves the accuracy of the model.

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

[0047] In an exemplary embodiment, a technical solution is proposed for 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 map, specifically comprising: establishing an image coordinate system of the image segmentation map with the image vertex of the image segmentation map as the origin, the horizontal edge line where the image vertex is located as the horizontal axis, and the vertical edge line where the image vertex 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, sending the fitted contour line fitted to the initial contour line to the tilt detection module so that the tilt detection module determines the tilt angle of the object to be detected based on the fitted contour line, comprises: obtaining the fitted contour line by linearly fitting all the coordinate positions; sending the fitted contour line to the tilt detection module so that the tilt detection module determines the linear regression fitting function corresponding to the fitted contour line; and determining the tilt angle of the object to be detected according to the slope of the linear regression fitting function.

[0048] The top corner of the image is, for example, the upper left corner, but is not limited thereto.

[0049] The process of performing linear fitting on all the coordinate positions is to fit the initial contour line.

[0050] In an exemplary embodiment, the tilt angle detection system also includes an alarm module, and further, the tilt angle is sent to the alarm module so that the alarm module compares the tilt angle with a preset angle and outputs a comparison result; when it is determined that the comparison result is used to indicate that the tilt angle is greater than the preset angle, an alarm message is generated and the alarm message is sent to the target object so that the target object processes the alarm message.

[0051] Optionally, when it is determined that the comparison result is used to indicate that the tilt angle is less than or equal to the preset angle, there is no need to generate an alarm message.

[0052] The target object may represent a maintenance person, or a processor with a pre-installed processing program.

[0053] Furthermore, in one embodiment, the detection process of the tilt angle is described in combination with the following steps:

[0054] Step 1: Data collection and preparation.

[0055] Specifically, images containing tilted and normal standing utility poles can be obtained from different angles, different times, and different lighting conditions, and then an image dataset can be obtained. In order to train the model, the utility poles in each image must be accurately labeled. This means that for each pixel in the image, it is necessary to specify whether it belongs to a utility pole.

[0056] The data set is divided into a training set (equivalent to the training image set above) and a test set (equivalent to the test image set above). It is necessary to ensure that the different samples in the training set are relatively uniform, the ratio of tilted poles to non-tilted poles is about 1:1, and the total number is not less than 2,000. That is, the ratio of different samples can be pre-set in the training set. This ratio is not fixed and can be adjusted according to actual needs.

[0057] Among them, the inclined poles refer to Figure 4 As shown. The non-tilted electric pole (i.e. vertical electric pole) refers to Figure 6 shown.

[0058] Step 2: Select an image segmentation model. Taking DeepLab as an example, since each version has different performance and complexity, you can select a version from DeepLabv1, DeepLabv2, DeepLabv3, DeepLabv3+, etc. according to specific needs. This paper selects DeepLabv3+. The architecture of DeepLabv3+ is as follows: Figure 3 shown.

[0059] It should be noted that DeepLab is an image segmentation model based on deep learning, which uses a convolutional neural network (CNN) structure to achieve high-precision semantic segmentation. One of the key innovations of DeepLab is the introduction of Atrous convolution (also known as hole convolution or dilated convolution), which is used to maintain computational efficiency while expanding the receptive field. By increasing the dilation rate in the convolution layer, DeepLab is able to process contextual information of different scales, thereby better capturing the semantic information around the target. In addition, DeepLab also combines post-processing methods such as conditional random fields (CRF) to better eliminate boundary blur and detail errors. Subsequent versions of DeepLab have also introduced other improvements, such as DeeplabV2 and DeeplabV3. In DeeplabV3, a deeper network structure and a more complex feature processing mechanism are used to further improve the 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 low-level features are utilized through skip connections. DeepLab is mainly used for pixel-level semantic segmentation. It provides category predictions for each pixel, and can draw bounding boxes or other forms of visualization as needed to highlight the location of the target.

[0060] The DeepLabv3+ model uses 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 recognize images more accurately. At the same time, DeepLabv3+ has demonstrated excellent segmentation accuracy on multiple standard datasets, especially in dealing with complex scenes and edge details. Due to its advanced features, DeepLabv3+ performs well for a variety of image segmentation tasks and has strong generalization capabilities. In addition, the ASPP module enables the DeepLabv3+ model to effectively handle objects of different sizes, which is especially important for image segmentation tasks.

[0061] Step 3: Model training.

[0062] For example, based on the open source deep learning platform PaddlePaddle and the DeepLabv3+ model embedded in the paddleSeg module, an engineering training model is quickly established. For the specific training process, please refer to the guidance of PaddlePaddle.

[0063] The return value of the DeepLabv3+ model is a segmentation map. The size of this segmentation map is the same as the input image (or it may be scaled depending on the implementation). The value of each pixel indicates which category the pixel belongs to. The pixels here only contain two categories, "telephone pole" (i.e. the object to be detected) and "background" (i.e. the detection background).

[0064] Step 4: Result verification. The trained model needs to be able to clearly segment the pixels of the two categories of poles and background, such as Figure 5 or Figure 7 As shown, the white part is the identified electric pole and the black part is the background image.

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

[0066] Step 5: Use statistical machine learning to find the regression function of white pixels and calculate the tilt angle. Figure 8 As shown, the specific implementation process is as follows:

[0067] S801, establishing a coordinate system using the image.

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

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

[0070] S804, obtaining a linear regression equation.

[0071] S805, calculating the angle using the slope.

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

[0073] Among them, linear regression is a supervised learning method that 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 residual sum of squares.

[0074] Step 6: Set the tilt threshold. If the tilt angle is greater than the threshold, the recognition system generates an alarm message and feeds it back to the relevant department for emergency processing. If the tilt angle is less than the threshold, it is considered that the recognition has passed and no measures need to be taken.

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

[0076] Step S1, collecting pictures of electric poles.

[0077] Step S2: preprocess the data.

[0078] Step S3: image annotation.

[0079] Step S4, perform DeepLabv3 model training.

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

[0081] Step S6, adding pictures with poor effects.

[0082] Step S7: regression analysis.

[0083] Step S8, calculating the tilt angle.

[0084] Step S9: Is it greater than a threshold value? If yes, go to step S10; if not, go to step S13.

[0085] Step S10: system alarm.

[0086] Step S11, report to relevant departments.

[0087] Step S12, emergency processing.

[0088] Step S13, recognition passed.

[0089] Through the above steps, we can automatically detect whether the electric pole is tilted based on artificial intelligence. In this process, the DeepLabv3 image segmentation model is used to detect the specific position of the electric pole in the picture. After that, a rectangular coordinate system is established with the detected picture, and a linear regression function is fitted according to the position information of the pixel points of the electric pole in the image. This function can be used to calculate the angle between the electric pole and the horizontal line, thereby calculating the tilt angle of the electric pole.

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

[0091] In this embodiment, a tilt angle detection system is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0092] Fig.11 is a schematic diagram of the structure of the tilt angle detection system according to an embodiment of the present application, such as Fig.11 As shown, 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 used to: obtain the initial image collected by the image acquisition module for collecting the object to be detected; use the image processing module 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 map of the object to be detected, wherein 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, and the first preset value is greater than the second preset value; 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; and send the fitted contour line that is fitted to the initial contour line to the tilt detection module, so that the tilt detection module determines the tilt angle of the object to be detected based on the fitted contour line.

[0094] Through the above tilt angle detection system including a processing center, an image acquisition module, an image processing module, and a tilt detection module, the processing center obtains the initial image collected by the image acquisition module for collecting the object to be detected, and then uses the image processing module 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 map of the object to be detected, wherein 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, and the first preset value is greater than the second preset value, then based on the coordinate position of the first pixel point on the image segmentation map, the initial contour line of the object to be detected is determined, and then the fitted contour line that is 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 fitted contour line. That is, the image segmentation technology processes the initial image of the utility pole (i.e., the object to be detected) to obtain an image segmentation map, and the utility pole is fitted at the pixel points of the image segmentation map to obtain the fitting contour line of the utility pole. The fitting contour line is used to estimate the angle between the utility pole and the horizontal or vertical direction to determine whether the utility pole is tilted, thereby solving the technical problem of efficiently detecting the tilt angle of the utility pole, automatically detecting the utility pole, improving detection efficiency, and reducing labor costs.

[0095] In an exemplary embodiment, the processing center is also used to: send the initial image to the encoding layer of the image processing module, extract the image feature vector of the initial image based on the encoding layer; perform a decoding operation on the image feature vector through the decoding layer of the image processing module to obtain the image segmentation map of the object to be detected; wherein, 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 includes: inputting the initial image to the hole space pyramid pooling ASPP module of the encoding layer to obtain the encoding feature vector output by the ASPP module, wherein the ASPP module includes at least a first convolutional layer, a second convolutional layer, a global average pooling layer, and a third convolutional layer; obtaining a first convolutional feature vector of the initial image processed by the first convolutional layer, the second convolutional layer, and the global average pooling layer in sequence; and obtaining a second convolutional feature vector of the initial image processed by the first convolutional layer, the second convolutional layer, the global average pooling layer, and the third convolutional layer in sequence; and determining the image feature vector according to the first convolutional feature vector and the second convolutional feature vector.

[0096] In an exemplary embodiment, the processing center is also used to: perform 4-fold linear upsampling on the first convolution feature vector in the decoding layer to obtain a third convolution feature vector; perform feature fusion on the second convolution feature vector and the third convolution feature vector to obtain a fused feature vector; input the fused feature vector to a fourth convolution layer to obtain a fourth convolution feature vector output by the fourth convolution layer; obtain a sampling feature vector obtained by performing 4-fold linear upsampling on the fourth convolution feature vector, and generate the image segmentation map based on the sampling feature vector.

[0097] In an exemplary embodiment, the processing center is also used to: obtain a training image set required for training the image segmentation model from all historical images of the object to be detected, wherein the image segmentation model is built into the image processing module; use the training images in the training image set as input samples, and use the annotation results corresponding to the training images as output samples to train the initial segmentation model to obtain the image segmentation model; wherein the training images include at least one of the following: images of the object to be detected at different historical angles, images of the object to be detected at different historical times, and images of the image to be detected under different lighting, and the annotation results indicate that the object to be detected is annotated in the training images.

[0098] In an exemplary embodiment, the processing center is also used to: obtain a test image set required for testing the image segmentation model from all historical images of the object to be detected; input the test images of the test image set into the image segmentation model to obtain a test marking result output by the image segmentation model; and when it is determined that the first object indicated by the test marking result is consistent with the second object indicated by the annotation result corresponding to the test image, if it is determined that the difference between the proportion of the first object in the test image and the proportion of the second object in the test image is less than a preset value, then it is determined that the image segmentation model has passed the test.

[0099] In an exemplary embodiment, the processing center is also used to: establish an image coordinate system of the image segmentation map with the image vertex of the image segmentation map as the origin, the horizontal edge line where the image vertex is located as the horizontal axis, and the vertical edge line where the image vertex is located as the vertical axis; convert 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; generate the initial contour line according to all coordinate positions; wherein, sending the fitted contour line that is fitted to the initial contour line to the tilt detection module so that the tilt detection module determines the tilt angle of the object to be detected based on the fitted contour line, includes: obtaining the fitted contour line by linearly fitting all the coordinate positions; sending the fitted contour line to the tilt detection module so that the tilt detection module determines the linear regression fitting function corresponding to the fitted contour line; and determining the tilt angle of the object to be detected according to the slope of the linear regression fitting function.

[0100] In an exemplary embodiment, the tilt angle detection system also includes an alarm module, and the processing center is also used 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; when it is determined that the comparison result is used to indicate that the tilt angle is greater than the preset angle, generate an alarm message, and send the alarm message to the target object so that the target object processes the alarm message.

[0101] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0102] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.

[0103] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0104] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0105] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0106] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any one of the above method embodiments are implemented.

[0107] An embodiment of the present application further provides another computer program product, including a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in any of the above method embodiments are implemented.

[0108] An embodiment of the present application also provides a computer program, which includes computer instructions, which are 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, so that the computer device performs the steps in any one of the above method embodiments.

[0109] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

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

[0111] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for detecting an inclination angle, characterized in that: Applied to a processing center, the processing center belongs to a tilt angle detection system, the tilt angle detection system also includes an image acquisition module, an image processing module, and a tilt detection module, including: Acquire an initial image acquired by the image acquisition module from the object to be detected; Using the image processing module 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 map of the object to be detected, wherein the image segmentation map at least includes the object to be detected and a detection background of the object to be detected, the pixel value of a first pixel point of the object to be detected is greater than a first preset value, the 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 object to be detected based on the coordinate position of the first pixel point on the image segmentation map; A fitted contour line obtained by 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 fitted contour line.

2. The method according to claim 1, characterized in that The using the image processing module 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 map of the object to be detected includes: Sending the initial image to the coding layer of the image processing module, and extracting the image feature vector of the initial image based on the coding layer; The image feature vector is decoded by the decoding layer of the image processing module to obtain the image segmentation image 2 of the object to be detected. The sending of the initial image to the coding layer of the image processing module and extracting the image feature vector of the initial image based on the coding layer includes: Inputting the initial image into the atrous spatial pyramid pooling ASPP module of the coding layer to obtain a coding 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 convolution feature vector obtained by sequentially processing the initial image through the first convolution layer, the second convolution layer, and the global average pooling layer; and obtaining a second convolution feature vector obtained by sequentially processing the initial image through the first convolution layer, the second convolution layer, the global average pooling layer and the third convolution layer; The image feature vector is determined according to the first convolution feature vector and the second convolution feature vector.

3. The method according to claim 2, characterized in that The image feature vector is decoded by the decoding layer of the image processing module to obtain an image segmentation map of the object to be detected, including: Performing 4-fold linear upsampling 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 fused feature vector; Inputting the fused feature vector into a fourth convolutional layer to obtain a fourth convolutional feature vector output by the fourth convolutional layer; A sampling feature vector obtained by performing 4-fold linear upsampling on the fourth convolution feature vector is obtained, and the image segmentation map is generated according to the sampling feature vector.

4. The method according to claim 2, characterized in that: Before using the image processing module to perform 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 map of the object to be detected, the method further includes: Acquire a training image set required for training an image segmentation model from all historical images of the object to be detected, wherein the image segmentation model is built into the image processing module; Using the training images in the training image set as input samples and the annotation results corresponding to the training images as output samples to train the initial segmentation model, so as to obtain the image segmentation model; The training image includes at least one of the following: images of the object to be detected at different historical angles, images of the object to be detected at different historical times, and images of the object to be detected under different lighting conditions. The annotation result indicates that the object to be detected is annotated in the training image.

5. The method according to claim 4, characterized in that After obtaining the image segmentation model, the method further includes: Acquire a test image set required for testing the image segmentation model from all historical images of the object to be detected; Inputting the test image of the test image set into the image segmentation model to obtain the test labeling result output by the image segmentation model; When it is determined that the first object indicated by the test marking result is consistent with the second object indicated by the annotation result corresponding to the test image, if it is determined that the difference between the proportion of the first object in the test image and the proportion of the second object in the test image is less than a preset value, it is determined that the image segmentation model has passed the test.

6. The method according to claim 1, characterized in that Determining an initial contour line of the object to be detected based on the coordinate position of the first pixel point on the image segmentation map includes: An image coordinate system of the image segmentation map is established by taking the image vertex of the image segmentation map as the origin, the horizontal edge line where the image vertex is located as the horizontal axis, and the vertical edge line where the image vertex is located as the 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; Generate the initial contour line according to all coordinate positions; The step of sending the fitted contour line obtained by fitting the initial contour line to the tilt detection module so that the tilt detection module determines the tilt angle of the object to be detected based on the fitted contour line includes: By performing linear fitting on all the coordinate positions, the fitting contour line is obtained; 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; The tilt angle of the object to be detected is determined according to the slope of the linear regression fitting function.

7. The method according to claim 6, characterized in that The tilt angle detection system further includes an alarm module, and the method further includes: 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 the case where it is determined that the comparison result indicates that the tilt angle is greater than the preset angle, an alarm message is generated and the alarm message is sent to the target object so that the target object processes the alarm message.

8. A tilt angle detection system, characterized in that: At least includes a processing center, an image acquisition module, an image processing module, and a tilt detection module; The processing center is used to obtain the initial image collected by the image acquisition module on the object to be detected; Use the image processing module 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 map of the object to be detected, wherein the image segmentation map at least includes the object to be detected and a detection background of the object to be detected, the pixel value of a first pixel point of the object to be detected is greater than a first preset value, the 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 object to be detected based on the coordinate position of the first pixel point on the image segmentation map; and send a fitted contour line that is fitted to the initial contour line to the tilt detection module, so that the tilt detection module determines the 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 implements the steps of the method described in any one of claims 1 to 7 when executed by a processor.

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: When the processor executes the computer program, the steps of the method described in any one of claims 1 to 7 are implemented.

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

  • Tower inclination detection method and device, electronic equipment and medium

    CN114898221A

  • Pointer type instrument reading method and system

    CN116543376A

  • Method, apparatus, and device for recognizing seal text, and computer readable storage medium

    WO2022198969A1