Method, device, processor and readable storage medium for realizing high-precision identification of small inclined character labels for electrical cabinet pressing plate

By using a detection network with multi-scale convolutional feature extraction and attention mechanism, combined with a tilt correction recognition module and model acceleration optimization, the problem of recognition accuracy and robustness of small tilted text labels on the surface of electrical cabinet pressure plates is solved, achieving efficient text recognition and deployment, and supporting automatic information reading by intelligent inspection robots.

CN121600517APending Publication Date: 2026-03-03NANTONG XINTU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511820659.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-04
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Traditional OCR methods struggle to recognize small, tilted text labels on the surface of electrical cabinet pressure plates in complex industrial environments. They suffer from insufficient recognition accuracy, poor robustness, and low deployment efficiency. In particular, when running on resource-constrained edge devices, it is difficult to balance recognition speed and real-time performance.

Method used

A detection network based on multi-scale convolutional feature extraction and attention mechanism is adopted. Combined with geometric orientation perception and structural feature analysis, a tilt correction recognition module and model acceleration optimization strategy are designed. Through network pruning, parameter quantization and operator fusion, adaptive recognition and efficient deployment of tilted text are achieved.

Benefits of technology

It significantly improves the recognition accuracy and robustness in complex industrial scenarios, enhances the stability and deployment efficiency of intelligent inspection robots in recognizing text labels on electrical cabinet pressure plates, and supports automatic information reading and status perception.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121600517A_ABST
    Figure CN121600517A_ABST
Patent Text Reader

Abstract

The invention relates to a method for realizing high-precision identification of fine inclined character labels for an electrical cabinet pressing plate. The method comprises the following steps of executing operations of color normalization, brightness equalization and distortion correction; character area detection is carried out, and a small character label area is automatically positioned; performing multi-scale feature extraction; normal texts and inclined texts are automatically distinguished; performing rotation, affine or perspective transformation; performing digital full-angle to half-angle conversion, character misrecognition correction, fuzzy word normalization, semantic rule replacement and context consistency verification on the output recognition result; and carrying out structure optimization on the trained identification model. According to the method and the device for realizing high-precision identification of the fine inclined character label for the electrical cabinet pressing plate, the processor and the computer readable storage medium thereof, by combining text type classification, geometric correction and a model acceleration optimization strategy, the identification precision, the robustness and the deployment efficiency of a system in a complex industrial scene are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer vision and deep learning, and particularly to the field of industrial intelligent inspection technology. Specifically, it relates to a method, apparatus, processor, and computer-readable storage medium for high-precision recognition of small, tilted text labels on electrical cabinet pressure plates. Background Technology

[0002] In the fields of automated inspection of electrical equipment and industrial visual inspection, OCR has been widely applied to information collection tasks such as electrical cabinets, instrument panels, pipeline markings, and equipment nameplates. However, traditional OCR methods are mostly designed based on natural scenes or document environments, which have significant limitations in complex industrial environments. The text labels on the surface of electrical cabinet pressure plates are usually small in size and densely packed, and are affected by factors such as metal reflection, strong light, dust obstruction, and installation tilt, resulting in blurred character edges, broken strokes, or local deformation in the image, making it difficult to ensure the stability of detection and recognition. In addition, although existing deep learning-based OCR models have high accuracy in standard scenes, they lack robustness to tilted, reflective, and low-contrast text, and are prone to missed detections, false detections, or recognition confusion. Especially when running on resource-constrained edge devices, it is difficult to balance recognition speed and real-time performance. Summary of the Invention

[0003] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method, apparatus, processor and computer-readable storage medium for high-precision recognition of small tilted text labels on electrical cabinet pressure plates, which meets the requirements of high recognition accuracy, good robustness and high deployment efficiency.

[0004] To achieve the above objectives, the present invention provides a method, apparatus, processor, and computer-readable storage medium for high-precision recognition of small, tilted text labels on electrical cabinet pressure plates, as follows: The method for achieving high-precision recognition of small, tilted text labels on electrical cabinet pressure plates is characterized by the following steps: (1) Input electrical cabinet pressure plate image data from the industrial site, and perform color normalization, brightness equalization and distortion correction on the input image; at the same time, perform scale adjustment and noise suppression on the image; (2) Using a detection network based on multi-scale convolution feature extraction and attention mechanism, text region detection is performed on the preprocessed image, and small text label regions are automatically located and candidate boxes are generated; (3) Through geometric orientation perception and structural feature analysis, multi-scale feature extraction is performed on the texture, edge and stroke distribution of the text area; then, CNN is combined to distinguish the text type, automatically distinguishing normal text and slanted text, and the samples are assigned to the corresponding recognition branches according to the classification results, and adaptive recognition processing is performed on different types of text. (4) Call the tilt correction recognition module to rotate, affine or perspective transform the text regions that are classified as tilted or have perspective distortion, so as to normalize the text direction; and decode the characters by combining the convolution feature extraction and recurrent neural network sequence recognition structure with the attention mechanism. (5) Perform operations such as converting full-width numbers to half-width characters, correcting misidentification of characters, normalizing fuzzy characters, replacing semantic rules, and verifying contextual consistency on the output recognition results, and automatically adjust the layout order and table position of the recognized text; (6) The trained recognition model is structurally optimized by using network pruning, parameter quantization and operator fusion.

[0005] Preferably, step (1) specifically includes the following steps: (1.1) The collected electrical cabinet pressure plate images are processed by mean-standard deviation normalization according to the channel, and combined with the adaptive brightness equalization method, the grayscale shift caused by different camera devices under changes in exposure, white balance and lighting conditions is suppressed. (1.2) High-brightness mask detection combined with local guided filtering is used to jointly suppress the reflective areas of the specular surface; (1.3) Radial and tangential distortion corrections are performed based on camera calibration parameters. For the deformation of wide-angle or fisheye lenses at the edge of the field of view, a bidirectional resampling strategy is adopted to avoid image stretching and structural distortion. (1.4) Based on the minimum width of the character strokes, set the reference short side and maintain the aspect ratio for resampling. Use a sliding window slicing method with an overlap rate of 10% to 20% to process the ultra-high resolution samples and record the coordinate mapping relationship. (1.5) Apply nonlocal mean filtering to low-light noise, and use deblocking convolution and mild unsharpening mask to enhance edge sharpness for compressed noise and block effect; (1.6) The image quality is comprehensively evaluated based on three indicators: Laplacian variance, root mean square and exposure. A quality score is generated and low-score samples are labeled with low confidence. The information is retained for offline backtracking and model retraining.

[0006] Preferably, step (2) specifically includes the following steps: (2.1) A detection network that integrates multi-scale convolutional features and attention mechanism is used to perform dense scanning on the preprocessed electrical cabinet pressure plate image; (2.2) The detection output represents the candidate region in the form of a quadrilateral box, and the highly overlapping candidates are filtered by the soft nonmaximum suppression algorithm; (2.3) Combining the row and column layout of the electrical cabinet pressure plate and the prior information on component alignment, perform row and column aggregation operation on adjacent small-sized candidate boxes and remove abnormal areas that deviate significantly from the arrangement pattern; (2.4) When a candidate is detected that crosses a reflective area, is truncated at an edge, or is partially occluded, the frame expansion and re-inspection mechanism is automatically triggered; (2.5) Generate a set of candidate regions for each image that are precisely located, have controllable redundancy, and maintain the row and column structure relationship.

[0007] Preferably, step (3) specifically includes the following steps: (3.1) Extract the geometric and appearance features of the candidate text regions; (3.2) After fusing the two types of features, input them into the classifier to obtain the text type label and its confidence. The classification mechanism adopts a triple discrimination rule of geometric threshold, structural consistency and CNN probability. (3.3) Calculate the structural features of edge direction consistency, stroke connectivity, and aspect ratio, and distinguish normal text from slanted text based on the structural features; (3.4) The credibility of the discrimination results is further improved by using the class probabilities output by the CNN; (3.5) Perform adaptive traffic division based on the classification results, directly sending normal text into the standard recognition path and sending tilted text into the geometric correction recognition path for posture correction; (3.6) If there is uncertainty in the classification result or confidence level, then enable the more robust redundant identification mode; (3.7) Dynamically adjust the batch size and thread concurrency based on the current device load and task branch ratio, and prioritize the processing of skewed text samples with high confidence.

