A computer vision-based catenary drawing text intelligent recognition method
By improving the feature extraction network, cross-scale feature enhancement attention module (CSFEA), and adaptive spatiotemporal semantic association aggregation module (ASSCA), combined with the bidirectional CTC decoding algorithm, the problems of multi-scale adaptation, graphic interference suppression, and professional semantic matching in contact wire drawing text recognition are solved, thereby improving recognition accuracy and practicality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHINA RAILWAY SEVENTH GRP CO LTD
- Filing Date
- 2026-05-09
- Publication Date
- 2026-07-31
AI Technical Summary
Existing technologies cannot simultaneously solve the problems of multi-scale text adaptation, graphic interference suppression, dynamic layout adaptation, and professional semantic matching in contact wire drawing text recognition, resulting in insufficient recognition accuracy and practicality.
A computer vision-based intelligent text recognition method for overhead contact line drawings is adopted. The improved feature extraction network is used for text region localization and feature extraction. The method combines a cross-scale feature enhancement attention module (CSFEA) and an adaptive spatiotemporal semantic association aggregation module (ASSCA), and a bidirectional CTC decoding algorithm is used for classification and decoding.
It improved the accuracy and practicality of text recognition in overhead contact line drawings, reduced the character error rate, and increased the accuracy of technical terminology recognition.
Smart Images

