A method for detecting and identifying power tower signs based on CS-ABCNet
By using the CS-ABCNet network model, combined with the Sobel operator and the convolutional attention module CBAM, the problem of accuracy and speed in detecting tower signs in images of power transmission towers captured by UAVs was solved, achieving efficient and accurate tower sign recognition.
Patent Information
- Application Number
- CN202310020106.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-06
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2043-01-06
AI Technical Summary
Existing technologies struggle to accurately identify tower locations when using drones to capture images of power transmission towers, resulting in high costs, slow computation speeds, and poor detection accuracy.
The CS-ABCNet network model is adopted, combined with the Sobel operator for image preprocessing, and the lightweight convolutional neural network ReXNet is used for feature extraction. In the detection stage, the convolutional attention module CBAM is introduced to optimize the network structure and improve the accuracy of pagoda detection and recognition.
It enables efficient and accurate detection and identification of power tower signs, reduces model size, and improves identification accuracy and performance.
Smart Images

Figure CN116052149B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer vision and image detection, specifically a method for detecting and recognizing power tower signs based on CS-ABCNet. Background Technology
[0002] Power transmission towers are essential supporting structures for laying power transmission lines, crucial nodes in the power grid, and the most widely used and important commercial assets in the power utility sector. Furthermore, vital power facilities are built around these towers. Therefore, regular inspections of the towers' stability are often only conducted during severe grid faults. Traditional manual inspections cannot accurately assess the condition of power lines, which seriously affects grid stability. With the widespread use of drones, using them to photograph transmission towers and lines, and employing deep learning algorithms for automated inspection, has become a new and important method for power grid inspection.
[0003] Images taken by drones are difficult to pinpoint the exact location of faulty transmission towers on the photographed lines. Currently, RFID-based electronic tags and QR code-based automatic identification technologies have been applied to automatic power line inspections, but both methods require modifications to existing equipment, which increases costs. Huang Xiaowei et al. (Huang Xiaowei, Wu Jianer, Ni Xiaolu, Zhou Mingquan, Meng Qingming, Chen Jingyi. Research on Automatic Identification Method of Power Line Tower Signs Based on Machine Vision [J]. Science and Technology Innovation and Application, 2018(03):84-85.) Considering that power line towers all have signs, the unique number in the transmission tower sign is used for positioning. Traditional image processing techniques are used for image segmentation and character extraction, and then a standard character library is used for comparison to identify optical characters, thereby obtaining the location information of the transmission tower. However, traditional image processing techniques have the characteristics of poor text detection accuracy and poor versatility in natural scenes. The images of power towers taken by drones have diverse backgrounds and are affected by seasonal changes, making it difficult to accurately detect and identify signs under different backgrounds.
[0004] All three methods mentioned above can pinpoint the exact location of power transmission towers, but they suffer from problems such as high operating costs, slow calculation speed, and poor detection and identification accuracy. Summary of the Invention
[0005] The purpose of this invention is to solve the above-mentioned problems. Taking into account factors such as computational and memory costs, lightweight network, and recognition accuracy, this invention proposes a power tower sign detection and recognition method based on CS-ABCNet, using ABCNet as the base network and making improvements. This method performs image preprocessing on the tower sign features, optimizes the network structure, uses a lightweight convolutional neural network to obtain feature maps, and introduces a CBAM attention module into the detection head, resulting in better recognition accuracy and performance for the tower signs.
[0006] The technical solution to achieve the objective of this invention is:
[0007] A method for detecting and identifying power tower signs based on CS-ABCNet includes the following steps:
[0008] Step 1: Collect the data set of power transmission tower identification signs, and divide the data set into training and test sets in an 8:2 ratio;
[0009] Step 2: Use the Sobel operator to preprocess the dataset, calculating the edge information of objects in the image in both horizontal and vertical directions. Based on the characteristics of the pagoda sign having a bright background color, mostly rectangular shapes, a clear difference from the background image, and drastic changes in grayscale values at the edges, the Sobel operator is used to determine the edge information of the pagoda sign and the text on it, while reducing unnecessary edge information in the background. The Sobel operator is used to convolve the input image pixels, calculate the horizontal and vertical gradient values, and then perform a thresholding operation on the grayscale values of the generated new pixels to determine the edge information.
[0010] Step 3: ReXNet is used for feature extraction on the ABCNet backbone to achieve a lightweight network model and overcome the representational bottleneck problem in the original model. A convolutional attention module (CBAM) is introduced during the detection phase to increase the weight of target information from both channel and spatial dimensions of the feature map, resulting in the CS-ABCNet network model. The image obtained in Step 2 is fed into the CS-ABCNet model. Through feature extraction and feature fusion, the image is fed into the detection branch for detection. The detected text regions are then corrected. Finally, the corrected feature map is fed into the recognition branch for text recognition. The recognition results are compared with the labeled results in the dataset, and the loss function is calculated. The CS-ABCNet network model is trained using the backpropagation algorithm. The parameters of the CS-ABCNet network model are packaged into a weight file. The image of the pagoda sign is input into the model, and the text information of the pagoda sign in the image is output using the obtained weight file.
[0011] The process of collecting the data set of power transmission tower identification signs in step 1 is as follows:
[0012] Drones were used to capture images of power transmission towers with high-definition cameras. The original images were then mirrored, vertically flipped, and rotated 45° counterclockwise. Four images were randomly selected, scaled, and then randomly distributed and stitched together. Some areas of the samples were randomly removed, and image data enhancement was performed by filling with zero-pixel values. This process was used to construct a dataset. The data annotation tool LabelImg was then used to annotate all images, marking the text regions and text content in the images.
[0013] Step 2 uses the Sobel operator to preprocess the dataset, calculating the edge information of objects in the image from both the horizontal and vertical directions:
[0014] Convolve the image pixels to calculate the horizontal and vertical gradient values, and then perform a threshold operation on the generated new pixel gray values to determine the edge information. The horizontal and vertical gray values of each pixel in the image are combined using formula (2) to calculate the gray value. To improve efficiency, an approximation without taking the square root is used, and formula (1) is used for calculation:
[0015] and (1),
[0016] Where Gx and Gy represent the grayscale values of the image after horizontal and vertical edge detection, respectively, and A is the input image;
[0017] Formula (2) calculates the gradient direction:
[0018] (2),
[0019] Where G represents the horizontal and vertical grayscale values of each pixel in the image;
[0020] The resulting image with edge information is stitched into the original image, i.e., the number of channels is 4, and each image is h×w×4.
[0021] The process of using ReXNet to extract features in the ABCNet Backbone in step 3 is as follows:
[0022] The first CONV standard convolutional layer of the network model is replaced with a combination of Depthwise (DW) and Pointwise (PW) convolutions to reduce the model size; the parameter complexity is 1 / k of the original model. 2 The parameter complexity is calculated as shown in formula (3):
[0023] (3),
[0024] Where Depth-wise Separable CONV represents Depthwise (DW) convolution, and Standard CONV represents standard convolution.
[0025] At the same time, the activation function of the convolutional neural network is changed to ReLU, and the Swish function is used as the activation function, as shown in formula (4):
[0026] (4),
[0027] Where β is a trainable parameter, when β=0, the Swish activation function becomes a linear function f(x)=x / 2, and when β=∞, the Swish activation function becomes 0 or x.
[0028] The obtained feature maps are fused using a classic FPN network, performing top-down and lateral connections: the top-down process upsamples the small feature maps at the top level to the features of the previous stage. Figure 1 The size of the sample is such that it can utilize the strong semantic features of the top layer, which is beneficial for classification, and the high-resolution information of the bottom layer, which is more beneficial for localization. The upsampling method is implemented by the nearest neighbor difference. In order to combine the high-level semantic features and the accurate localization capability of the bottom layer, a lateral connection structure similar to the residual network is adopted. The lateral connection fuses the features of the previous layer after upsampling with the current layer with the same resolution by adding them together.
[0029] The feature maps after feature fusion are fed into the detection branch for classification. The input is the P3, P4, P5, P6, and P7 feature maps generated by FPN, which are then fed into the subsequent detection head. Each head contains 3 branches:
[0030] The classification branch predicts the category. In the diagram, C represents the number of categories, which is equivalent to C binary classifications.
[0031] The regression branch represents the regression position as l, t, r, b, which is the distance from the predicted anchor point to the four boundaries of the detection box (up, down, left, and right).
[0032] center-ness: Centrality, one anchor point corresponds to one centrality, used to determine the centrality of the anchor point relative to the detection box. The process in step 3 of sending the corrected feature map into the recognition branch for text recognition is as follows:
[0033] In the detection sub-network head, both the classification and regression branches first undergo feature enhancement through four convolutional layers. A CBAM attention module is added to the convolutions of these two branches, increasing the weights differently depending on the task. The resulting feature maps P3, P4, P5, P6, and P7 are then fed into the recognition branch, with an input size of h×w×256. During the convolution process, the CBAM attention module is introduced, and the feature maps enter the CBAM's CAM module, where max pooling generates feature maps containing unique target features. A feature map containing global information is obtained through average pooling. These features are then fed into a multilayer perceptron (MLP) neural network for processing, and the resulting two new feature maps are subjected to addition and activation function processing to obtain the channel attention feature maps. As shown in formula (5):
[0034] (5),
[0035] AvgPool and MaxPool represent average pooling and max pooling, respectively; W0 and W1 are the weights of the MLP, with W0 followed by the ReLU activation function; σ is the Sigmoid activation function.
[0036] Combine feature map F with Pixel-level multiplication yields As shown in formula (6):
[0037] (6),
[0038] Feature map As input to SAM, after undergoing average pooling and max pooling operations respectively, two different feature descriptions are obtained. , These features are concatenated to highlight the target region. A 7×7 convolution reduces the number of channels to 1. After passing through a sigmoid function, the spatial attention feature map is obtained. As shown in formula (7):
[0039] (7),
[0040] feature map and Pixel-level multiplication yields As shown in formula (8):
[0041] (8),
[0042] The classification branch includes both a category prediction branch for positive and negative sample anchors and a center-ness branch for judging the centrality of positive and negative sample anchors, which is used to enhance the detection results. The regression branch is used to regress the distance from the positive sample anchor to the four boundaries of the detection box (top, bottom, left, and right). Since the Head has a total of three output branches: Classification, Regression, and Center-ness, the calculated loss function is the sum of the loss functions of the three branches.
[0043] After the detection branch detects the text region, the text region is corrected using the BezierAlign layer. Given an input feature map and Bezier curve control points, all input pixel values of the rectangular input feature map are processed simultaneously. The size of the feature map is hout×wout, and the coordinates of pixel gi are (giw,gih). The calculation is performed using formula (9):
[0044] (9),
[0045] Then, the upper boundary point t of the text region is calculated using t and formula (10). p and lower boundary b p ,
[0046] (10)
[0047] Use t p and b p The sampling point op can be retrieved using formula (11):
[0048] (11),
[0049] The text recognition stage employs a lightweight network model, using a 4-layer convolutional network and a BLSTM layer. The corrected text region is fed into the recognition model for encoding, and its decoding uses a lightweight attention mechanism to output the recognition result.
[0050] This technical solution has the following beneficial effects:
[0051] 1. The CS-ABCNet model in this technical solution can accurately detect and identify power transmission tower identification signs;
[0052] 2. The method of this technical solution uses the Sobel computer to preprocess the input image, which can effectively find the edges of the pagoda and the edges of the text within it, while ignoring the edges of small objects in the background, thus improving the detection and recognition accuracy.
[0053] 3. This technical solution uses ReXNet convolutional neural network for feature extraction, which effectively reduces the model size and improves model performance compared to the original model.
[0054] 4. This technical solution uses a CBAM module embedded in the detection branch to improve the score of transmission tower identification signs through an attention mechanism, thereby increasing the detection accuracy.
[0055] This method can preprocess the image features of the pagoda, optimize the network structure, use a lightweight convolutional neural network to obtain feature maps, and introduce a CBAM attention module into the detection head, thereby improving the recognition accuracy and performance of the pagoda. Attached Figure Description
[0056] Figure 1 This is a flowchart of an embodiment;
[0057] Figure 2 This is a schematic diagram of the network structure of CS-ABCNet in the embodiment;
[0058] Figure 3 This is a schematic diagram of the CBAM structure in the embodiment. Detailed Implementation
[0059] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments, but this is not intended to limit the scope of the invention.
[0060] Example:
[0061] Reference Figure 1 A method for detecting and identifying power tower signs based on CS-ABCNet includes the following steps:
[0062] Step 1: Collect the data set of power transmission tower identification signs, and divide the data set into training and test sets in an 8:2 ratio;
[0063] Step 2: Use the Sobel operator to preprocess the dataset, calculating the edge information of objects in the image in both horizontal and vertical directions. Based on the characteristics of the pagoda sign having a bright background color, mostly rectangular shapes, a clear difference from the background image, and drastic changes in grayscale values at the edges, the Sobel operator is used to determine the edge information of the pagoda sign and the text on it, while reducing unnecessary edge information in the background. The Sobel operator is used to convolve the input image pixels, calculate the horizontal and vertical gradient values, and then perform a thresholding operation on the grayscale values of the generated new pixels to determine the edge information.
[0064] Step 3: ReXNet-50 is used for feature extraction on the backbone of ABCNet to achieve a lightweight network model and overcome the representational bottleneck problem in the original model. Furthermore, a convolutional attention module (CBAM) is introduced during the detection stage to increase the weight of target information from both the channel and spatial dimensions of the feature map, resulting in the CS-ABCNet network model. The CS-ABCNet network model diagram is shown below. Figure 2 As shown, the image obtained in step 2 is fed into the CS-ABCNet model. Through feature extraction and feature fusion, the image is fed into the detection branch for detection. Then, the detected text regions are corrected. Finally, the corrected feature map is fed into the recognition branch for text recognition. The recognition result is compared with the labeled result in the dataset, the loss function is calculated, and the CS-ABCNet network model is trained using the backpropagation algorithm. The parameters in the CS-ABCNet network model are packaged into a weight file. The image of the pagoda is input into the model, and the text information of the pagoda in the image is output using the obtained weight file.
[0065] The process of collecting the data set of power transmission tower identification signs in step 1 is as follows:
[0066] Drones were used to capture images of power transmission towers with high-definition cameras. The original images were then mirrored, vertically flipped, and rotated 45° counterclockwise. Four images were randomly selected, scaled, and then randomly distributed and stitched together. Some areas of the samples were randomly removed, and image data enhancement was performed by filling with zero-pixel values. This process was used to construct a dataset. The data annotation tool LabelImg was then used to annotate all images, marking the text regions and text content in the images.
[0067] Step 2 uses the Sobel operator to preprocess the dataset, calculating the edge information of objects in the image from both the horizontal and vertical directions:
[0068] Convolve the image pixels to calculate the horizontal and vertical gradient values, and then perform a threshold operation on the generated new pixel gray values to determine the edge information. The horizontal and vertical gray values of each pixel in the image are combined using formula (2) to calculate the gray value. To improve efficiency, an approximation without taking the square root is used, and formula (1) is used for calculation:
[0069] and (1),
[0070] Where Gx and Gy represent the grayscale values of the image after horizontal and vertical edge detection, respectively, and A is the input image;
[0071] Formula (2) calculates the gradient direction:
[0072] (2),
[0073] Where G represents the horizontal and vertical grayscale values of each pixel in the image;
[0074] The resulting image with edge information is stitched into the original image, i.e., the number of channels is 4, and each image is h×w×4.
[0075] The process of using ReXNet to extract features in the ABCNet Backbone in step 3 is as follows:
[0076] Benli first resizes the input image, defining the minimum side interval as (640, 672, 704, 736, 768, 800, 832, 864, 896). This interval is determined by which of h and w is closest to a given value. The input image is then scaled proportionally. Feature extraction is performed on the scaled image using ReXNe-50t as the feature extraction network. The first CONV standard convolutional layer is replaced with a combination of Depthwise (DW) and Pointwise (PW) convolutions to reduce the model size. The parameter complexity is 1 / k of the original model. 2 The parameter complexity is calculated as shown in formula (3):
[0077] (3),
[0078] At the same time, the activation function of the convolutional neural network is changed to ReLU, and the Swish function is used as the activation function, as shown in formula (4):
[0079] (4),
[0080] When β=0, the Swish activation function becomes a linear function f(x)=x / 2, and when β=∞, the Swish activation function becomes 0 or x.
[0081] Feature maps c2, c3, c4, and c5 of different states are obtained. c3, c4, and c5 are fed into FPN for feature fusion to obtain P3, P4, and P5. Upsampling is implemented using nearest neighbor difference, which doubles the width and height of the feature maps. When connecting laterally, the original feature map is first convolved with a 1×1 operation to adjust the number of channels to d. Then, it is added to the new feature map, and both have the same number of channels, d. For the new feature map at the top layer, the original feature map is directly convolved with a 1×1 operation to adjust the number of channels to d. Then, convolution is performed on c5 to obtain P6 and P7.
[0082] The feature maps P3, P4, P5, P6, and P7 after feature fusion are fed into the detection branch for classification, and then into the subsequent detection head. Each head contains 3 branches:
[0083] The classification branch predicts the category. In the diagram, C represents the number of categories, which is equivalent to C binary classifications.
[0084] The regression branch represents the regression position as l, t, r, b, which is the distance from the predicted anchor point to the four boundaries of the detection box (up, down, left, and right).
[0085] center-ness: Centrality, one anchor point corresponds to one centrality, used to determine the centrality of the anchor point relative to the detection box. The process in step 3 of sending the corrected feature map into the recognition branch for text recognition is as follows:
[0086] In the detection sub-network head, both the classification and regression branches first undergo feature enhancement through four convolutional layers. A CBAM attention module is added to the convolutions of both branches. The CBAM structure diagram is shown below. Figure 3 As shown, different weights are increased depending on the task. The input size is h×w×256. A Convolutional Attention Module (CBAM) is introduced during the convolution process. The feature map is fed into the CAM module of CBAM, and max pooling is used to generate a feature map containing the unique features of the target. A feature map containing global information is obtained through average pooling. These features are then fed into a multilayer perceptron (MLP) neural network for processing, and the resulting two new feature maps are subjected to addition and activation function processing to obtain the channel attention feature maps. As shown in formula (5):
[0087] (5),
[0088] AvgPool and MaxPool represent average pooling and max pooling, respectively; W0 and W1 are the weights of the MLP, with W0 followed by the ReLU activation function; σ is the Sigmoid activation function.
[0089] Combine feature map F with Pixel-level multiplication yields As shown in formula (6):
[0090] (6),
[0091] Feature map As input to SAM, after undergoing average pooling and max pooling operations respectively, two different feature descriptions are obtained. , These features are concatenated to highlight the target region. A 7×7 convolution reduces the number of channels to 1. After passing through a sigmoid function, the spatial attention feature map is obtained. As shown in formula (7):
[0092] (7),
[0093] feature map and Pixel-level multiplication yields As shown in formula (8):
[0094] (8).
[0095] The obtained feature maps are then fed into the classification and regression branches, while center-ness is calculated. The classification branch includes both a branch predicting the class of positive and negative anchor points and a center-ness branch determining the centerness of these anchor points, used to enhance the detection results. The regression branch regresses the distances from positive anchor points to the top, bottom, left, and right boundaries of the detection box. Since the Head has three output branches: Classification, Regression, and Center-ness, the loss is calculated using the classification loss L. cls Positioning loss L res and center-ness loss L ctrness The three parts together form the formula (14):
[0096] (14)
[0097] in:
[0098] P x,y This represents the score predicted for each class at the (x,y) point in the feature map;
[0099] C * x,y This represents the true class label at the point (x, y) in the feature map;
[0100] The value is 1 when the feature map point (x,y) is matched as a positive sample, and 0 otherwise.
[0101] t x,y This represents the predicted bounding box information of the target at the (x,y) point in the feature map;
[0102] t * x,y This represents the true target bounding box information corresponding to the point (x,y) in the feature map;
[0103] s x,y This represents the predicted center-ness at the (x,y) point in the feature map;
[0104] s * x,y This represents the true center-ness corresponding to the point (x,y) in the feature map.
[0105] After the detection branch detects the text region, the text region is corrected using the BezierAlign layer. Given an input feature map and Bezier curve control points, all input pixel values of the rectangular input feature map are processed simultaneously. The size of the feature map is hout×wout, and the coordinates of pixel gi are (giw,gih). The calculation is performed using formula (9):
[0106] (9),
[0107] Then, the upper boundary point t of the text region is calculated using t and formula (10). p and lower boundary b p ,
[0108] (10)
[0109] Use t p and b p The sampling point op can be retrieved using formula (11):
[0110] (11),
[0111] The text recognition stage uses a lightweight network model, employing a 4-layer convolutional network, a bilinear LSTM layer, and a fully connected layer. Based on the output classification score, the classic CTC-loss is used for character alignment. Long Short-Term Memory (LSTM) is a variant of RNN, and its core concepts lie in cell states and "gate" structures. Cell states are equivalent to the information transmission path, allowing information to be passed down in the sequence. Therefore, even information from earlier time steps can be carried to cells from later time steps, overcoming the influence of short-term memory. The addition and removal of information are achieved through "gate" structures, which learn which information to retain or forget during training. Gates are divided into forget gates, input gates, and output gates. The forget gate determines which information should be discarded or retained. Information from the previous hidden state and the current input information are simultaneously passed to the sigmoid function, and the output value is between 0 and 1. The closer to 0, the more it should be discarded, and the closer to 1, the more it should be retained. As shown in formula (15):
[0112] (15)
[0113] The input gate is used to update the cell state. First, information from the previous hidden state and the current input are passed to the sigmoid function. The value is adjusted between 0 and 1 to determine which information to update, where 0 indicates insignificant and 1 indicates significant. Next, information from the previous hidden state and the current input are passed to the tanh function to create a new candidate vector. Finally, the output of the sigmoid function is multiplied by the output of the tanh function; the sigmoid output determines which information in the tanh output is significant and needs to be retained. The output gate is used to determine the value of the next hidden state, which contains information from the previous input. First, the previous hidden state and the current input are passed to the sigmoid function, then the newly obtained cell state is passed to the tanh function. Finally, the output of the tanh function is multiplied by the output of the sigmoid function to determine the information the hidden state should carry. The hidden state is then used as the output of the current cell, and the new cell state and the new hidden state are passed to the next time step.
[0114] The corrected text region is fed into the recognition model to identify the text content. An attention-based Encoder-Decoder framework is used for character alignment. The context length limitation is addressed by utilizing all hidden layer states of the Encoder. The context vector dynamically changes its content at different decoding times. An attention score is calculated using the hidden layer output at each decoding time step and the hidden layer outputs at all encoding time steps; that is, the correlation between the current decoding time step and each encoding time step. Higher correlation results in higher weights. Finally, a weighted sum is applied to the hidden layers of the encoding process to obtain the context vector for the current decoding time step. This context vector is concatenated with the hidden layer output of the decoding process and then connected to a fully connected layer to ensure consistent dimensions, serving as the output for the current decoding time step.
[0115] Performance evaluation
[0116] Using accuracy and recognition speed as evaluation metrics, and with the same dataset and experimental environment, the detection results of the ABCNet network model and the CS-ABCNet network model are compared and shown in Table 1.
[0117] Table 1 Performance comparison of the improved model before and after
[0118]
[0119] As shown in Table 1, the CS-ABCNet model improves both detection accuracy and recognition speed. This is because it uses the Sobel operator to perform edge calculation on the input image, tailored to the characteristics of the pyramid, and then stitches the pre-processed image into the original image to enhance the pyramid information. Simultaneously, the ReXNet-50 feature extraction network effectively reduces the model size and improves inference speed. Furthermore, the introduction of the CBAM attention module in the detection branch effectively improves recognition accuracy.
Claims
1. A method for detecting and identifying power tower signs based on CS-ABCNet, characterized in that, Includes the following steps: Step 1: Collect the data set of power transmission tower identification signs, and divide the data set into training and test sets in an 8:2 ratio; Step 2: Use the Sobel operator to preprocess the dataset, calculating the edge information of objects in the image in both horizontal and vertical directions. Based on the characteristics of the pagoda sign having a bright background color, mostly rectangular shapes, a clear difference from the background image, and drastic changes in grayscale values at the edges, the Sobel operator is used to determine the edge information of the pagoda sign and the text on it, while reducing unnecessary edge information in the background. The Sobel operator is used to convolve the input image pixels, calculate the horizontal and vertical gradient values, and then perform a thresholding operation on the grayscale values of the generated new pixels to determine the edge information. Step 3: ReXNet is used for feature extraction on the ABCNet backbone to achieve a lightweight network model and overcome the representational bottleneck problem in the original model. A Convolutional Attention (CBAM) module is introduced during the detection phase to increase the weight of target information from both channel and spatial dimensions of the feature map, resulting in the CS-ABCNet network model. The image obtained in Step 2 is fed into the CS-ABCNet model. Through feature extraction and feature fusion, the image is fed into the detection branch for detection. The detected text regions are then corrected. Finally, the corrected feature map is fed into the recognition branch for text recognition. The recognition results are compared with the labeled results in the dataset, and the loss function is calculated. The CS-ABCNet network model is trained using the backpropagation algorithm. The parameters of the CS-ABCNet network model are packaged into a weight file. The image of the pagoda sign is input into the model, and the text information of the pagoda sign in the image is output using the obtained weight file.
2. The power tower sign detection and identification method based on CS-ABCNet according to claim 1, characterized in that, The process of collecting the data set of power transmission tower identification signs in step 1 is as follows: Drones were used to capture images of power transmission towers with high-definition cameras. The original images were then mirrored, vertically flipped, and rotated 45° counterclockwise. Four images were randomly selected, scaled, and then randomly distributed and stitched together. Some areas of the samples were randomly removed, and image data enhancement was performed by filling with zero-pixel values. This process was used to construct a dataset. The data annotation tool LabelImg was then used to annotate all images, marking the text regions and text content in the images.
3. The power tower sign detection and identification method based on CS-ABCNet according to claim 1, characterized in that, Step 2 uses the Sobel operator to preprocess the dataset, calculating the edge information of objects in the image from both the horizontal and vertical directions: Convolve the image pixels to calculate the horizontal and vertical gradient values, and then perform a threshold operation on the generated new pixel gray values to determine the edge information. The horizontal and vertical gray values of each pixel in the image are combined using formula (2) to calculate the gray value. To improve efficiency, an approximation without taking the square root is used, and formula (1) is used for calculation: and (1), Where Gx and Gy represent the grayscale values of the image after horizontal and vertical edge detection, respectively, and A is the input image; Formula (2) calculates the gradient direction: (2), Where G represents the horizontal and vertical grayscale values of each pixel in the image; The resulting image with edge information is stitched into the original image, i.e., the number of channels is 4, and each image is h×w×4.
4. The power tower sign detection and identification method based on CS-ABCNet according to claim 1, characterized in that, The process of using ReXNet to extract features in the ABCNet Backbone in step 3 is as follows: The first CONV standard convolutional layer of the network model is replaced with DW convolution and PW convolution to reduce the model size; the parameter complexity is 1 / k of the original model. 2 The parameter complexity is calculated as shown in formula (3): (3), At the same time, the activation function of the convolutional neural network is changed to ReLU, and the Swish function is used as the activation function, as shown in formula (4): (4), When β=0, the Swish activation function becomes a linear function f(x)=x / 2, and when β=∞, the Swish activation function becomes 0 or x.
5. The power tower sign detection and identification method based on CS-ABCNet according to claim 1, characterized in that, The process of sending the corrected feature map into the recognition branch for text recognition in step 3 is as follows: The obtained feature map is fed into the recognition branch with an input size of h×w×256. During the convolution process, a Convolutional Attention Module (CBAM) is introduced, and the feature map enters the CAM module of the CBAM. Max pooling is used to generate a feature map containing the target's unique features. A feature map containing global information is obtained through average pooling. These features are then fed into a multilayer perceptron (MLP) neural network for processing, and the resulting two new feature maps are subjected to addition and activation functions to obtain the channel attention feature maps. As shown in formula (5): (5), AvgPool and MaxPool represent average pooling and max pooling, respectively; W0 and W1 are the weights of the MLP, with W0 followed by the ReLU activation function; σ is the Sigmoid activation function. Combine feature map F with Pixel-level multiplication yields As shown in formula (6): (6), Feature map As input to SAM, after undergoing average pooling and max pooling operations respectively, two different feature descriptions are obtained. , These features are concatenated to highlight the target region. A 7×7 convolution reduces the number of channels to 1. After passing through a sigmoid function, the spatial attention feature map is obtained. As shown in formula (7): (7), feature map and Pixel-level multiplication yields As shown in formula (8): (8)。
Citation Information
Patent Citations
Electric energy meter electricity utilization information identification algorithm based on computer vision technology
CN113516124A
Text recognition model training method and device
CN114581918A