[0008] Preferably, step (4) specifically includes the following steps: (4.1) The initial main direction angle of the candidate text region is estimated by using the minimum bounding rectangle and the main axis of the region. The optimal readable angle is searched in the step range of 0.25° to 1° by fine-grained angle regression. (4.2) Perform perspective discrimination on candidate regions based on edge parallelism, consistency ratio, and quadrilateral deformation; (4.3) If affine distortion is detected, the corresponding affine matrix is ​​solved by corner matching and reprojection error minimization method to perform perspective distortion correction; if only rotation distortion is detected, rotation normalization is performed directly without perspective transformation. (4.4) Geometric transformation is performed using an edge-protected interpolation strategy based on gradient weight graph, directional consistency interpolation, structural tensor constraints, and sub-pixel adaptive sampling; (4.5) For target areas that are extremely small or have blurred edges, perform local magnification by 1.5 to 2 times before recognition, and combine it with deblurring filtering to enhance the clarity of strokes; (4.6) Input the corrected text region into the sequence recognition network; (4.7) In the decoding stage, a form similarity constraint and a language prior scoring mechanism are introduced; (4.8) For recognition results with confidence scores below the preset threshold, a multi-hypothesis verification mechanism is initiated. For the same candidate region, angle fine-tuning, mirror flipping, mild super-resolution and multi-slice strategies are performed to generate several candidate results. The final output is determined based on confidence weighting and language prior consistency voting.

[0009] Preferably, step (5) specifically includes the following steps: (5.1) Perform joint optimization and formatting processing on the character-level and semantic-level recognition results; (5.2) Reconstruct the text matrix based on the spatial coordinates of the candidate boxes, align the recognized text by row from left to right and by column from top to bottom, and fill in the missing cells. (5.3) If there are multiple branches or multiple rounds of recognition results at the same position, the results are optimized and fused by combining the multi-dimensional indicators of the number of non-empty characters, the proportion of overlapping characters, the dictionary validity rate and the template matching score, and a corresponding confidence score is generated for each cell.

[0010] (5.4) Output a structured recognition result table, along with the original image coordinate index.

[0011] Preferably, step (6) specifically includes the following steps: (6.1) Adopt channel-level and structure-level pruning strategies to remove redundant channels and low-contribution convolutional kernels in the network, and maintain the semantic expressive power of the pruned paths through knowledge distillation. (6.2) Quantize the network parameters, compress the weights and activation values ​​from 32-bit floating-point format to FP16 or INT8 low-bit format, and perform fusion optimization on the core convolution, normalization and activation operators; (6.3) During the deployment phase, the optimal batch size, number of concurrent threads and memory reuse strategy are automatically configured according to the characteristics of the target hardware, and the end-to-end latency is evaluated and constrained through online benchmark testing; (6.4) During operation, the input quality score, identification confidence and runtime latency are monitored in real time. When a performance degradation or abnormal state is detected, the system automatically switches to the rollback configuration.

[0012] The device for high-precision recognition of small, tilted text labels on electrical cabinet pressure plates is characterized by the following features: A processor is configured to execute computer-executable instructions; The memory stores one or more computer-executable instructions, which, when executed by the processor, implement the various steps of the method described above for high-precision recognition of small, tilted text labels on electrical cabinet pressure plates.

[0013] The processor for high-precision recognition of small, tilted text labels on electrical cabinet pressure plates is characterized in that the processor is configured to execute computer-executable instructions, which, when executed by the processor, implement the various steps of the method for high-precision recognition of small, tilted text labels on electrical cabinet pressure plates.

[0014] The main feature of this computer-readable storage medium is that it stores a computer program that can be executed by a processor to implement the various steps of the above-described method for high-precision recognition of small, tilted text labels on electrical cabinet pressure plates.

[0015] The present invention employs a method, apparatus, processor, and computer-readable storage medium for high-precision recognition of small, tilted text labels on electrical cabinet pressure plates. Combined with text type classification, geometric correction, and model acceleration optimization strategies, it significantly improves the recognition accuracy, robustness, and deployment efficiency of the system in complex industrial scenarios, providing technical support for intelligent inspection robots to achieve automatic information reading and status perception. Attached Figure Description

[0016] Figure 1 This is a flowchart illustrating the method for achieving high-precision recognition of small, tilted text labels on electrical cabinet pressure plates according to the present invention.

[0017] Figure 2 This is a flowchart illustrating the fine tilt text correction process for the method of achieving high-precision recognition of fine tilted text labels on electrical cabinet pressure plates according to the present invention. Detailed Implementation

[0018] To more clearly describe the technical content of the present invention, the following description is provided in conjunction with specific embodiments.

[0019] The method for high-precision recognition of small, tilted text labels facing the electrical cabinet pressure plate of the present invention includes the following steps: (1) Input electrical cabinet pressure plate image data from the industrial site, and perform color normalization, brightness equalization and distortion correction on the input image; at the same time, perform scale adjustment and noise suppression on the image; (2) Using a detection network based on multi-scale convolution feature extraction and attention mechanism, text region detection is performed on the preprocessed image, and small text label regions are automatically located and candidate boxes are generated; (3) Through geometric orientation perception and structural feature analysis, multi-scale feature extraction is performed on the texture, edge and stroke distribution of the text area; then, CNN is combined to distinguish the text type, automatically distinguishing normal text and slanted text, and the samples are assigned to the corresponding recognition branches according to the classification results, and adaptive recognition processing is performed on different types of text. (4) Call the tilt correction recognition module to rotate, affine or perspective transform the text regions that are classified as tilted or have perspective distortion, so as to normalize the text direction; and decode the characters by combining the convolution feature extraction and recurrent neural network sequence recognition structure with the attention mechanism. (5) Perform operations such as converting full-width numbers to half-width characters, correcting misidentification of characters, normalizing fuzzy characters, replacing semantic rules, and verifying contextual consistency on the output recognition results, and automatically adjust the layout order and table position of the recognized text; (6) The trained recognition model is structurally optimized by using network pruning, parameter quantization and operator fusion.

[0020] In a preferred embodiment of the present invention, step (1) specifically includes the following steps: (1.1) The collected electrical cabinet pressure plate images are processed by mean-standard deviation normalization according to the channel, and combined with the adaptive brightness equalization method, the grayscale shift caused by different camera devices under changes in exposure, white balance and lighting conditions is suppressed. (1.2) High-brightness mask detection combined with local guided filtering is used to jointly suppress the reflective areas of the specular surface; (1.3) Radial and tangential distortion corrections are performed based on camera calibration parameters. For the deformation of wide-angle or fisheye lenses at the edge of the field of view, a bidirectional resampling strategy is adopted to avoid image stretching and structural distortion. (1.4) Based on the minimum width of the character strokes, set the reference short side and maintain the aspect ratio for resampling. Use a sliding window slicing method with an overlap rate of 10% to 20% to process the ultra-high resolution samples and record the coordinate mapping relationship. (1.5) Apply nonlocal mean filtering to low-light noise, and use deblocking convolution and mild unsharpening mask to enhance edge sharpness for compressed noise and block effect; (1.6) The image quality is comprehensively evaluated based on three indicators: Laplacian variance, root mean square and exposure. A quality score is generated and low-score samples are labeled with low confidence. The information is retained for offline backtracking and model retraining.

[0021] In a preferred embodiment of the present invention, step (2) specifically includes the following steps: (2.1) A detection network that integrates multi-scale convolutional features and attention mechanism is used to perform dense scanning on the preprocessed electrical cabinet pressure plate image; (2.2) The detection output represents the candidate region in the form of a quadrilateral box, and the highly overlapping candidates are filtered by the soft nonmaximum suppression algorithm; (2.3) Combining the row and column layout of the electrical cabinet pressure plate and the prior information on component alignment, perform row and column aggregation operation on adjacent small-sized candidate boxes and remove abnormal areas that deviate significantly from the arrangement pattern; (2.4) When a candidate is detected that crosses a reflective area, is truncated at an edge, or is partially occluded, the frame expansion and re-inspection mechanism is automatically triggered; (2.5) Generate a set of candidate regions for each image that are precisely located, have controllable redundancy, and maintain the row and column structure relationship.