Figure CN122493480A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer vision and text recognition technology, and in particular to a method for intelligent text recognition on contact wire drawings based on computer vision. Background Technology
[0002] As a core component of the electrified railway traction power supply system, the overhead contact system's construction drawings contain crucial textual information that serves as the core basis for construction organization, quality control, and operation and maintenance. However, text recognition in overhead contact system construction drawings faces four major technical bottlenecks: First, the character scale varies greatly, with significant differences in features ranging from single-character model codes to long technical descriptions; second, interference sources are complex and diverse, with scanning noise, overlapping engineering lines, and interwoven background textures easily obscuring text features; third, the spatial layout lacks a fixed paradigm, and the relative positions of text and key components of the overhead contact system change dynamically; and fourth, the dense use of technical terminology necessitates strict adherence to power industry standards and technical specifications.
[0003] Traditional character recognition methods rely on manually designed features, which are extremely unresponsive to noise and scale variations in drawings. Single-scale feature extraction methods based on convolutional neural networks (CNNs) struggle to balance character details with global information of text blocks. While sequence modeling methods based on recurrent neural networks (CRNNs) excel in continuous character recognition, they lack the ability to model spatial relationships and specialized semantics. Existing applications of graph convolutional networks (GCNs) in engineering drawing analysis primarily focus on component segmentation and geometric parameter extraction, without optimizing for the multi-scale characteristics and specialized constraints of character recognition, resulting in insufficient recognition accuracy and engineering practicality.
[0004] Existing technologies cannot simultaneously solve four major problems: multi-scale text adaptation, graphic interference suppression, dynamic layout adaptation, and professional semantic matching. This results in a character error rate (CER) for text recognition on overhead contact line drawings generally exceeding 6%, and an accuracy rate for professional terminology recognition below 92%, failing to meet the practical needs of intelligent processing in power engineering. Therefore, this invention proposes a computer vision-based intelligent text recognition method for overhead contact line drawings. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention proposes a computer vision-based intelligent text recognition method for overhead contact line drawings. This method solves the technical problems of difficulty in adapting text to multiple scales, weak suppression of graphic interference, poor dynamic layout adaptation, and insufficient professional semantic matching in existing technologies, thereby improving the accuracy and practicality of text recognition in overhead contact line drawings.
[0006] The technical solution of this invention is implemented as follows: A computer vision-based intelligent text recognition method for overhead contact line drawings includes the following steps: Step S1: Collect images of overhead contact line construction drawings, obtain professional text information and scene environment features from the drawings, and generate a dataset with text annotations; Step S2: The improved feature extraction network is used to locate and extract text regions from the drawing image to obtain at least one candidate text feature box. Step S3: Based on the Cross-Scale Feature Enhancement Attention Module (CSFEA), multi-scale feature extraction and graphic interference suppression are performed on the candidate text feature boxes to obtain enhanced text features; Step S4: The enhanced text features are modeled with spatial layout association and contact network professional semantic association through the adaptive spatiotemporal semantic association aggregation module ASSCA, and the feature expression is optimized by combining a triple constraint mechanism. Step S5: The optimized features are classified and decoded using a bidirectional CTC decoding algorithm to obtain the text recognition results of the overhead contact line drawing.
[0007] Preferably, in step S1, various drawings such as overhead contact line design drawings, construction drawings, and as-built drawings are acquired using a high-definition scanner and an industrial camera; images without serious damage and clearly identifiable are selected, and the bounding box coordinates, text content, and professional category of the text area are labeled; data augmentation processing is performed on the labeled data, including random rotation, scaling, and Gaussian noise addition, to generate training sets, validation sets, and test sets.
[0008] Preferably, step S2 specifically includes: Step S2.1: Preprocess the drawing image by using adaptive Gaussian filtering to denoise the drawing image, then enhance the text features through a local contrast enhancement algorithm, and finally separate the text from the background through adaptive threshold binarization. Step S2.2: Text region localization is performed based on the improved EAST detector. The improved EAST detector consists of three parts: a feature extraction backbone network, a pixel-level text score prediction branch, and a bounding box regression branch. The feature extraction backbone network extracts multi-channel text features from the preprocessed drawing image. The pixel-level text score prediction branch maps the multi-channel text features into a single-channel text confidence map, and extracts high-probability text regions with confidence scores higher than a threshold from this text confidence map. The bounding box regression branch predicts the core parameters of the rotating rectangle bounding box based on the high-probability text regions, thus obtaining the initial text region containing complete text information. Step S2.3: Multi-scale feature fusion is performed using a pyramid feature fusion network. This network comprises two convolutional layers for the shallow feature layers, two convolutional layers for the deep feature layers, and two pooling layers. First, the feature layers at different scales in the initial text region are normalized using 1×1 convolutions to unify the number of channels in each feature layer to 256 dimensions. Next, the deep feature layers are upsampled using 2×2 transposed convolutions to increase their resolution to match that of the adjacent shallow feature layers. Zero-padding is used during upsampling to maintain feature map size matching. Then, the upsampled deep and shallow features are concatenated and fused. Finally, the fused feature layers are downsampled using max pooling to obtain a multi-scale fused feature map. Step S2.4: Valid text regions are filtered through the Region Generation Network (RPN). Multiple anchor boxes are generated based on the multi-scale fusion feature map. The RPN is used to predict the text and non-text categories of each anchor box and the regression parameters of the bounding box. The category prediction adopts a binary cross-entropy loss optimization model, and the regression parameter prediction adopts a Smooth L1 loss optimization model to improve the regression accuracy of the bounding box. Finally, the corresponding candidate text regions are obtained. Step S2.5: Perform ROI pooling and normalization. Use an adaptive sub-region segmentation strategy to divide each candidate text region into sub-regions of fixed size. Dynamically adjust the boundary coordinates of the sub-regions according to the actual length-width ratio of the text region. Then, perform max pooling on each sub-region and use the maximum value in the sub-region as the key feature. Finally, map the candidate regions of different sizes after max pooling to a fixed-size feature map of 256×64 to obtain standardized text candidate feature boxes.
[0009] Preferably, step S3 specifically includes: Step S3.1, hierarchical multi-branch convolution feature extraction: For each text candidate feature box, fine-grained feature map, medium-scale feature map and global feature map are extracted respectively through hierarchical multi-branch convolution structure; Step S3.2, Multi-branch feature fusion and dimensionality calibration: The fine-grained feature map, the mesoscale feature map and the global feature map are concatenated along the channel dimension to obtain a preliminary fusion feature map with 256 channels. Then, a 1×1 convolution is used to optimize the channel dimension of the preliminary fusion feature map to obtain a dimension-calibrated feature map. Step S3.3, bidirectional attention optimization and enhanced feature output: the feature map after dimension calibration is calibrated by spatial channel bidirectional attention mechanism, and then the number of channels of the channel-calibrated feature map is further optimized from 192 dimensions to 128 dimensions by 1×1 convolution to obtain the final enhanced text features.
[0010] Preferably, step S4 specifically includes: Step S4.1, Spatial layout association aggregation, extract the spatial feature vector of each candidate text region, calculate the spatial similarity between any two candidate text regions, generate a dynamic spatial association matrix, aggregate spatial association features based on the GraphSAGE sampling aggregation mechanism, and fuse the enhanced text features of each text region with the enhanced text features of its associated regions based on the dynamic spatial association matrix to generate spatial association features. Step S4.2: Associate and aggregate the professional semantics in the content, construct a professional dictionary and pre-trained vectors, calculate the semantic similarity between each text region feature and term category based on the professional dictionary and pre-trained vectors, generate a semantic similarity matrix, generate a dynamic semantic association matrix after Softmax normalization, and generate semantic association features by combining the semantic weight matrix and enhanced text features. Step S4.3: Feature fusion is performed using a residual aggregation strategy and a triple constraint mechanism to integrate the enhanced text features Y. CSFEA Spatial correlation feature Y Spat Semantic association feature Y Sem The elements are added directly to obtain the fused feature map. A triple constraint mechanism, including character structure constraints, technical term constraints, and layout distance constraints, is introduced into the fused feature map. Step S4.4, Feature Refinement and Anomaly Suppression: The feature map after fusion and constraint is subjected to feature redundancy removal processing to obtain a refined feature map. Then, the extreme response features of the refined feature map are filtered by adaptive thresholding to suppress local outliers and obtain an optimized feature map.
[0011] Preferably, step S5 specifically includes: Step S5.1: The optimized feature map is processed using a bidirectional CTC decoding structure. Two decoders, a forward CTC decoder and a backward CTC decoder, are constructed to output the character forward probability and backward probability at each time step. The forward probability and backward probability are added together according to their weights to obtain the fused decoding probability. Step S5.2: Introduce a professional dictionary for constraint optimization. Assign matching scores to all characters according to the professional dictionary. Adjust the fused decoding probability based on the matching scores to obtain the final decoding probability. Step S5.3, post-processing optimization: First, continuous repeating characters are removed by traversing the decoded text sequence and filtering abnormal repeating patterns based on character frequency statistics; second, a correction dictionary is constructed based on common miswriting patterns of contact network professional terms, and the decoded text sequence is further optimized based on the correction dictionary; finally, the final recognition result is output, including text content, bounding box coordinates of text regions, and professional category.
[0012] The beneficial effects of implementing the computer vision-based intelligent text recognition method for catenary drawings of this invention are as follows: This invention improves the feature extraction network to locate the text region in the catenary drawing image, thereby ensuring the effective extraction of deep text features; it extracts multi-scale text features based on the Cross-Scale Feature Enhancement Attention Module (CSFEA), which can suppress the interference of the image background and improve the accuracy of text feature extraction; it further optimizes the text feature expression by associating spatial layout and professional semantics, combined with a triple constraint mechanism; and finally, it uses a bidirectional CTC decoding algorithm to classify and decode the optimized features, which can improve the accuracy of text recognition results. Attached Figure Description
[0013] Figure 1 This is a flowchart of the intelligent text recognition method for contact wire drawings based on computer vision according to the present invention; Figure 2 This is a flowchart illustrating the extraction of enhanced text features based on the CSFEA module according to the present invention. Figure 3 This is a schematic diagram of the CSFEA network structure of the present invention; Figure 4 This is a flowchart illustrating the feature optimization process of this invention, which combines the ASSCA module and the triple constraint mechanism. Figure 5 This is a flowchart illustrating the generation of recognition results based on the improved CTC decoding algorithm of this invention. Detailed Implementation
[0014] To better understand the purpose, technical solution, and advantages of this application, the application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0015] A computer vision-based intelligent text recognition method for overhead contact line drawings includes the following steps, such as... Figure 1 As shown: Step S1: Collect images of overhead contact line construction drawings, obtain professional text information and scene environment features from the drawings, and generate a dataset with text annotations; Step S2: The improved feature extraction network is used to locate and extract text regions from the drawing image to obtain at least one candidate text feature box. Step S3: Based on the Cross-Scale Feature Enhancement Attention Module (CSFEA), multi-scale feature extraction and graphic interference suppression are performed on the candidate text feature boxes to obtain enhanced text features; Step S4: The enhanced text features are modeled with spatial layout association and contact network professional semantic association through the adaptive spatiotemporal semantic association aggregation module ASSCA, and the feature expression is optimized by combining a triple constraint mechanism. Step S5: The optimized features are classified and decoded using a bidirectional CTC decoding algorithm to obtain the text recognition results of the overhead contact line drawing.
[0016] Preferably, images of overhead contact line construction drawings are collected to generate a dataset with text annotations. Specifically, this involves: collecting various types of drawings, such as overhead contact line design drawings, construction drawings, and as-built drawings, using high-definition scanners and industrial cameras. The image resolution should be no less than 1024×768, and the formats should include JPG, PNG, and TIFF. Images without severe damage and clearly legible are selected, and the bounding box coordinates, text content, and professional category of the text areas are annotated. The bounding box deviation should not exceed 2 pixels. Data augmentation processing is performed on the annotated data, including random rotation, scaling, and Gaussian noise addition, to generate training, validation, and test sets in a ratio of 7:2:1. Due to the complex environment of power construction drawings, which contain a large number of engineering lines, symbols, and background textures, manual review is required during the annotation stage to distinguish between text and non-text areas, and invalid and duplicate annotations should be removed to ensure the validity and accuracy of the dataset.
[0017] Preferably, candidate feature boxes for text are obtained through an improved feature extraction network. The specific method is as follows: Step S2.1 involves preprocessing the drawing image to improve the distinction between text and background. Specifically, an adaptive Gaussian filter is first used for noise reduction. The core principle is to dynamically adjust the filter strength to suppress noise while preserving text details, specifically suppressing scanning noise and background texture interference in the drawing. The kernel function expression is as follows: .
[0018] In the formula, (x, y) represents the two-dimensional coordinates of the image pixels, σ is an adaptive adjustment coefficient, calculated by σ = 0.1 × var(I) + 0.5, where var(I) is the gray-level variance of the text region, with a value controlled between 0.5 and 1.5. In the processing flow, the gray-level variance of the text region in the input image is first calculated. If the noise in the text region is low, σ approaches 0.5, indicating a weaker filtering strength, avoiding blurring of the edge details of the text strokes; if the noise is high, σ automatically increases to 1.5, enhancing the denoising effect. By utilizing the attenuation characteristic of the exponential function with pixel distance, noise around the pixels is smoothed, while preserving the edge contours of the text to the greatest extent possible, laying a clear image foundation for subsequent feature extraction.
[0019] After Gaussian denoising, the contrast between text, engineering lines, and background textures in the image remains low. A local contrast enhancement algorithm is then used to further strengthen text features, increase the grayscale difference between text and background, and resolve the issue of text being confused with engineering lines and background textures in the drawing. The expression is: .
[0020] In the formula, I(x,y) is the original pixel value, Ienh (x,y) represents the enhanced pixel value, and C is a minimal constant to prevent the denominator from being zero, C=0.02. First, the denoised image is divided into local regions of 3×3 pixels. The variance var(x,y) and mean avg(x,y) of each region are calculated. When text is present in a local region, the grayscale difference between the text strokes and the background significantly increases var(x,y), resulting in an overall increase in the formula value, and the text pixel value is specifically amplified. When the region is a uniform background or a single engineering line, var(x,y) is smaller, and the result approaches I(x,y), avoiding over-enhancing of the background or line. Through this process, the contrast between the text and surrounding interference is greatly improved, and the text features become more prominent. After contrast enhancement, adaptive threshold binarization is performed to achieve complete separation of text from complex backgrounds and dynamically calculate the binarization threshold for each pixel. The threshold calculation expression is: T(x,y)=α·avg(x,y)+(1-α) ·median(x,y).
[0021] In the processing flow, for the enhanced image, the mean (avg(x,y)) and median (median(x,y)) of the region are calculated simultaneously in 3×3 local regions. In these formulas, T(x,y) is the dynamic threshold for pixel (x,y), and α is the weighting coefficient, α=0.6. The mean reflects the overall grayscale level of the region, while the median effectively resists local noise interference. The combination of these two values ensures that the threshold accurately reflects the grayscale characteristics of the region while also possessing noise resistance. During binarization, regions with pixel values greater than T(x,y) are designated as the foreground, and those less than T(x,y) are designated as the background, ultimately achieving clear separation between text and complex backgrounds or engineering lines.
[0022] Step S2.2: Text region localization is performed based on the improved EAST detector. Specifically, the improved EAST detector consists of three parts: a feature extraction backbone network, a pixel-level text score prediction branch, and a bounding box regression branch. The performance of the backbone network directly determines the feature extraction quality; therefore, a ResNet-Enhanced network is used, containing four convolutional layer groups, each with 3-4 convolutional layers, for a total of 16 convolutional layers. Residual connections are used to address the gradient vanishing problem during deep network training and overcome the gradient propagation barrier in deep networks, ensuring the effective extraction of deep text features. The residual calculation formula is: F... out =F in +R(F in ).
[0023] In the formula, F in For each group of convolutional layers, the input feature value, R(F) in F is the residual function, which is composed of the mapping relationship between the convolution operation, batch normalization, and activation function of this layer. outThis represents the output feature value of the convolutional layer group. By directly adding the input features to the residual mapping result, the network can adaptively learn the identity mapping. When the weights of deep networks approach 0, the output approximates the input, preventing the gradient from gradually decaying to zero during backpropagation. This mechanism ensures that even at a depth of 16 layers, the backbone network can still effectively extract deep semantic features and edge detail features of text, providing high-quality feature support for subsequent localization.
[0024] To further enhance the feature response strength of small-sized text, an attention module is added after each convolutional layer of the backbone network. This strengthens the feature weights of small-sized text regions, addressing the issue of small text being easily interfered with by background. Simultaneously, the bounding box regression branch uses rotated rectangles instead of traditional axis-aligned rectangles to accommodate the slanted text commonly found in drawings. After feature extraction, the pixel-level text score prediction branch maps the multi-channel features output by the backbone network into a single-channel text confidence map using a 1×1 convolution. A confidence threshold of 0.7 is set to filter out high-probability text regions with confidence scores higher than the threshold. The bounding box regression branch then predicts the core parameters of the rotated rectangle bounding boxes for these high-probability regions, ultimately obtaining the initial text region containing complete text information.
[0025] Step S2.3 involves multi-scale feature fusion using a pyramid feature fusion network. Specifically, the pyramid feature fusion network comprises two convolutional layers before the shallow feature layer, two convolutional layers after the deep feature layer, and two pooling layers. By integrating the advantages of features from different levels, it balances text details with global layout information. In the processing flow, firstly, the different scale feature layers output by the backbone network are normalized using 1×1 convolutions to unify the number of channels in each layer to 256 dimensions, eliminating the channel dimension differences between different feature levels and laying the foundation for subsequent fusion. Next, the deep feature layers are upsampled using 2×2 transposed convolutions to increase their resolution to match that of the adjacent shallow feature layers. During the upsampling process, zero-padding is used to maintain feature map size matching. Then, the upsampled deep features and shallow features are channel-wise concatenated and fused. During the fusion process, batch normalization is used to stabilize the training gradient and avoid gradient explosion caused by differences in feature scale. Finally, the fused feature layers are downsampled using max pooling with a stride of 2 to obtain a multi-scale fused feature map. This feature map contains both shallow features such as the endpoints and corners of character strokes, and deep features such as the layout of character blocks and semantic relationships, providing comprehensive feature support for subsequent region generation networks.
[0026] Step S2.4 involves filtering effective text regions using a Region Generation Network (RPN). Specifically, candidate regions containing text are selected from the multi-scale fused feature map, with the process beginning with anchor box generation. First, a 3×3 convolutional kernel is used to slide across the multi-scale fused feature map, generating nine anchor boxes of different scales and aspect ratios for each sliding window. The anchor box size is designed based on the common size range of text in contact wire drawing paper, ensuring coverage of various text forms from single characters to long sentences, effectively improving the recall rate of candidate regions.
[0027] For each generated anchor box, the RPN simultaneously predicts the category of text and non-text, as well as the bounding box regression parameters. The category prediction uses a binary cross-entropy loss model to optimize its ability to distinguish between text and non-text regions; the expression is: .
[0028] First, count the total number of anchor frames N, then assign a real label y to each anchor frame. i The model outputs the predicted probability p for each anchor box to be a text region. i When the anchor box is a positive sample, -log(p) i ) plays a leading role, p i The closer the value is to 1, the smaller the loss, and the more likely the model is to classify it as a text region; when it is a negative sample, (1-y i log(1-p) i ) item led, p i The closer the loss is to 0, the smaller it is, and the more likely the model is to classify it as a non-text region. By minimizing this loss through gradient descent, the model gradually learns to accurately distinguish between text and non-text anchor boxes.
[0029] After class prediction, for positive sample anchor boxes, the Smooth L1 loss is used to optimize the regression accuracy of the bounding boxes, making the predicted boxes fit the actual text regions better. The expression is: .
[0030] First, select the total number N of positive sample anchor frames. pos Then obtain the true bounding box parameters t for each positive sample anchor box. i With model prediction parameters t i $ Calculate the regression error between the two: |x| = t i - t i $The error is then substituted into the SmoothL1 function. When the error |x| < 1, a squared loss is used to smooth the gradient as the error decreases, avoiding overcorrection of small errors. When |x| ≥ 1, a linear loss is used to suppress the influence of outliers on the loss, ensuring the stability and accuracy of bounding box regression. Finally, the loss of all positive samples is averaged to obtain the bounding box regression loss. Furthermore, to balance the weights of the class loss and regression loss and avoid one loss dominating the training process, the total RPN loss is defined as L... RPN =L cls +λL reg λ is the balance coefficient, λ=10, which is determined through validation set testing to balance the contributions of the two types of losses. After loss calculation, each anchor box needs to be labeled as a positive or negative sample for RPN training. First, the anchor box with the highest intersection-over-union (IoU) with the labeled box is selected and labeled as a positive sample; then, the IoU values of the remaining anchor boxes with the labeled boxes are calculated, and anchor boxes with IoU ≥ 0.7 are also labeled as positive samples; finally, anchor boxes with IoU ≤ 0.3 are labeled as negative samples, and the remaining anchor boxes are discarded to avoid ambiguous samples affecting model training. For anchor boxes labeled as positive samples, the bounding box parameters are adjusted through a regression network to finally obtain candidate text regions that accurately wrap the text regions.
[0031] Step S2.5 involves ROI pooling and normalization. Specifically, due to differences in the size and aspect ratio of candidate text regions, they cannot be directly input into subsequent feature enhancement modules. Normalization is achieved through ROI pooling. In the processing flow, each candidate text region is first divided into fixed-size sub-regions at a ratio of 16×4, using an adaptive sub-region division strategy. The boundary coordinates of the sub-regions are dynamically adjusted according to the actual aspect ratio of the text region to avoid the fragmentation of key stroke information due to fixed division. Next, max pooling is performed on each sub-region to extract the maximum value within the sub-region as the output feature, thus preserving key features within the sub-region while compressing the data dimensionality. After pooling, candidate regions of different sizes are uniformly mapped to a fixed-size feature map of 256×64, resulting in standardized text candidate feature boxes. This ensures that subsequent feature enhancement modules receive input with a uniform format and complete features.
[0032] Preferably, enhanced text features are obtained based on the Cross-Scale Feature Enhancement Attention Module (CSFEA), and the CSFEA network structure is as follows: Figure 3 As shown, the specific method is as follows: Figure 2 As shown, it includes the following steps.
[0033] Step S3.1, Hierarchical multi-branch convolutional feature extraction. Specifically, the text candidate feature boxes contain text information at different scales, which are extracted separately using a hierarchical multi-branch convolutional structure. First, the fine-grained feature branch is processed, focusing on the details of character strokes. The expression is: Y1=GELU(Conv1×1 (Y)+b1).
[0034] First, input the text candidate feature box Y and perform convolution operation using a 1×1 convolution kernel. The 1×1 convolution kernel only changes the number of feature channels, not the spatial dimension, fusing channel information without expanding the receptive field, thus accurately capturing fine-grained details such as character stroke edges and corners. Second, a bias term is added after convolution, followed by the GELU activation function GELU(x) = 0.5x[1 + erf(x / 2)]. 1 / 2 By introducing smooth nonlinear characteristics, the feature mapping is avoided from becoming too linear, and the final output is a 64-channel fine-grained feature map Y1.
[0035] After fine-grained feature extraction, the mesoscale feature branch is processed to capture word-level character association information. The expression is: Y k =GELU(DilatedConv 3×3 (Y, d=2k-2)+b k ).
[0036] This branch contains two parallel sub-branches, applying 3×3 dilated convolutions with dilation rates d=2 and d=4 to the input feature map Y, respectively. Dilated convolutions expand the receptive field without increasing the number of parameters or computation: with d=2, the effective receptive field covers a 3×3 area, capturing local associations of 2-3 adjacent characters; with d=4, the effective receptive field expands to a 7×7 area, capturing semantic associations of longer word groups. Each sub-branch convolution is followed by corresponding bias terms b2 and b3, which, after GELU activation, output two 64-channel mid-scale feature maps Y2 and Y3. Furthermore, to capture the global association information between the text block and its surrounding environment while suppressing local noise interference, a global feature branch is set, with the expression: Y4=GELU(TransConv... 4×4 (GMP(Y) +b4).
[0037] First, perform a global max pooling (GMP) operation on the input feature map Y. The global feature vector is obtained by compressing the spatial dimension, integrating the overall semantic information of the text blocks. Then, a 4×4 transposed convolution is used to restore the global feature vector to its original spatial resolution, achieving alignment between global information and local space. Finally, a bias term b4 is added, and after GELU activation, a 64-channel global feature map Y4 is output. This feature map effectively suppresses local noise and complements the local feature branches. Furthermore, to avoid overfitting and improve generalization ability on images of different quality, a batch normalization (BN) layer and a dropout layer are added after the convolutional layer of each branch. The batch normalization layer standardizes the feature distribution and accelerates training convergence. The dropout layer reduces the model's over-reliance on local features by randomly deactivating some neurons.
[0038] Step S3.2, Multi-branch Feature Fusion and Dimensional Calibration. Specifically, firstly, the fine-grained feature map Y1, the mesoscale feature maps Y2 and Y3, and the global feature map Y4 are concatenated along the channel dimension to integrate multi-scale information from character details to global semantics, resulting in a preliminary fusion feature map Y with 256 channels. concat Y concat ∈R 256×64×16 Secondly, due to the initial fusion of feature map Y concat There are issues of channel dimension redundancy and unbalanced feature responses. To further calibrate, a 1×1 convolution is used on Y. concat Channel dimension optimization is performed, expressed as: Y S =Conv 1×1 (Y concat )+b5.
[0039] In the formula, b5 is the bias term. The core function of the 1×1 convolution is to compress redundant channel information, mapping the 256-channel features to 192 channels, while simultaneously enhancing the response strength of the effective feature channels. After dimensionality calibration, batch normalization is used to stabilize the feature distribution and avoid feature fluctuations caused by dimensionality transformation, resulting in the dimensionally calibrated feature map Y. S Y S ∈R 192×64×16 .
[0040] Step S3.3, Bidirectional Attention Optimization and Enhancement of Feature Output. Specifically, since the feature map after dimensionality calibration still contains background interference and invalid features, it needs to be further optimized through a spatial channel bidirectional attention mechanism. First, channel calibration is performed to focus on the text region and suppress background interference. The relevant expression is: V c =σ(FC(BN(Y chan ))+b c ), Y c =Y s ⊙V c .
[0041] First, the dimension-calibrated feature map Y s Averaging by spatial dimension generates a 192-dimensional channel feature response Y. chan The vector directly reflects the feature importance of each channel. Secondly, a bottleneck-structured fully connected layer is used for Y... chan The process involves first reducing the 192-dimensional features to 96-dimensionality, then using batch normalization (BN) to stabilize the feature distribution, and finally increasing the dimensionality back to 192-dimensionality by adding a bias term b. c The channel weights V are then generated using the Sigmoid activation function. c A larger weight value indicates that the text features of the corresponding channel are more effective. Finally, the channel weights V are... c With dimension-calibrated feature map Y S Perform channel-wise multiplication ⊙ to enhance text-related channels, suppress irrelevant channels, and output the channel-calibrated feature map Y. c .
[0042] Finally, Y is convolved using a 1×1 convolution. c The number of channels was further optimized from 192 dimensions to 128 dimensions, reducing the computational complexity of subsequent modules while maintaining feature expressive power, resulting in the final enhanced text feature Y. CSFEA Y CSFEA ∈R 128 ×64×16 It not only preserves multi-scale textual information, but also effectively suppresses graphic interference through dimensional calibration and bidirectional attention optimization, providing feature input for subsequent spatial semantic association modeling.
[0043] Preferably, considering the dynamic spatial layout and dense technical terminology of the text in the overhead contact line drawings, the ASSCA module is used to model the relationships, and then a triple constraint mechanism is used to optimize feature representation to improve recognition accuracy. The process is as follows: Figure 4 As shown, the specific method is as follows: Step S4.1, Spatial Layout Association Aggregation. Specifically, the spatial layout of text in the overhead contact line drawings exhibits certain patterns, such as horizontally arranged phrases and annotations of adjacent components. Therefore, it is necessary to model these patterns through spatial layout association aggregation. First, the spatial feature vectors of candidate text regions are extracted, expressed as: f i S =[x i / W, y i / H, w i / W, h i / H, w i / h i ].
[0044] For each candidate text region i, obtain its center coordinates (x, y, y). i , yi ), width w i High h i The width W and height H of the drawing image are obtained. The coordinates, width, and height are normalized by dividing by the image's width and height respectively, and the aspect ratio is directly retained, resulting in a 5-dimensional spatial feature vector f. i S Then, all feature components are normalized to the [0,1] interval to eliminate scale differences between drawings of different sizes. By comprehensively depicting the spatial attributes of the text area, the first two dimensions reflect the location of the area, the middle two dimensions reflect the size of the area, and the last dimension reflects the aspect ratio of the area, providing a basis for subsequent spatial correlation calculations.
[0045] After obtaining the spatial feature vectors of all candidate text regions, the spatial similarity between any two regions i and j is calculated to measure the strength of their spatial association. The expression is: Sim S (i,j)=(f i S ·f j S ) / ( P f i S P·P f j S P) ·exp(-β·dist(i,j)).
[0046] First, calculate the two spatial feature vectors f. i S with f j S cosine similarity (f i S ·f j S ) / ( P f i S P·Pf j S The value of P is closer to 1, indicating that the two regions have more similar spatial attributes and a stronger spatial association. Next, the Euclidean distance dist(i,j) between the centers of the two regions is calculated, and distance decay is achieved through exp(-β·dist(i,j)). The greater the distance between the two regions, the smaller this factor, and the lower the similarity. Finally, the cosine similarity is multiplied by the distance decay factor to obtain the final spatial similarity Sim. S (i,j).
[0047] Furthermore, to model the dynamic spatial dependencies between candidate text regions, it is necessary to integrate prior knowledge of spatial layout to generate a dynamic spatial association matrix: First, construct the spatial prior matrix B. S p First, the statistical regularities of the horizontal and vertical arrangement of encoded text; second, the spatial similarity matrix Sim. SRow normalization is performed so that the sum of elements in each row is 1, resulting in a dynamic similarity matrix that reflects real-time spatial associations based on the input image. Finally, the prior matrix and the dynamic similarity matrix are fused according to their weights, expressed as: B S =γ·B S p +(1-γ) ·Softmax(Sim S ), where γ is the weighting coefficient, γ=0.3.
[0048] Finally, spatial correlation features are aggregated based on the GraphSAGE sampling and aggregation mechanism. Matrix multiplication is used to apply spatial correlation weights to the enhanced text features, enabling the features of each text region to fuse with the feature information of its associated regions. Mean aggregation is then used to further aggregate the correlation features, avoiding excessive influence from a single correlated region. Finally, a 1×1 convolution is used to adjust the feature channel dimension, and after batch normalization to stabilize the feature distribution, a non-linearity is introduced through the GELU activation function, ultimately outputting the spatial correlation features, expressed as: Y. Spat =GELU(BN(Conv 1×1 (Aggregate(B s ·Y CSFEA )))).
[0049] Step S4.2 involves associating and aggregating the professional semantics within the content. This includes: constructing a professional contact network dictionary (Dict) covering core professional terms such as component models, installation parameters, and safety specifications; training a 300-dimensional semantic feature vector for each term category. These feature vectors are pre-trained on a corpus of 100,000 professional contact network documents to ensure accurate characterization of the terms' semantic features. Based on the professional dictionary and the pre-trained vectors, the semantic similarity between the features of each text region and the term category is calculated. For the enhanced feature vector Y of the i-th text region... CSFEA (i) and the pre-trained semantic vector F of the m-th class of terms. m Calculate the dot product; a larger dot product indicates greater semantic alignment between the two vectors. Normalize the dot product by dividing it by the product of the magnitudes of the two vectors to obtain the semantic similarity (Sim). Sem (i,m), the result ranges from [-1,1], the closer it is to 1, the better the semantics of the text region matches the term of the m-th class. The expression is: Sim Sem (i,m)= Y CSFEA (i)·F m / (PY CSFEA (i)P·PF m P).
[0050] To make similarity more suitable for feature aggregation, the semantic similarity matrix is subjected to Softmax normalization to generate a dynamic semantic association matrix B.Sem B Sem =Softmax(Sim Sem ).
[0051] Finally, semantic feature aggregation is performed by transposing the dynamic semantic association matrix and multiplying it with the enhanced text features, thus weighting the text features; this is achieved through a learnable semantic weight matrix W. Sem The contribution of different semantic categories is adaptively adjusted, enabling the model to optimize the semantic association strength based on the training data. Then, 1×1 convolutions are used to adjust the feature channels. After batch normalization to stabilize the feature distribution, a non-linear transformation is introduced through the GELU activation function, ultimately outputting the semantic association feature Y. Sem This emphasizes the professional semantic attributes of the text, improves the accuracy of technical terminology recognition, and strengthens the professional semantic expression of the text. The expression is: Y Sem =GELU(BN(Conv 1×1 (B Sem T ·Y CSFEA ·W Sem ))).
[0052] Step S4.3 employs a residual aggregation strategy and a triple constraint mechanism. Specifically, to integrate multi-dimensional feature information, a residual aggregation strategy is first used to fuse enhanced text features, spatial association features, and semantic association features, combining the enhanced text feature Y... CSFEA Spatial correlation feature Y Spat Semantic association feature Y Sem Element-wise addition is performed directly, and residual connections are used to preserve the core information of the original features, avoiding dilution or loss of key features during the fusion process. The fused feature map Y... Fuse It contains three types of information: the text itself, space, and semantics. The expression is: Y Fuse =Y CSFEA +Y Spat +Y Sem .
[0053] Subsequently, to ensure the rationality and professionalism of the recognition results, a triple constraint mechanism was introduced: First, character structure constraint, based on character structure rules, a loss function was designed, the expression of which is: .
[0054] Label each text region with the actual character structure label T i Str The label covers the left-right, top-bottom, and enclosing structures of Chinese characters, as well as letter case rules; the model outputs the character structure probability distribution P for each text region. i Str ; Calculate the cross-entropy loss CE(P) between the probability distribution and the true label. iStr ,T i Str The summation of the losses over all text regions yields L. Str By minimizing this loss through gradient descent, the model learns the structural patterns of characters and avoids structural errors.
[0055] Secondly, there is the constraint of technical terminology. Based on the overhead contact line technical dictionary, a matching loss is designed, and the expression is: .
[0056] Setting a similarity threshold τ=0.85, the model outputs the predicted content S of the i-th text region. i Calculate S i The weighted similarity Sim with the professional dictionary is calculated. When Sim ≥ τ, the loss is 0, indicating that the prediction results conform to professional standards; when Sim < τ, the loss is τ - Sim, which forces the model to adjust the prediction results through gradient descent, moving closer to professional terms and reducing the misidentification rate of non-professional terms.
[0057] Next is the layout distance constraint. The design loss is based on the layout patterns in the drawings: .
[0058] For each text region i, determine the set of component regions Ω associated with it. i Calculate the Euclidean distance dist(i,j) between text region i and each associated component region j. The effect of increasing weight for closer regions is achieved using exp(-dist(i,j)∙α), where α is the weighting coefficient and α=0.5. Then, calculate the category prediction probability P of the text region. i The predicted probability P of the component region category j Cross-entropy loss CE(P) i ,P j After weighted summation, we get L. Lay This loss function is used to match the text prediction results of adjacent components with the component category, ensuring that the recognition results conform to the drawing layout logic.
[0059] Finally, to comprehensively optimize sequence recognition and various constraints, a total loss function is constructed: L total =L CTC +λ1L Str +λ2L Dict +λ3L Lay .
[0060] In the formula, L CTCThe loss is denoted as CTC sequence loss, and λ1, λ2, and λ3 are the weights of each constraint loss, with λ1=0.3, λ2=0.4, and λ3=0.2. Among them, λ2 has the largest weight, highlighting the core position of the technical terminology constraint. The total loss is minimized by gradient descent, enabling the model to satisfy multiple constraints of character structure, technical terminology, and layout consistency while optimizing sequence recognition.
[0061] Step S4.4, Feature Refinement and Anomaly Suppression. Specifically, the fused and constrained feature map may still contain feature redundancy and local outliers, requiring further refinement to improve feature quality. The expression for feature redundancy removal is: Y refuse =Y Fuse / (P mean(Y Fuse )P+ò)·Softmax(var(Y Fuse )).
[0062] In the formula, ò is a minimum value to prevent the denominator from being zero, and mean(Y) Fuse ) is the feature map Y Fuse The global mean, var(Y) Fuse ) is the feature map Y Fuse The channel dimension variance. First, calculate the magnitude of the global mean of the feature map for Y. Fuse Normalization is performed to eliminate global intensity differences; then, the channel dimension variance is calculated and redundant weights are generated using the Softmax function. The smaller the variance, the higher the redundancy of the channel, and the smaller the weight. Finally, the normalized features are multiplied by the redundant weights to achieve adaptive suppression of redundant channels, retaining effective feature channels with high variance, and obtaining the refined feature map Y. refuse Subsequently, local outlier suppression is performed, using an adaptive threshold to filter extreme response features, expressed as: Y opt =Y refuse ·sigmoid(k·(Y refuse -μ local ) / σ local ).
[0063] In the formula, k is the sensitivity coefficient, and μ local σ is the mean of a 3×3 local region. local The standard deviation is the local area of 3×3.
[0064] The first step is to calculate the local mean μ of each pixel in a 3×3 local region. local With standard deviation σ localThe first step involves characterizing the local feature distribution. The second step calculates the deviation of each pixel from the local distribution and multiplies it by a sensitivity coefficient k to adjust the response range. The third step uses a sigmoid function to map the deviation to suppression weights of 0-1, with pixels exhibiting excessive deviation having weights close to 0 and pixels with normal features having weights close to 1. The final step multiplies the refined feature map by the suppression weights to filter out local outliers, resulting in the final optimized feature map Y. opt This ensures that the feature map is complete, effective, and stable, providing high-quality input for subsequent decoding.
[0065] Preferably, a bidirectional CTC decoding algorithm is used to obtain the recognition result, and the process is as follows: Figure 5 As shown, it includes the following steps.
[0066] Step S5.1 employs a bidirectional CTC decoding structure, processing the optimized feature map simultaneously from two directions. Specifically, a forward CTC decoder and a backward CTC decoder are constructed. The forward decoder decodes from the beginning to the end of the feature sequence, focusing on capturing the forward dependencies of the sequence; the backward decoder decodes from the end to the beginning of the feature sequence, focusing on capturing the backward dependencies of the sequence. The two decoders process in parallel, outputting the character forward probability P at each time step. forward (t,c) and backward probability P backward (t,c). Integrating the advantages of bidirectional decoding improves the accuracy of text sequence recognition. The bidirectional probabilities are weighted and fused, expressed as: P fusion (t,c)= μ· P forward (t,c)+(1-μ) · P backward (t,c).
[0067] Set the fusion coefficient μ=0.55. For each character category c at each time step t, add the forward probability and the backward probability according to the weights to obtain the fused probability distribution.
[0068] Step S5.2, Professional Dictionary Constraint Optimization. Since the probability distribution after bidirectional fusion may still contain non-professional character combinations, a professional contact network dictionary needs to be introduced for constraint optimization. Specifically, firstly, all characters within the professional dictionary are assigned a matching score DistScore(c) = 1.0, and meaningless characters outside the dictionary are assigned DistScore(c) = 0.3. This score difference reduces the decoding probability of meaningless character combinations. Then, this score is used to correct the fused decoding probability, and the fusion probability P... fusion Multiplying (t,c) by the dictionary matching score DistScore(c) yields the final decoding probability P. final (t,c), the expression is: P final (t,c)= P fusion(t,c)·DistScore(c).
[0069] Step S5.3, Post-processing Optimization. Post-processing can further optimize issues such as duplicate characters and minor spelling errors. First, consecutive duplicate characters are removed. The decoded text sequence is traversed, and abnormal repetition patterns are filtered based on character frequency statistics. When the number of consecutive identical characters exceeds 3, it is judged as an abnormal repetition, one character is retained, and the remaining duplicate characters are deleted; when the number of consecutive identical characters is ≤2, it is judged as normal, and the original sequence is retained. Second, a correction dictionary is constructed based on common miswriting patterns of catenary terminology. Common miswriting cases of terminology in engineering practice are sorted out, and a key-value pair correction dictionary is constructed; the decoded text sequence is traversed, and if there is content that matches the dictionary key, it is automatically replaced with the corresponding value, further reducing the error rate of terminology. Finally, the final recognition result is output, which includes three parts of information: text content, bounding box coordinates of the text area, and professional category, providing structured data support for intelligent retrieval, parameter extraction, and digital archiving of catenary drawings.
[0070] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A computer vision-based intelligent text recognition method for overhead contact line drawings, characterized in that, Includes the following steps: Step S1: Collect images of overhead contact line construction drawings, obtain professional text information and scene environment features from the drawings, and generate a dataset with text annotations; Step S2: The improved feature extraction network is used to locate and extract text regions from the drawing image to obtain at least one candidate text feature box. Step S3: Based on the Cross-Scale Feature Enhancement Attention Module (CSFEA), multi-scale feature extraction and graphic interference suppression are performed on the candidate text feature boxes to obtain enhanced text features; Step S4: The enhanced text features are modeled with spatial layout association and contact network professional semantic association through the adaptive spatiotemporal semantic association aggregation module ASSCA, and the feature expression is optimized by combining a triple constraint mechanism. Step S5: The optimized features are classified and decoded using a bidirectional CTC decoding algorithm to obtain the text recognition results of the overhead contact line drawing.
2. The intelligent text recognition method for contact wire drawings based on computer vision according to claim 1, characterized in that, In step S1, various drawings and images such as catenary design drawings, construction drawings, and as-built drawings are acquired using a high-definition scanner and an industrial camera; images without serious damage and clearly identifiable are selected, and the bounding box coordinates, text content, and professional category of the text area are labeled; data augmentation processing is performed on the labeled data, including random rotation, scaling, and Gaussian noise addition, to generate training sets, validation sets, and test sets.
3. The intelligent text recognition method for contact wire drawings based on computer vision according to claim 1, characterized in that, Step S2 specifically includes: Step S2.1: Preprocess the drawing image by using adaptive Gaussian filtering to denoise the drawing image, then enhance the text features through a local contrast enhancement algorithm, and finally separate the text from the background through adaptive threshold binarization. Step S2.2: Text region localization is performed based on the improved EAST detector. The improved EAST detector consists of three parts: a feature extraction backbone network, a pixel-level text score prediction branch, and a bounding box regression branch. The feature extraction backbone network extracts multi-channel text features from the preprocessed drawing image. The pixel-level text score prediction branch maps the multi-channel text features into a single-channel text confidence map, and extracts high-probability text regions with confidence scores higher than a threshold from this text confidence map. The bounding box regression branch predicts the core parameters of the rotating rectangle bounding box based on the high-probability text regions, thus obtaining the initial text region containing complete text information. Step S2.3: Multi-scale feature fusion is performed using a pyramid feature fusion network. This network comprises two convolutional layers for the shallow feature layers, two convolutional layers for the deep feature layers, and two pooling layers. First, the feature layers at different scales in the initial text region are normalized using 1×1 convolutions to unify the number of channels in each feature layer to 256 dimensions. Next, the deep feature layers are upsampled using 2×2 transposed convolutions to increase their resolution to match that of the adjacent shallow feature layers. Zero-padding is used during upsampling to maintain feature map size matching. Then, the upsampled deep and shallow features are concatenated and fused. Finally, the fused feature layers are downsampled using max pooling to obtain a multi-scale fused feature map. Step S2.4: Valid text regions are filtered through the Region Generation Network (RPN). Multiple anchor boxes are generated based on the multi-scale fusion feature map. The RPN is used to predict the text and non-text categories of each anchor box and the regression parameters of the bounding box. The category prediction adopts a binary cross-entropy loss optimization model, and the regression parameter prediction adopts a Smooth L1 loss optimization model to improve the regression accuracy of the bounding box. Finally, the corresponding candidate text regions are obtained. Step S2.5: Perform ROI pooling and normalization. Use an adaptive sub-region segmentation strategy to divide each candidate text region into sub-regions of fixed size. Dynamically adjust the boundary coordinates of the sub-regions according to the actual length-width ratio of the text region. Then, perform max pooling on each sub-region and use the maximum value in the sub-region as the key feature. Finally, map the candidate regions of different sizes after max pooling to a fixed-size feature map of 256×64 to obtain standardized text candidate feature boxes.
4. The intelligent text recognition method for contact wire drawings based on computer vision according to claim 1, characterized in that, Step S3 specifically includes: Step S3.1, hierarchical multi-branch convolution feature extraction: For each text candidate feature box, fine-grained feature map, medium-scale feature map and global feature map are extracted respectively through hierarchical multi-branch convolution structure; Step S3.2, Multi-branch feature fusion and dimensionality calibration: The fine-grained feature map, the mesoscale feature map and the global feature map are concatenated along the channel dimension to obtain a preliminary fusion feature map with 256 channels. Then, a 1×1 convolution is used to optimize the channel dimension of the preliminary fusion feature map to obtain a dimension-calibrated feature map. Step S3.3, bidirectional attention optimization and enhanced feature output: the feature map after dimension calibration is calibrated by spatial channel bidirectional attention mechanism, and then the number of channels of the channel-calibrated feature map is further optimized from 192 dimensions to 128 dimensions by 1×1 convolution to obtain the final enhanced text features.
5. The intelligent text recognition method for contact wire drawings based on computer vision according to claim 4, characterized in that, Step S4 specifically includes: Step S4.1, Spatial layout association aggregation, extract the spatial feature vector of each candidate text region, calculate the spatial similarity between any two candidate text regions, generate a dynamic spatial association matrix, aggregate spatial association features based on the GraphSAGE sampling aggregation mechanism, and fuse the enhanced text features of each text region with the enhanced text features of its associated regions based on the dynamic spatial association matrix to generate spatial association features. Step S4.2: Associate and aggregate the professional semantics in the content, construct a professional dictionary and pre-trained vectors, calculate the semantic similarity between each text region feature and term category based on the professional dictionary and pre-trained vectors, generate a semantic similarity matrix, generate a dynamic semantic association matrix after Softmax normalization, and generate semantic association features by combining the semantic weight matrix and enhanced text features. Step S4.3, the enhanced character features Y CSFEA , the spatial correlation features Y Spat , and the semantic correlation features Y Sem are fused by using a residual aggregation strategy and a triple constraint mechanism; and the fused feature map is obtained by directly adding the elements, and the triple constraint mechanism including the character structure constraint, the professional term constraint, and the layout distance constraint is introduced into the fused feature map. Step S4.4, Feature Refinement and Anomaly Suppression: The feature map after fusion and constraint is subjected to feature redundancy removal processing to obtain a refined feature map. Then, the extreme response features of the refined feature map are filtered by adaptive thresholding to suppress local outliers and obtain an optimized feature map.
6. The intelligent text recognition method for contact wire drawings based on computer vision according to claim 1, characterized in that, Step S5 specifically includes: Step S5.1: The optimized feature map is processed using a bidirectional CTC decoding structure. Two decoders, a forward CTC decoder and a backward CTC decoder, are constructed to output the character forward probability and backward probability at each time step. The forward probability and backward probability are added together according to their weights to obtain the fused decoding probability. Step S5.2: Introduce a professional dictionary for constraint optimization. Assign matching scores to all characters according to the professional dictionary. Adjust the fused decoding probability based on the matching scores to obtain the final decoding probability. Step S5.3, post-processing optimization: First, continuous repeating characters are removed by traversing the decoded text sequence and filtering abnormal repeating patterns based on character frequency statistics; second, a correction dictionary is constructed based on common miswriting patterns of contact network professional terms, and the decoded text sequence is further optimized based on the correction dictionary; finally, the final recognition result is output, including text content, bounding box coordinates of text regions, and professional category.