Image recognition method and system based on deep learning
By using deep learning-based image recognition methods, a field relationship graph and parameterized field sketch are constructed using global feature maps and text feature maps. The decoding process is dynamically adjusted, which solves the problem of error amplification in document image recognition and achieves stable adaptive recognition in layout change scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GANSU UNIV OF CHINESE MEDICINE
- Filing Date
- 2026-02-26
- Publication Date
- 2026-05-29
AI Technical Summary
Existing technologies rely on fixed templates to handle layout changes in document image recognition, which leads to amplified errors and increased maintenance costs, making it difficult to adapt to business scenarios with frequently changing layouts.
By using a deep learning-based approach, a single feature extraction network is used to simultaneously output global feature maps and text feature maps, construct field relationship graphs and generate parameterized field sketches. Combined with a decoder and consistency verification mechanism, the decoding process is dynamically adjusted to suppress error propagation and improve adaptability.
Without relying on heavy rule maintenance, it significantly reduces the amount of review and deployment costs, outputs stable structured results, and improves the system's adaptive response capability to the diversity of business documents.
Smart Images

Figure CN122116392A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of document image recognition, and more specifically, to image recognition methods and systems based on deep learning. Background Technology
[0002] In reality, documents come from diverse sources, with significant differences in shooting angles, lighting, and backgrounds. Layout and field positions also frequently change with business needs. A common workflow involves first performing orientation and deformation correction, then locating the text region and completing text recognition, and finally aligning the recognition results to specific fields according to a preset format. To ensure stable field output, the industry typically relies on fixed templates and rules for anchoring and error correction at the end.
[0003] However, existing practices that rely on fixed templates and rules at the end place the most crucial layout relationships and contextual understanding at the very end of the decision-making process. After image correction and cropping, the global clues that would have helped in understanding the layout are often lost, leaving the final step to barely align based on residual information. Even minor deviations in direction judgment, text positioning, or region segmentation propagate errors along the anchoring and rule-based stages, ultimately resulting in unstable field extraction and insufficient cross-layout generalization. Because real-world business layouts are not fixed, document styles and field layouts continuously evolve, while fixed templates are extremely sensitive to change. Even slight differences can trigger a chain reaction of failures, leading to increased review workload and delayed deployment. There is an urgent need for a deep learning-based image recognition method and system that moves layout understanding and text recognition forward and models them together, suppressing error propagation at the field level and providing stronger adaptability to layout changes. This would allow for stable and reusable structured output without relying on heavy rule maintenance.
[0004] To address the aforementioned problems, a technical solution is provided. Summary of the Invention
[0005] To overcome the aforementioned deficiencies of the prior art, embodiments of the present invention provide an image recognition method and system based on deep learning. This method receives a document image and a source identifier, simultaneously outputs a global feature map and a text feature map using a single feature extraction network, constructs a field relationship graph based on these feature maps, generates a parameterized field sketch, injects the parameterized field sketch as a spatial prior into the decoder to complete line-level character recognition, and outputs the field content and field confidence. Consistency verification is performed based on the field relationship graph, and adjustment instructions are generated. The position and deformation parameters of the parameterized field sketch are updated according to the adjustment instructions, cached by the source identifier, and the final field result and field confidence are output after current image reuse verification. This advances layout understanding, suppresses error propagation, and improves adaptive capabilities, thereby solving the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: Deep learning-based image recognition methods include the following steps: S1. Receive the document image and source identifier, and simultaneously output the global feature map and text feature map using the feature extraction network; S2. Construct a field relationship graph based on the global feature map and text feature map and generate a parameterized field sketch. The field sketch describes the field positional relationship and offset tolerance, and is bound to the source identifier. S3. Before the decoder generates the alignment path, the alignment and sampling parameters are set according to the alignment flexibility coefficient. The parameterized field sketch is injected into the decoder as a gradient-based spatial prior. The text feature map is then used to complete line-level character recognition and output the field content and field confidence. S4. Perform consistency checks on field content based on the field relationship diagram, perform local relocation and re-decoding on fields with insufficient confidence or conflicts, generate adjustment instructions, and update field content; S5. Update the position and deformation parameters in the parameterized field sketch according to the adjustment instructions, cache the updated field sketch according to the source identifier, and output the final field result and field confidence after completing one reuse verification in the current image.
[0007] In a preferred embodiment, after receiving the document image and source identifier in step S1, two synchronous representations are completed through a feature extraction network. The backbone network shares the convolutional backbone and retains the input coordinate system. A global feature map and a text feature map are output through multi-scale feature fusion. The global feature map focuses on the layout structure and object boundaries, while the text feature map emphasizes strokes and character textures. The same upsampling grid is shared in the two output heads, and a learnable small offset is introduced to align the coordinates of the two feature maps in the spatial dimension. The network output includes the semantic embedding and orientation response of each pixel.
[0008] In a preferred embodiment, in step S2, text and region candidates are generated based on the global feature map and the text feature map, a field relationship graph is constructed, the candidate regions are used as nodes, and adjacent, paired, contained, and aligned are used as edge types. The edge weight is jointly estimated by the geometric relative position and semantic similarity between nodes.
[0009] In a preferred embodiment, a parameterized field sketch is generated based on the field relationship diagram. The location of key fields is marked by a set of anchor points, a set of guiding lines describes the direction and curvature of field rows, an offset tolerance band defines the deformation range of each field, and a deformation field provides a mapping from the input coordinate system to the sketch coordinate system. The parameterized field sketch is bound to the source identifier to form a priori description of the layout.
[0010] In a preferred embodiment, in step S3, the baseline curvature deviation is calculated based on the text feature map and the parameterized field sketch to measure the curvature difference between the text line trajectory and the guide line, and the reflective stroke occlusion ratio is used to measure the degree of occlusion of the stroke support by the highlight reflection. The baseline curvature deviation and the reflective stroke occlusion ratio are input into the monotonic complementary learner to obtain the alignment compliance coefficient. The alignment and sampling parameters are set based on the alignment compliance coefficient. The parameterized field sketch is injected into the decoder as a gradient-based spatial prior to complete the line-level granularity recognition of the text feature map and output the field content and field confidence.
[0011] In a preferred embodiment, the baseline radian deviation calculation process first extracts the line baseline from the attention center trajectory of the text feature map, uses the attention mechanism to aggregate the directional response to generate a continuous curve, and then compares the point-to-point angle difference with the guide line direction field of the parameterized field sketch to obtain the over-tolerance radian band ratio as the output. The process of calculating the reflective stroke occlusion ratio first locates the bright candidate region in the joint space of brightness and saturation of the text feature map, then generates a stroke direction consistency mask, filters consistent pixels through histogram projection, and calculates the intersection and union area ratio as the output.
[0012] In a preferred embodiment, step S4 performs a consistency check on the field content based on the field relationship graph, and calculates a consistency score for each edge type to evaluate the joint matching of field confidence and geometric consistency.
[0013] In a preferred embodiment, when the consistency score indicates insufficient confidence or relationship conflict, an adjustment instruction is generated, a local recheck point is located on the guide line of the corresponding field, local relocation and re-decoding are performed on the corresponding region based on the deformation field of the parameterized field sketch, the field content and field confidence are updated, and the guide line offset and tolerance band change are recorded.
[0014] In a preferred embodiment, step S5 updates the position and deformation parameters of the parametric field sketch according to the adjustment instructions, superimposes displacement at the anchor point, corrects the bending trend at the guide line control point, tightens or loosens the shape boundary in the offset tolerance zone, locally updates the mapping coefficients in the deformation field, binds the updated parametric field sketch to the cache according to the source identifier, triggers lightweight recognition verification on the current image with the updated sketch, confirms that the field content is consistent with the alignment path and the sampling window output relationship, and outputs the final field result and field confidence.
[0015] Deep learning-based image recognition systems include: The feature extraction module processes document images and source identifiers, and completes synchronous representation through a feature extraction network. The input is document images and source identifiers, and the output is global feature maps and text feature maps. The relationship building module generates text and region candidates based on the global feature map and text feature map, constructs a field relationship graph and generates a parameterized field sketch. The input is the global feature map and text feature map, and the output is the field relationship graph and the parameterized field sketch bound to the source identifier. The path decoding module calculates the alignment compliance coefficient based on the text feature map and the parameterized field sketch, sets the alignment and sampling parameters and injects them into the decoder to complete the recognition. The input is the text feature map and the parameterized field sketch, and the output is the field content and the field confidence. The consistency verification module performs consistency verification on the field content based on the field relationship diagram. For fields with insufficient confidence or conflict, it performs local relocation and re-decoding. The input is the field relationship diagram and the field content, and the output is the adjustment instruction and the updated field content. The sketch update module updates the position and deformation parameters of the parameterized field sketch according to the adjustment instructions, performs caching and reuse verification, takes the adjustment instructions as input, and outputs the final field results and field confidence.
[0016] The technical effects and advantages of the deep learning-based image recognition method and system of this invention are as follows: This invention establishes a closed-loop linkage mechanism through pre-synchronous representation of a single feature extraction network, construction of field relationship graphs and parameterized field sketches, dynamic adjustment of alignment flexibility coefficients and spatial prior injection, local re-decoding for consistency verification, and iterative updating and cache reuse of sketch parameters, achieving deep integration of layout understanding and text recognition. This mechanism moves global clues to the front end of the decision-making chain, avoiding the error amplification effect of traditional end-template reliance, and suppressing cascading failures caused by differences in shooting angle, lighting background, and layout drift.
[0017] The combination of feature extraction and relation modeling provides robust priors, the collaboration between decoding injection and verification correction ensures the accuracy of field extraction, and the feedback loop of updating the cache enhances the generalization ability across images. Thus, without the need for heavy rule maintenance, the system improves its adaptive response to the diversity of business documents, significantly reduces the amount of review and deployment costs, outputs stable structured results, and promotes efficient application in real-world scenarios. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating the deep learning-based image recognition method of the present invention.
[0019] Figure 2 This is a schematic diagram of the deep learning-based image recognition system of the present invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] Example 1: Figure 1 The present invention provides an image recognition method based on deep learning, comprising: S1. Receive the document image and source identifier, and simultaneously output the global feature map and text feature map using the feature extraction network.
[0022] S2. Construct a field relationship graph based on the global feature map and text feature map, and generate a parameterized field sketch. The field sketch describes the field positional relationship and offset tolerance, and is bound to the source identifier.
[0023] S3. Before the decoder generates the alignment path, the alignment and sampling parameters are set according to the alignment flexibility coefficient. The parameterized field sketch is injected into the decoder as a spatial prior with gradient. The text feature map is used to complete the line-level character recognition and output the field content and field confidence.
[0024] S4. Perform consistency checks on field content based on the field relationship diagram, perform local relocation and re-decoding on fields with insufficient confidence or conflicts, generate adjustment instructions, and update field content.
[0025] S5. Update the position and deformation parameters in the parameterized field sketch according to the adjustment instructions, cache the updated field sketch according to the source identifier, and output the final field result and field confidence after completing one reuse verification in the current image.
[0026] In the field of document image recognition, traditional methods typically rely on fixed templates in the later stages to handle layout changes, which often leads to amplified errors and increased maintenance costs. Step S1, by introducing a pre-synchronous representation of a single feature extraction network, can capture global and local cues early on, thereby improving the system's adaptability to layout drift. This step focuses on receiving the document image and source identifier, and uses a shared convolutional backbone and multi-scale fusion mechanism to generate coordinate-aligned global feature maps and text feature maps. This ensures that key spatial information is preserved in scenes with significant differences in lighting, angle, and background, supporting accurate modeling of subsequent field relationships.
[0027] S1-1 Input reception and initialization.
[0028] In the field of document image recognition, traditional methods rely on post-processing with fixed templates to handle layout changes, which often leads to amplified errors and increased maintenance costs. By introducing a pre-processing synchronous representation using a single feature extraction network, global and local cues can be captured earlier, improving the adaptability to layout drift.
[0029] The system receives document images and source identifiers, and performs preliminary processing using a shared convolutional backbone. The document image, as input, first undergoes a preprocessing stage, including resizing to a fixed resolution of 1024x1024 pixels to meet network input requirements, and applying histogram equalization to enhance contrast and reduce the impact of uneven lighting. Specifically, histogram equalization maps the original pixel values to a uniformly distributed range by calculating a cumulative distribution function of pixel values. The source identifier is appended as a string, encoding the document's business type or acquisition device information, such as JSON format containing source and device key-value pairs, for subsequent parameter adjustments. The shared convolutional backbone of the single feature extraction network is based on the ResNet-50 architecture, which contains 50 layers and consists of four stages: stage 1 has 3 residual blocks, stage 2 has 4, stage 3 has 6, and stage 4 has 3. Each residual block contains a bottleneck structure: a 1x1 convolutional dimensionality reduction, a 3x3 convolutional main extraction, and a 1x1 convolutional dimensionality increase, accompanied by batch normalization layers and ReLU activation functions. The weights are initialized using the He initialization method to ensure variance consistency.
[0030] After the input document image enters the shared convolutional backbone, features are extracted progressively from shallow to deep layers: the initial layer uses a 7x7 convolutional kernel, 64 channels, and a stride of 2 to capture low-level edges and textures, achieving initial downsampling to half the input size; subsequent residual blocks in stages 2 to 4 have a stride of 1 or 2, and the number of channels gradually increases to 512, 1024, and 2048, further extracting mid-to-high-level semantic features. Simultaneously, the input coordinate system is preserved by adding positional encoding channels, normalizing the original pixel coordinates and embedding them into the feature map. Positional encoding uses sine and cosine functions to generate periodic representations based on position and dimension. The entire process ensures that the two representations are performed simultaneously: the global path focuses on page layout, while the text path emphasizes character details, but they share the same backbone parameters to reduce computational overhead and parameter redundancy. During training, the Adam optimizer is used with a learning rate of 0.001 and a batch size of 32.
[0031] This sub-step completes input standardization and preliminary multi-layer feature extraction, providing hierarchical intermediate feature maps for multi-scale fusion, laying the foundation for spatial consistency in document scenarios with varying layouts.
[0032] S1-2 Multi-scale Feature Fusion.
[0033] Given that differences in the shooting angle and background of document images can distort layout understanding, early synchronous representations need to integrate multi-layer information to enhance robustness. Multi-scale feature fusion is performed using the output of a shared convolutional backbone to generate global feature maps and text feature maps.
[0034] The fusion process employs a feature pyramid network algorithm, extracting intermediate feature maps from multiple stages sharing a convolutional backbone. For example, in ResNet-50, stage 2 output size is 1 / 4 of the input with 256 channels, stage 3 is 1 / 8 with 512 channels, stage 4 is 1 / 16 with 1024 channels, and stage 5 is 1 / 32 with 2048 channels. The process begins with the deepest features: low-resolution features from stage 5 are taken and upsampled to the stage 4 size using bilinear interpolation with an upsampling factor of 2, expanding each pixel into a 2x2 block and calculating the weighted average of neighboring pixels. Then, a 1x1 convolution is used to adjust the number of channels to 256, and this is added element-wise with the stage 4 features to form a fusion layer. This operation is repeated to fuse upwards to stage 3 and stage 2, ensuring the combination of high-resolution shallow details and low-resolution deep semantics. The global feature map path applies an additional convolutional layer after fusion to emphasize the layout structure, and uses the Sobel operator convolution to detect object boundaries and layout edges. The Sobel kernel includes gradient calculation templates in the horizontal and vertical directions, and a threshold such as 0.1 is used to filter weak edges. The text feature map path applies a directional filter to enhance stroke texture and character contours, using a Gabor filter with parameters such as wavelength such as 5, directional spacing π / 8, and standard deviation such as 2.0.
[0035] The two feature maps maintain the same spatial resolution during the fusion process. For example, the final output size is 1 / 4 of the input. Coordinate alignment is achieved by sharing upsampling operations, that is, each fusion layer uses a uniform grid sampling to ensure pixel-level correspondence. During training, the L2 loss is minimized to optimize the fusion weights.
[0036] The fusion operation enhances the comprehensiveness of feature representation, maintains stable layout and text representation in documents with uneven lighting or angular deviations, and provides alignment input for the output head.
[0037] S1-3 output header alignment mechanism.
[0038] Frequent changes in document layout necessitate precise correspondence between feature maps to avoid subsequent field misalignment issues. A shared upsampling grid and learnable micro-offsets are introduced in both output heads to calibrate the pixel correspondence between the global feature map and the text feature map. The global output head extracts from the fused feature map and uses the decoder path of the U-Net architecture to generate a global feature map focusing on the layout structure. Shallow details are integrated through skip connections, specifically, the connections from P2 to P4 in the fused model correspond to the original stage2 to stage4. The text output head uses the DBNet algorithm to generate text feature maps emphasizing character texture, focusing on text boundaries and internal textures, and is trained using a binarized boundary map loss.
[0039] The shared upsampling grid is defined as a uniformly distributed matrix of points. For example, a 64x64 grid is generated when the feature map size is 512x512. Each point extracts a value from the fused feature map through bilinear sampling to ensure initial spatial consistency. Sampling is achieved by weighted averaging of neighboring pixels. The learnable small offset is calculated by an offset prediction network, which is a lightweight multilayer perceptron structure. It includes an input layer channel matching fused feature map, two hidden layers each with 128 units using ReLU activation, and an output layer with 2 units of linear activation. The input is a local 7x7 region of the fused feature map, and the output is a two-dimensional offset vector for each grid point, with the range limited to -1 to 1 pixel. After the offset is applied, the feature map is resampled so that the boundary pixels of the global feature map accurately match the character regions of the text feature map.
[0040] Through iterative training, the offset parameters are optimized to minimize the mutual information loss between the two images. The mutual information loss is approximated by Monte Carlo sampling by calculating the difference between the individual entropy and the joint entropy to ensure that the same pixel position corresponds to the same image content. The training iterations are 100 cycles, and the learning rate decay strategy is cosine annealing.
[0041] The alignment mechanism eliminates feature offset errors, improves recognition generalization in the context of business layout evolution, and provides high-quality data for subsequent modeling.
[0042] S1-4 network output generation.
[0043] In traditional recognition processes, lost global cues often lead to instability at the end, while front-end synchronous output can retain key responses to support downstream decision-making. By integrating aligned feature maps, a semantic embedding and orientation response for each pixel are generated. The semantic embedding uses the SimCLR contrastive learning algorithm to extract a 128-dimensional vector from the global feature map, representing the semantic category of the pixel, such as field region or background. The features are mapped to the embedding space through a projection head, which is a two-layer multilayer perceptron: a 512-unit ReLU layer and a 128-unit linear layer. Training uses NT-Xent loss, and the relative probability of positive sample similarity to negative sample similarity is calculated through logarithmic operations and softmax normalization. The similarity is measured using a cosine similarity, with a temperature parameter such as 0.5. Data augmentation includes random cropping and color jittering.
[0044] The directional response is calculated using the HOG algorithm, which calculates the gradient direction distribution for each pixel from the text feature map. First, the gradient magnitude and angle are calculated using a Sobel kernel, then quantized into an 8-bin histogram to capture stroke direction. Each bin is spaced 22.5 degrees apart, and an L2-Hys normalization threshold of 0.2 is used. The output process aligns the feature map and inputs it into the final 1x1 convolutional layer, producing a multi-channel map: the first 128 channels store semantic embedding vectors, and the last 8 channels record directional response values. These outputs are bound to the source identifier and stored in a hash table, where the key is the source identifier string and the value is the serialized form of the feature map tensor, facilitating rapid retrieval adapted to specific document styles.
[0045] The output generation provides pixel-level priors, which, while suppressing error propagation, enhances the forward understanding of the layout and contributes key information to the overall process stability.
[0046] This step standardizes the input and feature extraction of document images, and outputs global feature maps and text feature maps containing semantic embeddings and directional responses. It effectively suppresses the accumulation of early biases in business environments with varying layouts and provides reliable spatial priors and text texture support for field sketch generation.
[0047] In the field of document image recognition, traditional methods rely on fixed templates to handle layout changes, often leading to amplified errors and increased maintenance costs. By moving layout understanding forward to after feature extraction, a relationship model can be built based on global cues, improving adaptability to layout evolution. Step S2 focuses on using global feature maps and text feature maps to generate field relationship graphs and parameterized field sketches, ensuring the capture of positional relationships and offset tolerances in scenarios where business document styles continuously change, supporting adaptive injection for subsequent decoding.
[0048] S2-1 generates text and region candidates.
[0049] The diverse layouts of document images necessitate the accurate extraction of latent fields from feature maps to avoid biases in subsequent relationship construction. Using the global feature map and text feature map from step S1 as input, this sub-step generates text and region candidates, providing the node foundation for the field relationship graph. The global feature map provides layout structure information, such as object boundaries, for region proposal; the text feature map provides stroke texture details for text detection.
[0050] The specific process first applies the DBNet text detection algorithm to the text feature map to generate text bounding boxes. Potential text regions are calculated using a binarized boundary map, with a boundary threshold of 0.3 to balance recall and precision. This threshold is determined by maximizing the F1 scores on the training and validation sets. The loss function uses Dice loss combined with binarized cross-entropy. Training configurations include a learning rate of 0.001, a batch size of 16, and 50 epochs. Simultaneously, the Region Proposal Network (RPN) algorithm is used on the global feature map to extract candidate region boxes from semantic embeddings and orientation responses. Anchor box scales include 32, 64, and 128 pixels, with aspect ratios of 1:1, 1:2, and 2:1 to ensure coverage of various field sizes. A non-maximum suppression threshold of 0.7 is used to remove overlapping proposals. When fusing candidate regions from two images, the Intersection over Union (IoU) is calculated. If it exceeds 0.5, the regions are merged into a unified candidate region. Semantic embeddings are retained as region labels, and the merging prioritizes preserving the boundaries of the text feature map to highlight character regions. The entire generation process maintains spatial coordinate consistency, uses directional response to filter non-textual noise regions, removes candidates with average directional response below a threshold such as 0.1, and uses mean pooling to calculate the response within the region.
[0051] The generation operation establishes a reliable candidate set, strengthens the initial positioning of layout elements in documents with shooting angle deviations, and delivers accurate nodes for the construction of the relationship graph.
[0052] S2-2 Construct a field relationship diagram.
[0053] Given the dynamic nature of field layout, it is necessary to quantify the associations from candidate regions to capture implicit structures. This sub-step constructs a field relationship graph based on the generated text and region candidates, treating candidate regions as nodes and defining edge types as adjacent, paired, containing, and aligned. Nodes represent the bounding box and embedding vector of each region candidate; edge type determination uses geometric calculations: adjacent edges connect nodes with a horizontal or vertical distance of less than, for example, 50 pixels; paired edges connect nodes with a semantic similarity greater than, for example, 0.7, calculated using a cosine similarity algorithm from the embedding vectors; aligned edges identify nodes with consistent vertical or horizontal alignment, compared by directional response angle differences of less than, for example, 15 degrees; containing edges are determined based on the bounding box area overlap ratio exceeding, for example, 0.8, and the minimum bounding box algorithm is used to calculate the overlap.
[0054] Edge weights are jointly estimated by the geometric relative positions and semantic similarities between nodes. Geometric relative positions are calculated using the Euclidean distance algorithm to determine the distance between center points. Semantic similarity is extracted from the embedding vectors, with the vector dimension matched to the upstream 128-dimensional vector and preprocessed using L2 normalization. A weighted summation is used during the joint estimation, with geometric weights as low as 0.6 and semantic weights as low as 0.4, ensuring that edge weights range from 0 to 1. Input values are processed using min-max normalization. The field relationship graph is stored in the form of an adjacency matrix for easy subsequent traversal; the matrix size is the square of the candidate number, and sparse representation is used to optimize memory usage.
[0055] The construction process forms a structured relational network, which suppresses the interference of isolated candidates in images with significant background differences, and lays the foundation for the generation of parameterized field sketches.
[0056] S2-3 generates a parameterized field sketch.
[0057] Frequent changes in field positions necessitate parametric descriptions to accommodate offsets. Parametric field sketches are generated based on the field relationship graph, described by four types of parameters: Anchor point set marks the approximate location of key fields, selecting the center of the node with the highest degree from the relationship graph as the anchor point, with the degree calculated as the sum of the ingress and egress edges; Guide line set describes the direction and curvature trend of field rows, using a minimum spanning tree algorithm to extract the main path from the aligned edges, fitting a Bézier curve to represent the curvature, setting the number of curve control points to 1 / 3 of the number of path nodes, and using the least squares method to minimize the distance from the point to the curve in the fitting loss; Offset tolerance band defines the allowable deformation range for each field, extending the bounding box through the relationship graph edge weights, with the tolerance width set based on the inverse proportionality of the edge weights, specifically a scaling factor of 1 / edge weight multiplied by the baseline width of 20 pixels; Deformation field provides the mapping from the input coordinate system to the sketch coordinate system, using a thin-plate spline interpolation algorithm to calculate the global transformation from the anchor point offsets, with the radial basis function using multiple quadratic forms. The smoothing parameter λ is set to 0.01 to balance rigidity and flexibility. During parameter estimation, the nodes and edges of the relationship graph are traversed to ensure that the parameters cover all candidate regions, forming a coherent layout prior. The traversal uses a depth-first search to prioritize highly connected components.
[0058] The generation mechanism provides flexible sketch representation, enhances adaptability to deformation in scenes with uneven lighting, and prepares parameterized output for source identifier binding.
[0059] S2-4 Binding and Source Identification.
[0060] In real-world business scenarios, diverse sources need to be associated with layout priors for reuse. This sub-step binds parameterized field sketches to source identifiers, forming a layout prior description consistent with the acquisition end or source system. The binding process uses key-value storage, with the source identifier as the key and sketch parameters serialized as values, including anchor set coordinates, guide line set curve coefficients, offset tolerance zone boundaries, and deformation field mapping matrix. Serialization uses JSON format to ensure cross-session compatibility, with a structure of nested objects such as {"anchors":[[x1,y1],...],"guides":{...}}, and data types of floating-point coordinates and integer indices. After binding, consistency is verified by simulating offsets to test sketch stability. The offset magnitude follows a uniform distribution, such as -10 to 10 pixels, and the test is iterated 20 times. The tolerance zone coverage is calculated; if it exceeds, for example, 90%, it is considered effective; otherwise, the edge weight threshold is adjusted and the sketch is regenerated. The cache uses an LRU strategy with an expiration time of 24 hours to handle layout updates.
[0061] The binding operation enables the specific storage of sketches, which facilitates quick retrieval in document processing with layout drift and improves the generalization ability of the overall process.
[0062] Step S2 completes the construction and binding from the global feature map and text feature map to the field relationship map and parameterized field sketch, capturing positional relationships and offset tolerances in a business environment with varying document sources, and supporting prior injection and error suppression in subsequent steps.
[0063] In the field of document image recognition, traditional methods rely on fixed templates to handle layout changes, often leading to amplified errors and increased maintenance costs. By linking text recognition with prior layout knowledge, the decoding process can be dynamically adjusted, improving adaptability to interference. Step S3 focuses on calculating alignment compliance coefficients based on text feature maps and parameterized field sketches and injecting them into the decoder, ensuring line-level character recognition even in scenes with uneven lighting or bending deviations, and supporting stable output of field content.
[0064] S3-1 calculates the baseline radian deviation.
[0065] Document curvature distorts the trajectory of text lines, necessitating the quantification of the difference between the text line trajectory and the guide line to guide flexibility adjustments. Using the parameterized field sketch and text feature map from step S2 as input, the baseline curvature deviation is calculated to measure the difference in curvature between the text line trajectory and the guide line.
[0066] The computation process first extracts the line baseline from the attention center trajectory of the text feature map. An attention mechanism algorithm, such as Transformer's self-attention, is used to aggregate trajectory points from the directional response. The number of attention heads is set to 8, and the number of layers to 2, to capture multi-scale dependencies, generating a continuous line curve. Then, it is compared with the guide line direction field of the parameterized field sketch. The direction field is derived from the Bézier curves of the guide line set. The proportion of the over-tolerance radian band is obtained by calculating the point-to-point angle difference, with an angle difference threshold of 15 degrees. The proportion formula is the number of over-threshold points divided by the total number of points. The tolerance is defined based on the width of the offset tolerance band, which is inherited from step S2 and normalized to pixel units. The entire computation ensures a dimensionless output, limited to the range of 0 to 1, facilitating subsequent input to the learner. The output is smoothed using sigmoid activation.
[0067] The computational operation provides a quantitative metric for bending interference, helps suppress path deviation in layout-drifted documents, and contributes key parameters to the determination of alignment compliance coefficients.
[0068] S3-2 Calculate the occlusion ratio of reflective strokes.
[0069] High-brightness reflections often obscure stroke supports, affecting recognition accuracy; therefore, it is necessary to assess their interference with texture. The reflective stroke occlusion ratio is calculated based on the text feature map and the parameterized field sketch to measure the degree to which high-brightness reflections obscure stroke supports.
[0070] The process first locates highlight candidates in the joint luminance and saturation space. HSV transformation is used to extract regions from the text feature map whose luminance channels exceed a threshold (e.g., 0.8) as candidates. This threshold is optimized based on the validation set ROC curve. Next, intersection with a stroke direction consistency mask is calculated. This mask is generated from the direction response and filtered using a histogram projection algorithm for pixels with a consistent direction greater than a threshold (e.g., 0.5). This threshold is derived from the median of the direction response distribution. The intersection is calculated using the Jaccard exponent formula, i.e., the intersection area divided by the union area, as the occlusion ratio. A dimensionless output value is calculated, focusing on the field region defined by the deformation field. Median filtering is used to avoid global noise interference, with a filtering window size of approximately 3x3 pixels.
[0071] The computational model quantifies the impact of illumination interference, enhances recognition robustness in images with significant background differences, and provides supplementary parameters for complementary learning.
[0072] S3-3 Monotonic Complementary Learner Processing.
[0073] Curvature and reflection interference need to be modeled complementaryly to generate an adaptive compliance response. The baseline curvature deviation and the reflection stroke occlusion ratio are input into a monotonic complementary learner to obtain alignment compliance coefficients. The learner maintains a monotonic response to curvature and reflection and models their complementary effects. The input consists of dimensionless baseline curvature deviation and reflective stroke occlusion ratio. First, monotonic responses to their respective inputs are established in two monotonic sub-channels. Each sub-channel is formed by stacking non-negative weighted one-dimensional ascending basis functions to create an increasing map. The basis functions are linearly piecewise, and the weights are initialized using an Adam optimizer to ensure the response does not decrease as the input increases. Then, complementary gating units are introduced to characterize the coupling effect of curvature and reflectivity. The gate value is driven by the mid-to-high range responses of both channels, and softplus activation is used to calculate the gate value, ensuring that the overall alignment compliance requirement is increased when either factor increases, and the increase is more significant without excessive amplification when both factors increase simultaneously. The responses of the two channels and the gated output are synthesized in a non-subtractive fusion layer. The fusion uses an element-wise max operation, and the alignment compliance coefficient is obtained through a bounded activation mapping such as sigmoid, with the range limited to 0 to 1.
[0074] The optimization process employs a supervised learning framework, aiming to either select labels using an alignment strategy or generate pseudo-labels based on recognition stability. The loss function consists of three parts: an accuracy term using mean squared error to assess the deviation between the prediction and the label; a monotonic constraint term using ranking loss to force a non-decreasing response, such as comparing output differences between adjacent input points; and a smoothing term using total variation regularization to suppress sharp fluctuations in the response curve. Training utilizes the Adam optimizer with an initial learning rate of 0.001 and a batch size of 64. A cosine annealing strategy is used to decay the learning rate to promote convergence. During iteration, the recognition stability metric on the validation set is monitored; if the stability improvement is insufficient, the pseudo-label generation threshold is adjusted. After deployment, micro-calibration is performed using an online local error correction signal, and the scale differences between labels from different sources are aligned using linear scaling to ensure the generalization ability of the optimization results in real-world scenarios.
[0075] The parameter settings emphasize a balance between monotonicity and complementarity. The number of basis functions for monotonic sub-channels is set to 5 to 10, with non-negative weights initially evenly distributed between 0 and 1, and L1 regularization is used to avoid overfitting. The high-end region of the driving threshold for complementary gating units is defined as the upper 3 / 2 quantile of the response value, and a scaling factor such as 0.5 is introduced in the threshold calculation to control the amplification. The parameters of the bounded activation function are fixed in the standard form of the sigmoid function to ensure a strictly limited output range. The overall model depth is limited to shallow networks, such as 3 to 5 fully connected layers, to reduce computational overhead. The Xavier method is used for parameter initialization to ensure stable gradient propagation.
[0076] The processing generates a dynamic flexibility index, optimizes the sampling strategy in the context of varying lighting conditions in business documents, and prepares adaptive control for decoding injection.
[0077] S3-4 sets the alignment and sampling parameters and injects them into the decoder.
[0078] Decoding requires incorporating spatial priors to suppress error propagation and achieve accurate recognition. Alignment and sampling parameters are set based on alignment flexibility coefficients. A parameterized field sketch is injected into the decoder as a gradient-based spatial prior, enabling line-level character recognition of the text feature map and outputting field content and field confidence.
[0079] The setup process uses alignment compliance coefficients to drive parameter adjustments. Alignment parameters, such as the attention window size, increase linearly with the coefficient, and the coefficient formula is: base window size (e.g., 32 pixels) multiplied by (1 + alignment compliance coefficient). Sampling parameters, such as grid density, increase exponentially with the coefficient, with an exponent base of 2, and the increase formula is: density = initial density (e.g., 16 multiplied by base)^alignment compliance coefficient, ensuring tolerance limits are relaxed at high compliance levels. During injection, the deformation field is used to dynamically generate sampling grids and attention windows during decoding. The sampling grid is derived from the original grid through thin-plate spline interpolation, with a smoothing factor of 0.01. The attention window adjusts the focus range based on the guide line set and is clipped at the boundary using offset tolerance. The decoder uses the CTC algorithm for line-level character recognition, serializing and outputting character probabilities from the deformed text feature map. This is combined with confidence calculations to generate field content and field confidence. Confidence is aggregated using softmax posterior probabilities, with average pooling used for aggregation. A threshold of 0.5 is used to remove low-confidence fields, and the bundle search width is 16 to expand the search space.
[0080] The setting and injection operations achieve adaptive recognition, reducing the risk of misreading in scenarios where the field position changes, and providing reliable output for subsequent verification.
[0081] Step S3 completes the processing from text feature map and parameterized field sketch to alignment compliance coefficient calculation and decoder injection. In the business environment where document shooting interference is frequent, the path and sampling are dynamically adjusted to support the stability and error suppression of line character granularity recognition.
[0082] In the field of document image recognition, traditional methods rely on fixed templates to handle layout changes, which often leads to amplified errors and increased maintenance costs. By introducing relationship verification after recognition, common conflicts can be corrected in a timely manner, improving output reliability. Step S4. Perform consistency verification and local correction on the field content based on the field relationship diagram to ensure that field accuracy is maintained in scenarios with slight layout drift or accumulated deviations, supporting the stable structure of the final result.
[0083] S4-1 performs a consistency check.
[0084] The identification output is susceptible to early biases, necessitating content consistency verification via a relationship graph. Using the field content and confidence from step S3, and the field relationship graph from step S2 as input, consistency checks are performed on the field content. The verification process traverses all edges of the field relationship graph, checking the consistency of each field's association with adjacent nodes. Specifically, this includes verifying whether the field content conforms to business semantic rules, such as date format or numerical range constraints, using a rule engine algorithm to match predefined patterns. Pattern examples include regular expressions to verify YYYY-MM-DD dates or constraints where the numerical value is greater than zero. A breadth-first search is used for traversal to cover all connected components, ensuring no nodes are missed. The search starts from the anchor with the highest degree to optimize efficiency. The verification output is the overall consistency status of each field, marked as passed or requiring correction. The status is represented by a binary flag for easy downstream filtering.
[0085] The verification process identified potential conflicts, reduced the risk of misalignment in documents with shooting deviations, and prepared relevant data for score calculation.
[0086] S4-2 calculates the consistency score.
[0087] The diverse types of relational edges necessitate quantitative evaluation using pinpoint question fields. A consistency score is calculated for each edge type, including sequential consistency, pairwise consistency, inclusion consistency, and alignment consistency. The score is jointly given by field confidence and geometric consistency. Field confidence is inherited from step S3 as a confidence factor, while geometric consistency is obtained by calculating bounding box overlap and directional response matching. The IoU algorithm is used to evaluate overlap, and the cosine similarity algorithm is used to compare directions. The joint calculation uses a product form followed by min-max normalization to ensure the score ranges from 0 to 1. Calculations are performed independently for all edge types. Sequential consistency focuses on row order matching through sequence index comparison; pairwise consistency checks semantic pairing through embedding vector distance; inclusion consistency verifies nested relationships through area inclusion ratio; and alignment consistency evaluates positional arrangement through the angle between the center point vectors.
[0088] The calculation process provides accurate score indicators, which help locate low-sincerity regions in images with different lighting conditions, and contribute quantitative basis for collision detection.
[0089] S4-3 generates adjustment instructions.
[0090] Insufficient confidence or conflicts necessitate targeted corrections to prevent error propagation. Adjustment instructions are generated when insufficient confidence or relationship conflicts occur. The criteria for judgment are a consistency score below a threshold (e.g., 0.5) or the presence of logical conflicts (e.g., violation of inclusion relations). The generated instructions include specifying the conflicting field identifier, conflict type, and correction priority. Priority is calculated inversely proportional to the score, with higher conflict scores taking precedence. Local recheckpoints are located on the guide lines of the corresponding fields. A binary search algorithm is used to find the nearest anchor point along the guide line set as the starting point, with the search interval based on the offset tolerance band width. The instruction format is a structured dictionary, containing field IDs as integer keys, checkpoint coordinates as floating-point pairs, and conflict descriptions as strings, ensuring seamless downstream parsing. JSON is used for dictionary serialization for storage compatibility.
[0091] The generation mechanism precisely guides the correction target, improves error correction efficiency in documents with complex backgrounds, and prepares instructions for relocation and re-decoding.
[0092] S4-4 performs local relocation and re-decoding.
[0093] Local corrections must isolate their impact to maintain overall path stability. Local relocation and re-decoding are performed on the region based on the deformation field of the parameterized field sketch. Relocation uses deformation field mapping to adjust checkpoint coordinates and applies an affine transformation algorithm to correct positional deviations. The transformation matrix includes rotation angles limited to -30 to 30 degrees and scaling factors from 0.8 to 1.2 to maintain scale. Re-decoding re-runs the CTC algorithm within the adjusted region, extracting updated character sequences from the text feature map. The field content and confidence are updated without altering the alignment paths of other fields. Mask isolation ensures that only local impact is affected; the mask is generated based on the offset tolerance band boundary. Simultaneously, the guide line offset and tolerance band change corresponding to this correction are recorded. The offset is calculated using vector difference, and the tolerance band change is quantized using area ratio. The area uses a pixel grid integral formula. These records are stored as log entries to support updates in step S5, each entry including a timestamp and a change vector.
[0094] The implementation of the operation completed a targeted update, suppressed cascading failures in the business environment of layout evolution, and provided correction records for parameter sketch adjustments.
[0095] Step S4 completes the processing from field relationship diagram to consistency verification and local correction. It detects conflicts and updates content in scenarios where document deviations occur frequently, supporting the stability of the overall output and cross-format generalization.
[0096] In the field of document image recognition, traditional methods rely on fixed templates to handle layout changes, often leading to amplified errors and increased maintenance costs. Dynamically updating the sketch and verifying its reuse strengthens the adaptive mechanism and improves long-term stability. Step S5 updates the parameterized field sketch according to adjustment instructions and caches it for verification, ensuring that error propagation is suppressed in scenarios where business layouts continuously evolve, supporting reusable output.
[0097] S5-1 performs position and deformation parameter updates.
[0098] After local corrections, the changes need to be integrated to optimize the sketch's adaptability. Using the adjustment instructions from step S4 as input, the position and deformation parameters of the parametric field sketch are updated. Specifically, this includes superimposing small displacements at the corresponding anchor points, directly accumulating coordinates from the offset records of the adjustment instructions using a vector addition algorithm, limiting the displacement amplitude to within 10% of the offset tolerance band width to control stability; correcting the bending trend at the guide line control points, adjusting control point parameters using a Bézier curve fitting algorithm to ensure a smooth transition, with the fitting based on least squares optimization of point distances; tightening or widening the shape boundaries within the offset tolerance band, applying a boundary expansion algorithm based on the tolerance band change records, with the boundary achieved by moving polygon vertices, and the expansion factor being the area ratio of the change records multiplied by a baseline factor, such as 0.5; locally updating the mapping coefficients in the deformation field, incorporating the local transformation matrix using a thin-plate spline interpolation algorithm, affecting only specified areas to maintain global consistency, with linear interpolation used for matrix fusion. The update process iterates parameter by parameter to ensure that all four types of parameters are adjusted synchronously to form a complete sketch version. The iteration order is from the anchor point set to the deformation field to minimize dependency conflicts.
[0099] The update process refined the sketch parameters, enhanced the accuracy of layout priors in documents with accumulated shooting deviations, and optimized descriptions for caching preparation.
[0100] S5-2 Draft of fields after binding cache update.
[0101] Updated sketches must be stored in association with their source for future reuse. The updated parameterized field sketches are bound and cached according to their source identifier. Binding uses a key-value database, with the source identifier as the unique key. Sketch parameters are serialized into values, including the full parameter set for anchor points, guide lines, offset tolerance bands, and deformation fields. Serialization uses JSON format to ensure portability, and the key-value pair structure is fixed as nested objects to avoid parsing ambiguity; an example structure is {anchors:[[x,y]],guides:{coefficients:[]}}. The caching mechanism uses the LRU algorithm to manage space, setting an expiration policy based on business frequency, such as daily refresh, which is derived from the source identifier's metadata. Immediately after binding, cache integrity is verified by checking for consistency before and after serialization using a SHA-256 hash function, ensuring data integrity and no tampering.
[0102] The binding cache process enables the persistence of sketches, facilitating fast loading in businesses with frequent layout changes and supporting adaptive iteration.
[0103] S5-3 triggers lightweight identification and verification.
[0104] The update effect is verified to confirm stability. A lightweight recognition verification is triggered on the current image using the updated sketch. The verification process injects the updated parameterized field sketch as a priori, and the decoder in step S3 is rerun, but the computation depth is limited, such as reducing it to half the original number of layers for lightweighting, specifically by skipping intermediate layers. It is confirmed that the corrected alignment path and sampling window can stably produce field content consistent with the relationship. Stability is evaluated by comparing the confidence difference of the fields before and after. The difference threshold, such as 0.1, is optimized based on the standard error of the validation set. An alarm is triggered, and if it is exceeded, it is logged. The verification focuses on adjusting the field regions specified by the indication to avoid recalculating the entire image to save resources. The regions are delineated by the deformation field boundary.
[0105] The verification operation validated the reliability of the update, ensuring consistent output across images with varying lighting and backgrounds, laying a foundation of confidence for the final output.
[0106] S5-4 outputs the final field results and field confidence.
[0107] After successful verification, structured results need to be integrated. The final field results and field confidences are output. Results are aggregated from the field content generated during review, and confidences are inherited from the updated field confidences. The output format is a JSON object, where the key is the field identifier and the value is a content-confidence pair, ensuring it is bound to the source identifier to match business requirements. A complete example is {field_id:{content:string,confidence:float}}. A final consistency check is performed before output, using a field relationship graph to verify no remaining conflicts. The traversal threshold is, for example, 0.6, based on the score inheritance from step S4. If conflicts exist, the loop returns to step S4 for adjustment. The termination condition is that all scores meet the threshold or the iteration limit is reached, such as 3 times.
[0108] The output process provides stable structured data, suppressing omissions and misreads in scenarios with varying document sources, and supporting the system's deployment pace.
[0109] Step S5 completes the processing from adjustment instructions to parameterized field sketch updates, caching, and review output, enhancing adaptability in business environments with frequent layout evolution and deviations, and supporting stable and reusable field results.
[0110] Example 2: Figure 2 The present invention provides an image recognition system based on deep learning, comprising: The feature extraction module processes document images and source identifiers, and completes synchronous representation through a feature extraction network. The input is document images and source identifiers, and the output is a global feature map and a text feature map.
[0111] The relationship building module generates text and region candidates based on the global feature map and text feature map, constructs a field relationship graph and generates a parameterized field sketch. The input is the global feature map and text feature map, and the output is the field relationship graph and the parameterized field sketch with bound source identifier.
[0112] The path decoding module calculates the alignment compliance coefficient based on the text feature map and the parameterized field sketch, sets the alignment and sampling parameters, and injects them into the decoder to complete the recognition. The input is the text feature map and the parameterized field sketch, and the output is the field content and the field confidence.
[0113] The consistency verification module performs consistency verification on the field content based on the field relationship diagram. For fields with insufficient confidence or conflicts, it performs local relocation and re-decoding. The input is the field relationship diagram and the field content, and the output is the adjustment instruction and the updated field content.
[0114] The sketch update module updates the position and deformation parameters of the parameterized field sketch according to the adjustment instructions, performs caching and reuse verification, takes the adjustment instructions as input, and outputs the final field results and field confidence.
[0115] It should be noted that the system of the present invention can be deployed on the device itself to realize embedded applications, or it can run on a PC or other terminal with a user interface, thereby meeting a variety of hardware environments and usage requirements.
[0116] The foregoing has only described certain exemplary embodiments of the present invention by way of illustration. Undoubtedly, those skilled in the art can modify the described embodiments in various ways without departing from the spirit and scope of the present invention. Therefore, the foregoing drawings and descriptions are illustrative in nature and should not be construed as limiting the scope of protection of the claims of the present invention.
[0117] It should be noted that, in this document, the use of relational terms such as "first" and "second" is merely to distinguish one entity or operation from another, and does not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes the element.
[0118] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A deep learning-based image recognition method, characterized in that, Including the following steps: S1. Receive the document image and source identifier, and simultaneously output the global feature map and text feature map using the feature extraction network; S2. Construct a field relationship graph based on the global feature map and text feature map and generate a parameterized field sketch. The field sketch describes the field positional relationship and offset tolerance, and is bound to the source identifier. S3. Before the decoder generates the alignment path, the alignment and sampling parameters are set according to the alignment flexibility coefficient. The parameterized field sketch is injected into the decoder as a gradient-based spatial prior. The text feature map is then used to complete line-level character recognition and output the field content and field confidence. S4. Perform consistency checks on field content based on the field relationship diagram, perform local relocation and re-decoding on fields with insufficient confidence or conflicts, generate adjustment instructions, and update field content; S5. Update the position and deformation parameters in the parameterized field sketch according to the adjustment instructions, cache the updated field sketch according to the source identifier, and output the final field result and field confidence after completing one reuse verification in the current image.
2. The image recognition method based on deep learning according to claim 1, characterized in that: After receiving the document image and source identifier in step S1, the feature extraction network completes two-way synchronous representation. The backbone network shares the convolutional backbone and retains the input coordinate system. Through multi-scale feature fusion, it outputs a global feature map and a text feature map. The global feature map focuses on the layout structure and object boundaries, while the text feature map emphasizes strokes and character textures. The same upsampling grid is shared in the two output heads, and a learnable small offset is introduced to align the coordinates of the two feature maps in the spatial dimension. The network output contains the semantic embedding and orientation response of each pixel.
3. The image recognition method based on deep learning according to claim 1, characterized in that: In step S2, text and region candidates are generated based on the global feature map and text feature map, and a field relationship graph is constructed. The candidate regions are used as nodes, and adjacent, paired, contained, and aligned are used as edge types. The edge weight is jointly estimated by the geometric relative position and semantic similarity between nodes.
4. The image recognition method based on deep learning according to claim 3, characterized in that: Based on the field relationship diagram, a parametric field sketch is generated. The anchor point set marks the position of key fields, the guide line set describes the direction and curvature of field rows, the offset tolerance band defines the deformation range of each field, and the deformation field gives the mapping from the input coordinate system to the sketch coordinate system. The parametric field sketch is bound to the source identifier to form a priori description of the layout.
5. The image recognition method based on deep learning according to claim 4, characterized in that: In step S3, the baseline curvature deviation is calculated based on the text feature map and the parameterized field sketch to measure the curvature difference between the text line trajectory and the guide line. The reflective stroke occlusion ratio is used to measure the degree of occlusion of the stroke support by the highlight reflection. The baseline curvature deviation and the reflective stroke occlusion ratio are input into the monotonic complementary learner to obtain the alignment compliance coefficient. The alignment and sampling parameters are set based on the alignment compliance coefficient. The parameterized field sketch is injected into the decoder as a gradient-based spatial prior to complete the line-level recognition of the text feature map and output the field content and field confidence.
6. The image recognition method based on deep learning according to claim 5, characterized in that: The baseline radian deviation calculation process first extracts the line baseline from the attention center trajectory of the text feature map, uses the attention mechanism to aggregate the directional response to generate a continuous curve, and then compares the point-to-point angle difference with the guide line direction field of the parameterized field sketch to obtain the proportion of the over-tolerance radian band as the output. The process of calculating the reflective stroke occlusion ratio first locates the bright candidate region in the joint space of brightness and saturation of the text feature map, then generates a stroke direction consistency mask, filters consistent pixels through histogram projection, and calculates the intersection and union area ratio as the output.
7. The image recognition method based on deep learning according to claim 1, characterized in that: In step S4, consistency checks are performed on the field content based on the field relationship graph, and a consistency score is calculated for each edge type to evaluate the joint matching of field confidence and geometric consistency.
8. The image recognition method based on deep learning according to claim 7, characterized in that: When the consistency score indicates insufficient confidence or relationship conflict, an adjustment instruction is generated. A local re-checkpoint is located on the guide line of the corresponding field. Based on the deformation field of the parameterized field sketch, the corresponding region is relocated and re-decoded. The field content and field confidence are updated, and the guide line offset and tolerance band change are recorded.
9. The image recognition method based on deep learning according to claim 8, characterized in that: In step S5, the position and deformation parameters of the parametric field sketch are updated according to the adjustment instructions. Displacement is superimposed at the anchor point, the bending trend is corrected at the guide line control point, the shape boundary is tightened or widened in the offset tolerance zone, the mapping coefficients are locally updated in the deformation field, the updated parametric field sketch is bound to the cache according to the source identifier, and a lightweight recognition verification is triggered on the current image with the updated sketch to confirm that the field content is consistent with the alignment path and the sampling window output relationship, and the final field result and field confidence are output.
10. A deep learning-based image recognition system, used to implement the deep learning-based image recognition method according to any one of claims 1-9, characterized in that, include: The feature extraction module processes document images and source identifiers, and completes synchronous representation through a feature extraction network. The input is document images and source identifiers, and the output is global feature maps and text feature maps. The relationship building module generates text and region candidates based on the global feature map and text feature map, constructs a field relationship graph and generates a parameterized field sketch. The input is the global feature map and text feature map, and the output is the field relationship graph and the parameterized field sketch bound to the source identifier. The path decoding module calculates the alignment compliance coefficient based on the text feature map and the parameterized field sketch, sets the alignment and sampling parameters and injects them into the decoder to complete the recognition. The input is the text feature map and the parameterized field sketch, and the output is the field content and the field confidence. The consistency verification module performs consistency verification on the field content based on the field relationship diagram. For fields with insufficient confidence or conflict, it performs local relocation and re-decoding. The input is the field relationship diagram and the field content, and the output is the adjustment instruction and the updated field content. The sketch update module updates the position and deformation parameters of the parameterized field sketch according to the adjustment instructions, performs caching and reuse verification, takes the adjustment instructions as input, and outputs the final field results and field confidence.