[0022] In a preferred embodiment of the present invention, step (3) specifically includes the following steps: (3.1) Extract the geometric and appearance features of the candidate text regions; (3.2) After fusing the two types of features, input them into the classifier to obtain the text type label and its confidence. The classification mechanism adopts a triple discrimination rule of geometric threshold, structural consistency and CNN probability. (3.3) Calculate the structural features of edge direction consistency, stroke connectivity, and aspect ratio, and distinguish normal text from slanted text based on the structural features; (3.4) The credibility of the discrimination results is further improved by using the class probabilities output by the CNN; (3.5) Perform adaptive traffic division based on the classification results, directly sending normal text into the standard recognition path and sending tilted text into the geometric correction recognition path for posture correction; (3.6) If there is uncertainty in the classification result or confidence level, then enable the more robust redundant identification mode; (3.7) Dynamically adjust the batch size and thread concurrency based on the current device load and task branch ratio, and prioritize the processing of skewed text samples with high confidence.

[0023] In a preferred embodiment of the present invention, step (4) specifically includes the following steps: (4.1) The initial main direction angle of the candidate text region is estimated by using the minimum bounding rectangle and the main axis of the region. The optimal readable angle is searched in the step range of 0.25° to 1° by fine-grained angle regression. (4.2) Perform perspective discrimination on candidate regions based on edge parallelism, consistency ratio, and quadrilateral deformation; (4.3) If affine distortion is detected, the corresponding affine matrix is ​​solved by corner matching and reprojection error minimization method to perform perspective distortion correction; if only rotation distortion is detected, rotation normalization is performed directly without perspective transformation. (4.4) Geometric transformation is performed using an edge-protected interpolation strategy based on gradient weight graph, directional consistency interpolation, structural tensor constraints, and sub-pixel adaptive sampling; (4.5) For target areas that are extremely small or have blurred edges, perform local magnification by 1.5 to 2 times before recognition, and combine it with deblurring filtering to enhance the clarity of strokes; (4.6) Input the corrected text region into the sequence recognition network; (4.7) In the decoding stage, a form similarity constraint and a language prior scoring mechanism are introduced; (4.8) For recognition results with confidence scores below the preset threshold, a multi-hypothesis verification mechanism is initiated. For the same candidate region, angle fine-tuning, mirror flipping, mild super-resolution and multi-slice strategies are performed to generate several candidate results. The final output is determined based on confidence weighting and language prior consistency voting.

[0024] In a preferred embodiment of the present invention, step (5) specifically includes the following steps: (5.1) Perform joint optimization and formatting processing on the character-level and semantic-level recognition results; (5.2) Reconstruct the text matrix based on the spatial coordinates of the candidate boxes, align the recognized text by row from left to right and by column from top to bottom, and fill in the missing cells. (5.3) If there are multiple branches or multiple rounds of recognition results at the same position, the results are optimized and fused by combining the multi-dimensional indicators of the number of non-empty characters, the proportion of overlapping characters, the dictionary validity rate and the template matching score, and a corresponding confidence score is generated for each cell.

[0025] (5.4) Output a structured recognition result table, along with the original image coordinate index.

[0026] In a preferred embodiment of the present invention, step (6) specifically includes the following steps: (6.1) Adopt channel-level and structure-level pruning strategies to remove redundant channels and low-contribution convolutional kernels in the network, and maintain the semantic expressive power of the pruned paths through knowledge distillation. (6.2) Quantize the network parameters, compress the weights and activation values ​​from 32-bit floating-point format to FP16 or INT8 low-bit format, and perform fusion optimization on the core convolution, normalization and activation operators; (6.3) During the deployment phase, the optimal batch size, number of concurrent threads and memory reuse strategy are automatically configured according to the characteristics of the target hardware, and the end-to-end latency is evaluated and constrained through online benchmark testing; (6.4) During operation, the input quality score, identification confidence and runtime latency are monitored in real time. When a performance degradation or abnormal state is detected, the system automatically switches to the rollback configuration.

[0027] The present invention relates to a device for high-precision recognition of small, tilted text labels facing an electrical cabinet pressure plate, wherein the device comprises: A processor is configured to execute computer-executable instructions; The memory stores one or more computer-executable instructions, which, when executed by the processor, implement the various steps of the method described above for high-precision recognition of small, tilted text labels on electrical cabinet pressure plates.

[0028] The present invention relates to a processor for high-precision recognition of small, tilted text labels on electrical cabinet pressure plates, wherein the processor is configured to execute computer-executable instructions, and when the computer-executable instructions are executed by the processor, the various steps of the method for high-precision recognition of small, tilted text labels on electrical cabinet pressure plates described above are implemented.

[0029] The computer-readable storage medium of the present invention stores a computer program that can be executed by a processor to implement the various steps of the above-described method for high-precision recognition of small, tilted text labels facing electrical cabinet pressure plates.

[0030] This invention relates to the fields of computer vision, deep learning, and industrial intelligent inspection technology, with a particular focus on the text recognition and status perception problems of industrial inspection robots in complex electrical environments. Through a multi-stage adaptive recognition framework, the text detection and recognition performance of the system is optimized under complex conditions such as reflective metal surfaces, uneven lighting, local tilt, and extremely small font sizes. This technology aims to solve the problems of insufficient recognition accuracy, poor robustness to tilted text, and low deployment efficiency of edge devices in industrial scenarios by traditional optical character recognition (OCR) methods, thereby significantly improving the stability and intelligence level of electrical cabinet pressure plate text label recognition systems in complex industrial environments.

[0031] This invention aims to propose a high-precision recognition method for small, tilted text labels on electrical cabinet pressure plates. This method addresses the issues of decreased recognition accuracy and insufficient robustness in industrial inspection scenarios caused by factors such as small text area size, tilted installation, surface reflection, and uneven lighting. The method aims to enhance the text perception and information collection capabilities of intelligent inspection robots in industrial settings, significantly improving the automation and reliability of electrical equipment label reading, and providing efficient and deployable technical support for industrial visual inspection and equipment condition monitoring.

[0032] This invention discloses a high-precision recognition method for small, tilted text labels facing electrical cabinet pressure plates, which is used to solve the problem of decreased recognition accuracy caused by factors such as local tilt of the text area, high surface reflectivity, small font size and complex background in industrial sites.

[0033] This method constructs a multi-stage adaptive recognition framework consisting of text type classification, tilted text correction and recognition, and model acceleration optimization. First, a text type adaptive classification mechanism based on geometric orientation perception and structural feature analysis is designed. Multi-scale texture feature extraction and a lightweight convolutional neural network (CNN) are used to group and classify the text label regions in the input image, automatically distinguishing between normal and tilted text, providing differentiated processing paths for subsequent recognition modules. Second, for tilted and perspective-distorted text regions, a correction recognition module integrating geometric constraints and angle regression correction is designed. Combining local edge features and deep semantic information, it automatically rotates, aligns, and enhances the text regions, significantly improving the character recognition accuracy of slightly tilted fonts under complex lighting conditions. Finally, a recognition model acceleration module is constructed. Through structural optimization strategies such as network pruning, parameter quantization, and operator fusion, the model is efficiently deployed and inferred in real-time on embedded and edge computing platforms. This method achieves fast, stable, and high-precision recognition of tilted text labels on electrical cabinet pressure plates, effectively supporting automatic reading of electrical equipment markings and visual inspection and information-based operation and maintenance applications in the field of intelligent manufacturing.

[0034] 1. In a specific embodiment of the present invention, a high-precision recognition method for small, tilted text labels facing an electrical cabinet pressure plate is disclosed, specifically including the following steps: Step S1: Input image data of electrical cabinet pressure plate from the industrial site, and perform operations such as color normalization, brightness equalization and distortion correction on the input image; at the same time, perform scale adjustment and noise suppression on the image.

[0035] Step S2: Using a detection network based on multi-scale convolutional feature extraction and attention mechanism, text region detection is performed on the preprocessed image, automatically locating small text label regions and generating candidate boxes.

[0036] Step S3: Through geometric orientation perception and structural feature analysis, multi-scale feature extraction is performed on the texture, edges, and stroke distribution of the text region; then, CNN is used to determine the text type, automatically distinguishing between normal text and slanted text. Based on the classification results, samples are assigned to the corresponding recognition branches to achieve adaptive recognition processing for different types of text.

[0037] Step S4: Call the tilt correction recognition module to rotate, affine or perspective transform the text regions classified as tilted or with perspective distortion to normalize the text direction; and complete character decoding by combining convolutional feature extraction and recurrent neural network (RNN) sequence recognition structure with attention mechanism.

[0038] Step S5: Perform operations such as converting full-width numbers to half-width characters, correcting misidentified characters, normalizing fuzzy characters, replacing semantic rules, and verifying contextual consistency on the output recognition results. Automatically adjust the layout order and table position of the recognized text to achieve row and column alignment and format standardization of the results.

[0039] Step S6: Optimize the structure of the trained recognition model using techniques such as network pruning, parameter quantization, and operator fusion to reduce the number of model parameters and computational latency.

[0040] 2. In step S1, the acquired electrical cabinet pressure plate image is first processed by mean-standard deviation normalization according to the channel, and combined with the adaptive brightness equalization method (CLAHE) to suppress grayscale shifts caused by changes in exposure, white balance, and lighting conditions of different camera devices, ensuring the stability and consistency of the brightness distribution of the input image; high-brightness mask detection combined with local guided filtering is used to jointly suppress specular reflection areas, effectively reducing the phenomenon of stroke submersion or breakage caused by highlight areas; then, radial and tangential distortion correction is performed according to the camera calibration parameters. For the deformation caused by wide-angle or fisheye lenses at the edge of the field of view, a bidirectional resampling strategy is adopted to avoid image stretching and structural distortion; to unify the subsequent inference scale, the minimum width of the character strokes is set. Resampling is performed on the baseline short side while maintaining the aspect ratio. For ultra-high resolution samples, a sliding window slicing method with an overlap rate of 10% to 20% is used to process and record the coordinate mapping relationship to ensure the complete presentation of small characters and subsequent backfill restoration. Non-local mean filtering (NLM) is applied to low-light noise, and deblocking convolution and mild unsharpened mask (USM) are used to enhance edge sharpness to reduce compression noise and block effects, thereby improving the discernibility of stroke details. Finally, the image quality is comprehensively evaluated based on three indicators: Laplacian variance, root mean square (RMS), and exposure. A quality score is generated, and low-scoring samples are labeled with low confidence to automatically trigger more robust processing strategies in subsequent recognition stages. This information is also retained for offline backtracking and model retraining.

[0041] In step S1, the acquired electrical cabinet pressure plate images are first normalized by mean-standard deviation according to the channels: ; in, Represents the first input image One color channel; This represents the normalized channel; and These represent the mean and standard deviation of the RGB channels, respectively.

[0042] Combined with CLAHE, this suppresses grayscale shifts caused by variations in exposure, white balance, and lighting conditions across different camera devices. ; ; in, Represents the pixel value of the image's luminance channel; Represents the grayscale histogram within the sub-block; Indicates the amplitude limiting threshold; Represents the normalized cumulative distribution function; This represents the luminance channel image after CLAHE processing.

[0043] High-brightness mask detection combined with local guided filtering is used to jointly suppress reflective areas. ; ; ; in, This represents the highlight mask function; , These represent brightness and gradient threshold, respectively. This represents a guide diagram; Indicates a partial window; and These represent the local mean and variance of the guide plot, respectively. Represents a regular constant; Represents local linear coefficients; Indicates the filtered output; This indicates the number of pixels in the image after reflection suppression processing. The brightness value at that location.

[0044] Then, radial and tangential distortion corrections were performed based on the camera calibration parameters: ; ; ; ; in, Represents the intrinsic parameter matrix; Indicates focal length; Indicates the coordinates of the principal point; Represents homogeneous pixel coordinates; Represents the normalized coordinates of pixels during projection and back projection; Represents a normalized plane point; Indicates the radial distortion coefficient; Indicates the tangential distortion coefficient; Indicates the reverse mapping query position; This represents the corrected image.

[0045] For the deformation caused by wide-angle or fisheye lenses at the edge of the field of view, a bidirectional resampling strategy is adopted to avoid image stretching and structural distortion. ; in, Indicates forward raster interpolation. Indicates backsampling interpolation; This represents the image after bidirectional resampling.

[0046] Based on the minimum width of the character strokes, a baseline short side is set while maintaining the aspect ratio for resampling. Ultra-high resolution samples are processed using a sliding window slicing method with a 10%–20% overlap rate, and the coordinate mapping relationship is recorded. ; ; , ; in, This indicates the height and width of the original image; Indicates the reference short side; Indicates the scaling ratio; Indicates the first A sliding window area; Indicates the window width and window height; This indicates the overlap rate (10%-20%). Indicates the step size; This represents an affine mapping from slice coordinates to scaled full-image coordinates; This indicates the coordinates of the pixel within the original, complete image.

[0047] Applying NLM to low-light noise: ; in, Indicated by Centered on, size is The patch vector; Indicates the smoothing parameter; Represents the normalization constant; Represents the pixel coordinates traversed across the entire image domain; Indicates the pixel after NLM The denoising results at the location.

[0048] Deblocking convolution and unsharp membrane (USM) are used to enhance edge sharpness to address compression noise and blockiness. ; ; in, Deblocking convolution; Standard deviation is Gaussian kernel; Indicates the sharpening intensity; This represents the image output by the deblocked convolutional neural network; This indicates the image after USM processing.

[0049] Finally, the image quality was comprehensively evaluated based on three indicators: Laplacian variance, RMS, and exposure. ; ; ; in, Represents the Laplace operator; This represents the mean of the entire graph; Indicates the upper and lower thresholds of exposure; Indicates the Laplace variance; Indicates the mean squared error. Indicates exposure level.

[0050] 3. In step S2, a detection network integrating multi-scale convolutional features and an attention mechanism is used to perform dense scanning on the preprocessed electrical cabinet pressure plate image. This detection network uses a feature pyramid structure built from top to bottom and with horizontal connections to fuse high-level semantic features with low-level edge details, thereby achieving accurate separation of small text regions in complex industrial backgrounds. The detection output represents candidate regions in the form of quadrilateral boxes, and highly overlapping candidates are filtered using the Soft Non-Maximum Suppression (Soft-NMS) algorithm; the Intersection over Union (IoU) and confidence threshold can be adaptively adjusted according to different scenarios to balance recall and precision. Combining the row and column layout of the electrical cabinet pressure plate and prior information on component alignment, row and column aggregation operations are performed on adjacent small-sized candidate boxes, and abnormal regions that deviate significantly from the arrangement pattern are removed. When a candidate that crosses a reflective area, has an edge truncation, or is partially occluded is detected, an automatic box expansion and re-inspection mechanism is triggered, that is, a second detection is performed after expanding outward by 2-5 pixels along the main direction of the text to compensate for missed detections caused by occlusion or reflection. After processing, each image can generate a set of candidate regions that are precisely located, have controllable redundancy, and maintain row and column structure relationships, providing a stable and reliable input for subsequent text classification and recognition.

[0051] In step S2, a detection network that integrates multi-scale convolutional features and an attention mechanism is used to perform dense scanning on the preprocessed electrical cabinet pressure plate image: ; ; ; in, The first term of the backbone network Layer feature map; This represents the feature pyramid layer after fusion through top-down and lateral connections; Up Indicates an upsampling operation; Indicates global average pooling; Represents the Sigmoid function; Indicates channel attention weights; Features indicating enhanced attention; This indicates the detection head module, which outputs the confidence level for each anchor point. With regression quantity ; The bounding box decoding function returns the center coordinates. Width and height and rotation angle ; This represents the features after processing by the detection network.

[0052] And the Soft Nonmaximum Suppression (Soft-NMS) algorithm is used to filter highly overlapping candidates, that is, when Filtering is performed at that time: ; in, Indicates the intersection-union ratio between candidate boxes; This represents the Gaussian decay parameter; Indicates the confidence level retention threshold; This represents the candidate box confidence score used in the Soft-NMS algorithm.

[0053] Based on the row-column layout of the electrical cabinet pressure plate and prior information on component alignment, perform row-column aggregation operations on adjacent small-sized candidate frames: ; ; ; in, Indicates the parameters of the candidate box; Distance threshold indicating row and column directions; Indicates the angle difference threshold; Indicates the height-width similarity threshold; Represents the set of similar edges; Indicates connected components; This indicates merging using the smallest bounding rectangle. These represent the row-direction similarity and column-direction similarity between candidate boxes, respectively. This indicates the merging of rows and columns after aggregation.

[0054] When a candidate is detected that crosses a reflective area, has an edge truncation, or is partially occluded, an automatic bounding box expansion re-inspection is triggered on the area that crosses the reflective area, has an edge truncation, or is partially occluded. ; ; in, Indicates a mask for reflective areas; Indicates the masking area; Indicates image boundaries; This indicates three types of trigger thresholds; Indicates the expansion step size; This represents the expanded candidate box.

[0055] Ultimately, each image can generate a set of candidate regions that are precisely located, have manageable redundancy, and maintain their row and column structure relationships. ; ; in, Indicates the maximum overlap threshold; This represents a graph showing the row and column relationships of the candidate boxes. Represents the set of edges connecting rows and columns; This represents the final set of candidate regions.

[0056] 4. In step S3, geometric and appearance features of candidate text regions are extracted. Geometric features include statistical information such as principal orientation angle, stroke direction histogram (HOG), edge gradient strength, endpoint connectivity (CONN), aspect ratio (AR), rectangularity, and region tilt angle, used to describe the overall structure and arrangement direction of the text. Appearance features consist of multi-scale texture and local contrast information extracted by CNN, used to characterize the surface details and printing features of the font. The two types of features are fused and input into the classifier to obtain the text type label and its confidence score. The classification mechanism adopts a triple discrimination rule of geometric threshold, structural consistency, and CNN probability: First, the principal orientation angle of the candidate text region is used as the initial judgment criterion. When the principal orientation angle is within 3°, it is considered normal text; when the principal orientation angle is greater than 3°, it is considered slanted text. Subsequently, structural features such as edge orientation consistency, stroke connectivity, and aspect ratio are further calculated. Regions with high edge orientation consistency and good stroke connectivity are generally considered normal text, while regions with obvious structural changes or unstable edge orientations are judged as slanted text. Meanwhile, the confidence of the discrimination results is further enhanced by the class probabilities output by the CNN. When the probability of normal text or skewed text in the CNN is higher than the preset confidence threshold, this probability is used to strengthen the stability and accuracy of the final classification result. Subsequently, adaptive routing is performed based on the classification result: normal text directly enters the standard recognition path to avoid unnecessary geometric transformations; skewed text enters the geometric correction recognition path for pose correction. When there is uncertainty in the classification result or confidence, a more robust redundant recognition mode is activated to ensure the integrity and accuracy of the recognition result. At the same time, the batch size and thread concurrency are dynamically adjusted according to the current device load and task branch ratio, prioritizing the processing of high-confidence skewed text samples, thereby effectively reducing the overall recognition latency and improving the system's operating efficiency.

[0057] In step S3, the geometric and appearance features of the candidate text regions are extracted: ; ; ; ; ; ; in, These represent the sum of the squared values ​​of the horizontal and vertical gradients of all pixels within the region, respectively. This represents the sum of the gradient products of all pixels within the region; Represents gradient components; Indicates the gradient direction; Indicates the first One directional interval; Indicates the gradient magnitude; Indicates the normalization factor; Indicates the number of pixels in the region; Indicates the degree of a node; These represent the width and height of the minimum bounding rectangle of the candidate region, respectively. Indicates the pixel area of ​​the region; This represents the first principal eigenvector; Indicates the principal direction angle; Indicates HOG; Indicates the edge gradient intensity; Indicates CONN; Indicates AR; Indicates rectangularity; Indicates the dip angle of the region; This represents the selected set of pyramid layers; For interlayer; Representing geometric features; Describes appearance characteristics.

[0058] The two types of features are fused and then input into the classifier to obtain the text type label and its confidence score: ; ; in, This represents a normalized vector after applying zero mean and unit variance to each component. This represents the linear response vector output by the classifier. This represents the input feature vector; Indicates the weights for merging geometry and appearance; Indicates the parameters of a linear classifier; Represents the probability of classifying text as either normal or italic. Indicates the label category; Indicates the confidence level.

[0059] A three-dimensional joint discrimination framework based on geometric orientation features, structural consistency features, and appearance probabilities from a convolutional neural network is adopted. Subsequently, adaptive triage is performed based on the classification results: normal text enters the standard recognition path, while skewed text enters the geometric correction recognition path. When there is uncertainty in the classification results or confidence levels, a more robust redundant recognition mode is activated. ; in, Indicates uncertainty; Represents entropy; This indicates an uncertain trigger threshold. Simultaneously, the batch size and thread concurrency are dynamically adjusted based on the current device load and task branch ratio. ; ; in, Indicates the real-time load factor of the equipment; Indicates the length of the branch queue; Indicates scheduling weight; These are the upper and lower limits for batch size; Indicates the maximum number of available threads; This indicates that the value is restricted to a range; Indicates in branch Dynamic batch size; Indicates in branch The number of concurrent threads.

[0060] 5. In step S4, the initial principal orientation angle of the candidate text region is first estimated by jointly using the minimum bounding rectangle and the principal axis of the region. Then, the optimal readable angle is searched within a step range of 0.25° to 1° through fine-grained angle regression to achieve high-precision rotation correction. Subsequently, the candidate region is subjected to perspective discrimination based on edge parallelism, consistency ratio, and quadrilateral deformation. If affine distortion is detected, the corresponding affine matrix is ​​solved by corner matching and reprojection error minimization methods to complete perspective distortion correction. For samples with only rotation distortion, rotation normalization is directly performed without perspective transformation. To avoid stroke breaks or jagged artifacts during geometric resampling, all geometric transformations employ an edge-protected interpolation strategy based on gradient weight maps, directional consistency interpolation, structural tensor constraints, and subpixel adaptive sampling. First, an edge weight map is constructed based on gradient intensity to strengthen edge pixels. Then, directional consistency interpolation is performed according to the local stroke direction to ensure the interpolation direction aligns with the stroke direction. Next, the structural continuity of the stroke region is maintained through a local structural tensor. Finally, directional interpolation and bilinear interpolation are applied to the edge and background regions respectively to achieve subpixel-level texture fidelity. For extremely small or blurred target regions, a 1.5–2x local magnification is performed before recognition, combined with deblurring filtering to enhance stroke clarity. The corrected text region is input into a sequence recognition network. The network's core structure consists of a front-end convolutional feature encoder and a back-end sequence decoder. The sequence part uses a bidirectional RNN combined with an attention mechanism to achieve character-level recognition. In the decoding stage, similarity constraints and a language prior scoring mechanism are introduced to effectively reduce the probability of misrecognition of easily confused characters. For recognition results with confidence scores below a preset threshold, a multi-hypothesis verification mechanism is activated. For the same candidate region, angle fine-tuning, mirror flipping, mild super-resolution, and multi-slice strategies are performed to generate several candidate results. The final output is determined based on confidence weighting and language prior consistency voting. This enables stable and reproducible recognition performance under complex imaging conditions such as strong reflection, low contrast, and slight blur.

[0061] In step S4, the initial principal orientation angle of the candidate text region is first estimated by jointly using the minimum bounding rectangle and the principal axis of the region: ; ; in, Indicates the candidate text region; Represents the minimum bounding rectangle; Indicates the orientation angle of the smallest bounding rectangle; This represents the first principal eigenvector of the regional covariance matrix; Indicates the principal axis direction angle; This represents the weighting coefficient between the two estimates; This represents the initial principal direction angle.

[0062] And by using fine-grained angle regression, the optimal readable angle is searched in increments of 0.25° to 1°: ; ; in, Indicates angular step; Indicates the search scope; Indicates image rotation The horizontal projection histogram. Indicates the projection variance; This represents the average gradient intensity after rotation; This indicates the obtained confidence level; Indicates the weighting parameter; Represents the angle score function; This indicates the optimal readable angle.

[0063] Subsequently, the candidate regions were subjected to perspective discrimination based on edge parallelism, consistency ratio, and quadrilateral deformation: ; ; in, Indicates the boundary of a quadrilateral; Represents the sides of a quadrilateral; Indicates the direction angle of each side; Indicates the side length; Used to measure the degree of violation of the parallelism of opposite sides; Used to measure the degree of inconsistency in the lengths of opposite sides; Used to measure how much a quadrilateral deviates from a rectangle; Indicates the threshold; Indicates perspective or non-perspective.

[0064] If affine distortion is detected, the corresponding affine matrix is ​​solved using corner matching and reprojection error minimization methods: ; in, Represents the homogeneous coordinates of the source point. Represents the target ideal grid points; This represents the affine transformation matrix.

[0065] For samples that only exhibit rotation distortion, rotation normalization is performed directly: ; in, Indicates the optimal angle Rotation alignment operator; This represents the rotation normalization result. To avoid stroke breaks or jagged artifacts during geometric resampling, all geometric transformations employ an edge-protected interpolation strategy based on gradient weight maps, orientation consistency interpolation, structural tensor constraints, and sub-pixel adaptive sampling. ; ; in, Represents the edge weight graph; Represents the unit vector of stroke direction; Indicates the sampling step size; This indicates a minimum quantity that prevents the denominator from being zero. This represents standard bilinear interpolation; Indicates the edge detection switch; This represents the directional consistency interpolation value for the edge region; This represents the pixel value ultimately used after geometric transformation.

[0066] For target areas that are extremely small or have blurred edges, local magnification of 1.5 to 2.0 times is performed before recognition, combined with deblurring filtering: ; ; in, Indicates magnification factor Upsampling; Indicates fuzzy observation; Represents a fuzzy kernel (such as Gaussian); TV Indicates total variation regularity; Indicates regular expression rights; This indicates the result of deblurring; This represents a high-resolution image patch after local magnification.

[0067] The corrected text region is input into the sequence recognition network. The network has a core structure of a front-end convolutional feature encoder and a back-end sequence decoder. The sequence part uses a bidirectional RNN combined with an attention mechanism to achieve character-level recognition. ; ; ; in, Indicates the image block that enters the recognition process; Indicates the output feature sequence; Indicates a context-hidden sequence; Indicates attention weight; Represents the context vector; Indicates the decoding status of the previous step; Indicates the current character distribution; This represents the t-th character output. This represents all character sequences generated before time t; This represents the optimal character sequence.

[0068] In the decoding phase, a similarity constraint and a priori language scoring mechanism are introduced: ; in, Represents the probability of the language model; Represents a set of easily confused character pairs; Indicates weight; This indicates a fusion scoring system.

[0069] For recognition results with a confidence level below a preset threshold, a multi-hypothesis verification mechanism is activated. This mechanism performs angle fine-tuning, mirror flipping, mild super-resolution, and multi-fragmentation strategies on the same candidate region to generate several candidate results. The final output is determined based on a consistency vote between confidence level weighting and language prior. ; ; ; in, Represents the set of enhancement transformations; Indicates fine-tuning of the angle; Indicates magnification, Indicates different cut pieces; Indicates the first Type of transformation; This represents the corresponding decoding result and fusion score; Indicates the voting gain coefficient; This indicates the final output.

[0070] 6. In step S5, the character-level and semantic-level recognition results are jointly optimized and formatted. At the character level, full-width to half-width conversion of numbers, standardization of letter case, and standardization of spaces and hyphens are performed. Simultaneously, preset obfuscated characters are used for automatic replacement and correction to correct common errors that occur during the recognition process. At the semantic level, based on industry-specific lexicons and regularization templates, the content such as equipment names, numbers, units, and symbols is standardized to ensure consistent text descriptions and uniform formatting within the same equipment area. Subsequently, the text matrix is ​​reconstructed based on the spatial coordinates of the candidate boxes. The recognized text is aligned row-by-row from left to right and column-by-column from top to bottom, and missing cells are filled in to fit the actual electrical cabinet pressure plate arrangement. When multiple branches or multiple rounds of recognition results exist at the same location, the results are optimized and fused by comprehensively considering multiple dimensions such as the number of non-empty characters, the proportion of overlapping characters, dictionary validity rate, and template matching score, and a corresponding confidence score is generated for each cell. Finally, a structured recognition result table is output, along with an index of the original image coordinates, to facilitate subsequent data auditing, result traceability, and interface integration with other systems.

[0071] In step S5, the character-level and semantic-level recognition results are jointly optimized and formatted: ; ; ; in, Indicates the first One identification character; Represents the normalized mapping function; Indicates letter capitalization conversion; This indicates replacement based on the mapping table; Represents a vocabulary list; This indicates the probability output by the recognition network; This indicates the score for the appropriateness of the regular expression template; This indicates the result after optimization and formatting.

[0072] Subsequently, the text matrix is ​​reconstructed based on the spatial coordinates of the candidate boxes. The recognized text is then aligned row by row from left to right and column by column from top to bottom, and missing cells are filled in as placeholders. ; ; in, Indicates the coordinates of the candidate box center; These represent the average row height and column width, respectively. These represent row and column indices, respectively. Represents the reconstructed two-dimensional text matrix; This represents a placeholder used to fill in missing cells.

[0073] The results are optimized and integrated by combining multiple dimensions such as the number of non-empty characters, the proportion of overlapping characters, the dictionary validity rate, and the template matching score, and a corresponding confidence score is generated for each cell. ; in, This represents the overall score of the candidate results; Indicates the number of non-empty characters; Indicates the proportion of overlapping characters; Indicates the dictionary validity rate; Indicates the template matching score; Indicates the weighting coefficient; This indicates the confidence level at the cell level.

[0074] Finally, a structured recognition result table is output, along with the original image coordinate index.

[0075] 7. In step S6, after model training is complete, lightweighting and inference acceleration optimizations are performed on the detection, classification, and recognition networks. First, channel-level and structure-level pruning strategies are adopted to remove redundant channels and low-contribution convolutional kernels from the network. Knowledge distillation is used to maintain the semantic expressive power of the pruned paths, thereby reducing the number of parameters while maintaining model performance stability. Subsequently, network parameters are quantized, compressing weights and activation values ​​from 32-bit floating-point format to FP16 or INT8 low-bit format. Fusion optimization is implemented on core convolutions, normalization, and activation operators to reduce intermediate tensor read / write and function call overhead, improving the overall computational efficiency of the model during the inference stage. During deployment, the optimal batch size, thread concurrency, and memory reuse strategy are automatically configured based on the characteristics of the target hardware to reduce peak GPU memory usage and increase inference throughput. End-to-end latency is evaluated and constrained through online benchmark testing to keep the processing time of a single image within a preset range, while ensuring that the average power consumption is within the device's thermal design limits. During operation, the system monitors indicators such as input quality score, recognition confidence level, and runtime latency in real time. When a performance degradation or abnormal state is detected, it automatically switches to the rollback configuration to ensure continuous high reliability and stable operation in complex industrial environments.

[0076] In step S6, after the model training is complete, lightweight optimization and inference acceleration are performed on the detection, classification, and recognition networks. First, channel-level and structure-level pruning strategies are used to remove redundant channels and low-contribution convolutional kernels from the network: ; ; in, This indicates the loss of the original task; Indicates the first Layer channel scaling factor; Indicates the pruning regularization weight; This indicates the total loss during the pruning stage; Indicates the pruning threshold; Indicates a channel mask; Represents the convolution kernel weight tensor; This represents channel-by-channel multiplication; This represents the new weight tensor after pruning.

[0077] And the semantic expressiveness of the pruned path is preserved through knowledge distillation: ; in, This represents the cross-entropy loss of the student network; These represent the unnormalized probabilities output by the student model and the teacher model, respectively. This represents the temperature parameter (usually 2-5). Indicates distillation weight; Indicates the Kullback-Leibler divergence; This refers to knowledge distillation.

[0078] Subsequently, the network parameters are quantized, compressing the weights and activation values ​​from 32-bit floating-point format to FP16 or INT8 low-bit format: ; ; in, Indicates floating-point weights and activation; This represents the quantized value; Indicates the quantization bit width, Indicates FP16, Indicates INT8; Indicates the quantization step size.

[0079] Furthermore, fusion optimizations were performed on the core convolution, normalization, and activation operators: ; ; in, Convolution represents weights and biases; These represent the mean, variance, scaling, and offset of BatchNorm, respectively. Input features; This represents the convolution operation; Represents the numerical stability constant; Indicates the activation function; The representation layer outputs tensors.

[0080] During the deployment phase, the optimal batch size, thread concurrency, and memory reuse strategy are automatically configured based on the characteristics of the target hardware, and end-to-end latency is evaluated and constrained through online benchmark testing. ; in; Indicates the average inference delay; Indicates the upper limit of the target delay; Indicates the weight of the delay penalty; This represents the total loss. During operation, metrics such as input quality score, recognition confidence level, and runtime latency are monitored in real time. When performance degradation or abnormal conditions are detected, the system automatically switches to a rollback configuration.

[0081] This invention not only introduces text type adaptive classification, fine-grained angle regression, perspective distortion discrimination, and edge-preserving interpolation strategies, but also constructs an automated arrangement and reconstruction mechanism based on an industrial matrix structure. Furthermore, it achieves real-time deployment optimization of edge devices through model pruning, quantization, and operator fusion techniques. These key features are all proposed to address the unique problems in the scenario of small, tilted text in industrial electrical cabinets, possessing specificity, irreplaceability, and goal independence.

[0082] This invention introduces a text type adaptive classification mechanism based on geometric orientation perception and structural feature analysis, which can automatically determine whether there is tilt, perspective, or structural deformation in the text region, thereby diverting the text to different recognition branches. This invention also proposes a high-precision geometric correction method for fine-grained angle regression and perspective distortion discrimination, which can search for the optimal readable angle within a step size range of 0.25° to 1°, and actively determine whether perspective correction is needed through edge parallelism, consistency ratio, and quadrilateral deformation. In addition, this invention also proposes an edge protection interpolation strategy, an industrial layout reconstruction mechanism, and a model acceleration module for edge devices.

[0083] The text classification mechanism of this invention is based on a joint discriminative framework of geometric orientation features, structural consistency features, and appearance probabilities from a convolutional neural network. First, the principal orientation angle of candidate text regions is used as an initial judgment criterion. Text with a principal orientation angle within 3° is considered normal text, while text with a principal orientation angle greater than 3° is considered slanted text. Subsequently, structural features such as edge orientation consistency, stroke connectivity, and aspect ratio are further calculated. Regions with high edge orientation consistency and good stroke connectivity are generally considered normal text, while regions with significant structural changes or unstable edge orientations are classified as slanted text. Finally, multi-scale texture details are extracted using a CNN, and the class probabilities of normal and slanted text are output. When the probability of normal or slanted text exceeds a preset threshold, it can be directly used as the final classification result; when the probabilities of the two classes are close and neither reaches the threshold, a redundant recognition mode is entered to improve classification reliability. The entire classification process does not rely on a single feature but obtains stable classification results through a comprehensive judgment of geometric, structural, and texture information, adapting to the complex conditions commonly found in industrial electrical cabinet pressure plates, such as slight tilting, small fonts, weak edges, and high reflectivity.

[0084] For candidate regions classified as tilted text, this invention achieves precise activation and control between the classification module and the correction and recognition module through a unified data structure and task queue. At the end of step S3, the system assigns a unique ID to each candidate text region and records its coordinate frame, principal orientation angle, structural consistency index, and class probability output by the CNN in the original image. This information is encapsulated into a structured record containing the region ID, coordinates, classification label, and confidence score. When the classification result is tilted text and the geometry, structure, and CNN confidence score meet preset conditions, the classification module sets the flag indicating whether geometric correction is needed in the record to true and writes it into the correction task queue. The scheduling logic then calls the tilt correction and recognition module in the queue order. After activation, the correction module extracts the corresponding text sub-image from the original image based on the input region ID and coordinate information. It then reads the initial main orientation angle and other auxiliary features provided by the classification module and performs geometric correction operations such as fine-grained angle regression, perspective distortion discrimination, and edge protection interpolation to obtain a text image with normalized orientation. The correction result with the same ID is then sent to the backend sequence recognition network for character recognition, achieving closed-loop processing of "classification-correction-recognition" in the same data channel. For samples with low classification confidence or geometric conditions inconsistent with the CNN probability, the classification module additionally marks them as uncertain in the record. After reading this mark, the correction module automatically activates redundant strategies such as multi-angle fine-tuning and multi-cropping, thereby achieving fine-grained and on-demand correction, recognition activation, and control of tilted text samples without changing the overall framework.

[0085] The edge-preserving interpolation strategy proposed in this invention ensures that small text does not exhibit stroke breaks during geometric transformations through a four-layer structure: gradient weight map, directional consistency interpolation, structural tensor constraints, and sub-pixel adaptive sampling. First, edge gradient strength is calculated based on the Sobel operator to construct an edge weight map, increasing the importance of edge pixels during interpolation. Then, a directional consistency interpolation model is established using local gradient directions, ensuring the interpolation direction follows the stroke direction rather than the perpendicular direction, thus maintaining stroke continuity. Next, structural consistency within the neighborhood is constrained through local structural tensors to avoid edge distortion caused by rotation and perspective transformations. Finally, bilinear interpolation is automatically selected based on edge strength during actual sampling, achieving sub-pixel-level fine sampling. This multi-layer interpolation strategy effectively suppresses stroke breaks in small characters on industrial electrical cabinets during rotation, affine transformation, or perspective correction.

[0086] For the specific implementation scheme of this embodiment, please refer to the relevant descriptions in the above embodiments, which will not be repeated here.

[0087] It is understood that the same or similar parts in the above embodiments can be referred to each other, and the contents not described in detail in some embodiments can be referred to the same or similar contents in other embodiments.

[0088] It should be noted that in the description of this invention, the terms "first," "second," etc., are used for descriptive purposes only and should not be construed as indicating or implying relative importance. Furthermore, in the description of this invention, unless otherwise stated, "a plurality of" means at least two.

[0089] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.

[0090] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution device. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0091] Those skilled in the art will understand that all or part of the steps of the methods in the above embodiments can be implemented by a program instructing related hardware. The corresponding program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.

[0092] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0093] The storage media mentioned above can be read-only memory, disk, or optical disk, etc.

[0094] In the description of this specification, references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0095] The present invention employs a method, apparatus, processor, and computer-readable storage medium for high-precision recognition of small, tilted text labels on electrical cabinet pressure plates. Combined with text type classification, geometric correction, and model acceleration optimization strategies, it significantly improves the recognition accuracy, robustness, and deployment efficiency of the system in complex industrial scenarios, providing technical support for intelligent inspection robots to achieve automatic information reading and status perception.

[0096] In this specification, the invention has been described with reference to specific embodiments thereof. However, it will be apparent that various modifications and variations can be made without departing from the spirit and scope of the invention. Therefore, the specification and drawings should be considered illustrative rather than restrictive.

Claims

1. A method for high-precision recognition of small, tilted text labels on electrical cabinet pressure plates, characterized in that, The method includes the following steps: (1) Input electrical cabinet pressure plate image data from the industrial site, and perform color normalization, brightness equalization and distortion correction on the input image; at the same time, perform scale adjustment and noise suppression on the image; (2) Using a detection network based on multi-scale convolution feature extraction and attention mechanism, text region detection is performed on the preprocessed image, and small text label regions are automatically located and candidate boxes are generated; (3) Through geometric orientation perception and structural feature analysis, multi-scale feature extraction is performed on the texture, edge and stroke distribution of the text area; then, CNN is combined to distinguish the text type, automatically distinguishing normal text and slanted text, and the samples are assigned to the corresponding recognition branches according to the classification results, and adaptive recognition processing is performed on different types of text. (4) Call the tilt correction recognition module to rotate, affine or perspective transform the text regions that are classified as tilted or have perspective distortion, so as to normalize the text direction; and decode the characters by combining the convolution feature extraction and recurrent neural network sequence recognition structure with the attention mechanism. (5) Perform operations such as converting full-width numbers to half-width characters, correcting misidentification of characters, normalizing fuzzy characters, replacing semantic rules, and verifying contextual consistency on the output recognition results, and automatically adjust the layout order and table position of the recognized text; (6) The trained recognition model is structurally optimized by using network pruning, parameter quantization and operator fusion.

2. The method for high-precision recognition of small, tilted text labels facing the electrical cabinet pressure plate according to claim 1, characterized in that, Step (1) specifically includes the following steps: (1.1) The collected electrical cabinet pressure plate images are processed by mean-standard deviation normalization according to the channel, and combined with the adaptive brightness equalization method, the grayscale shift caused by different camera devices under changes in exposure, white balance and lighting conditions is suppressed. (1.2) High-brightness mask detection combined with local guided filtering is used to jointly suppress the reflective areas of the specular surface; (1.3) Radial and tangential distortion corrections are performed based on camera calibration parameters. For the deformation of wide-angle or fisheye lenses at the edge of the field of view, a bidirectional resampling strategy is adopted to avoid image stretching and structural distortion. (1.4) Based on the minimum width of the character strokes, set the reference short side and maintain the aspect ratio for resampling. Use a sliding window slicing method with an overlap rate of 10% to 20% to process the ultra-high resolution samples and record the coordinate mapping relationship. (1.5) Apply nonlocal mean filtering to low-light noise, and use deblocking convolution and mild unsharpening mask to enhance edge sharpness for compressed noise and block effect; (1.6) The image quality is comprehensively evaluated based on three indicators: Laplacian variance, root mean square and exposure. A quality score is generated and low-score samples are labeled with low confidence. The information is retained for offline backtracking and model retraining.

3. The method for high-precision recognition of small, tilted text labels facing the electrical cabinet pressure plate according to claim 1, characterized in that, Step (2) specifically includes the following steps: (2.1) A detection network that integrates multi-scale convolutional features and attention mechanism is used to perform dense scanning on the preprocessed electrical cabinet pressure plate image; (2.2) The detection output represents the candidate region in the form of a quadrilateral box, and the highly overlapping candidates are filtered by the soft nonmaximum suppression algorithm; (2.3) Combining the row and column layout of the electrical cabinet pressure plate and the prior information on component alignment, perform row and column aggregation operation on adjacent small-sized candidate boxes and remove abnormal areas that deviate significantly from the arrangement pattern; (2.4) When a candidate is detected that crosses a reflective area, is truncated at an edge, or is partially occluded, the frame expansion and re-inspection mechanism is automatically triggered; (2.5) Generate a set of candidate regions for each image that are precisely located, have controllable redundancy, and maintain the row and column structure relationship.

4. The method for high-precision recognition of small, tilted text labels facing the electrical cabinet pressure plate according to claim 1, characterized in that, Step (3) specifically includes the following steps: (3.1) Extract the geometric and appearance features of the candidate text regions; (3.2) After fusing the two types of features, input them into the classifier to obtain the text type label and its confidence. The classification mechanism adopts a triple discrimination rule of geometric threshold, structural consistency and CNN probability. (3.3) Calculate the structural features of edge direction consistency, stroke connectivity, and aspect ratio, and distinguish normal text from slanted text based on the structural features; (3.4) The credibility of the discrimination results is further improved by using the class probabilities output by the CNN; (3.5) Perform adaptive traffic division based on the classification results, directly sending normal text into the standard recognition path and sending tilted text into the geometric correction recognition path for posture correction; (3.6) If there is uncertainty in the classification result or confidence level, then enable the more robust redundant identification mode; (3.7) Dynamically adjust the batch size and thread concurrency based on the current device load and task branch ratio, and prioritize the processing of skewed text samples with high confidence.

5. The method for high-precision recognition of small, tilted text labels facing the electrical cabinet pressure plate according to claim 1, characterized in that, Step (4) specifically includes the following steps: (4.1) The initial main direction angle of the candidate text region is estimated by using the minimum bounding rectangle and the main axis of the region. The optimal readable angle is searched in the step range of 0.25° to 1° by fine-grained angle regression. (4.2) Perform perspective discrimination on candidate regions based on edge parallelism, consistency ratio, and quadrilateral deformation; (4.3) If affine distortion is detected, the corresponding affine matrix is ​​solved by corner matching and reprojection error minimization method to perform perspective distortion correction; if only rotation distortion is detected, rotation normalization is performed directly without perspective transformation. (4.4) Geometric transformation is performed using an edge-protected interpolation strategy based on gradient weight graph, directional consistency interpolation, structural tensor constraints, and sub-pixel adaptive sampling; (4.5) For target areas that are extremely small or have blurred edges, perform local magnification by 1.5 to 2 times before recognition, and combine it with deblurring filtering to enhance the clarity of strokes; (4.6) Input the corrected text region into the sequence recognition network; (4.7) In the decoding stage, a form similarity constraint and a language prior scoring mechanism are introduced; (4.8) For recognition results with confidence scores below the preset threshold, a multi-hypothesis verification mechanism is initiated. For the same candidate region, angle fine-tuning, mirror flipping, mild super-resolution and multi-slice strategies are performed to generate several candidate results. The final output is determined based on confidence weighting and language prior consistency voting.

6. The method for high-precision recognition of small, tilted text labels facing the electrical cabinet pressure plate according to claim 1, characterized in that, Step (5) specifically includes the following steps: (5.1) Perform joint optimization and formatting processing on the character-level and semantic-level recognition results; (5.2) Reconstruct the text matrix based on the spatial coordinates of the candidate boxes, align the recognized text by row from left to right and by column from top to bottom, and fill in the missing cells. (5.3) If there are multiple branches or multiple rounds of recognition results at the same position, the results are optimized and fused by combining the multi-dimensional indicators of the number of non-empty characters, the proportion of overlapping characters, the dictionary validity rate and the template matching score, and a corresponding confidence score is generated for each cell. (5.4) Output a structured recognition result table, along with the original image coordinate index.

7. The method for high-precision recognition of small, tilted text labels facing the electrical cabinet pressure plate according to claim 1, characterized in that, Step (6) specifically includes the following steps: (6.1) Adopt channel-level and structure-level pruning strategies to remove redundant channels and low-contribution convolutional kernels in the network, and maintain the semantic expressive power of the pruned paths through knowledge distillation. (6.2) Quantize the network parameters, compress the weights and activation values ​​from 32-bit floating-point format to FP16 or INT8 low-bit format, and perform fusion optimization on the core convolution, normalization and activation operators; (6.3) During the deployment phase, the optimal batch size, number of concurrent threads and memory reuse strategy are automatically configured according to the characteristics of the target hardware, and the end-to-end latency is evaluated and constrained through online benchmark testing; (6.4) During operation, the input quality score, identification confidence and runtime latency are monitored in real time. When a performance degradation or abnormal state is detected, the system automatically switches to the rollback configuration.

8. A device for high-precision recognition of small, tilted text labels facing an electrical cabinet pressure plate, characterized in that, The device includes: A processor is configured to execute computer-executable instructions; The memory stores one or more computer-executable instructions, which, when executed by the processor, implement the steps of the method for high-precision recognition of small, tilted text labels facing an electrical cabinet pressure plate as described in any one of claims 1 to 7.

9. A processor for high-precision recognition of small, tilted text labels on electrical cabinet pressure plates, characterized in that, The processor is configured to execute computer-executable instructions, which, when executed by the processor, implement the steps of the method for high-precision recognition of small, tilted text labels facing an electrical cabinet pressure plate as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores a computer program that can be executed by a processor to implement the various steps of the method for high-precision recognition of small tilted text labels facing the electrical cabinet pressure plate as described in any one of claims 1 to 7.