A method for recognizing grating optical illusion characters

By constructing a DNN-based character recognition model for grating visual illusion perception and utilizing multi-module fusion training, the problem of insufficient robustness of deep neural networks under grating distortion is solved, thereby improving the accuracy of character recognition and its application capability in complex scenarios.

CN120107749BActive Publication Date: 2025-11-14四川脑佳科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510177906.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-18
Publication Date
2025-11-14
Estimated Expiration
2045-02-18

AI Technical Summary

Technical Problem

Existing deep neural networks are not robust enough when faced with image distortion, especially rasterization distortion, making them difficult to apply effectively to text recognition tasks in complex scenes. Furthermore, existing methods are cumbersome to train and difficult to generalize.

Method used

A DNNs character recognition model with grating visual illusion perception capability is constructed. By introducing MFP, FBIAM, FFIAM and EFM modules, and using the fusion training of edge loss and recognition loss, the model is guided to learn global shape preferences, thereby improving the grating visual illusion perception capability.

Benefits of technology

It improves the robustness and accuracy of text recognition, especially in text recognition presented by grating optical illusion, enhancing the reliability of the system and improving the accuracy of scene character recognition and camouflaged target detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120107749B_ABST
    Figure CN120107749B_ABST
Patent Text Reader

Abstract

This invention discloses a method for recognizing grating optical illusion text. First, a DNN-based text recognition model with grating optical illusion perception is constructed. The DNN-based model is trained using the MNIST training set, and then tested using a test set. The test image is input into the text recognition model to obtain side-level output features and multi-scale fusion features. The side-level output features are processed by the FFIAM module to obtain attention-modulated side-level output features. The set with the smallest feature size among the attention-modulated side-level output features is input into the classification layer to obtain the probability output of text recognition. Finally, the text recognition result is obtained, completing the grating optical illusion text recognition. This method guides DNNs to learn global shape preferences rather than local features during training, thereby improving the grating optical illusion perception capability of DNNs, enhancing the robustness of text recognition, and helping to improve the recognition accuracy of text presented in a grating optical illusion manner on printed materials and billboards in scene character recognition tasks, thus improving system reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer vision and deep learning technology, and specifically relates to a method for recognizing grating optical illusion characters. Background Technology

[0002] Deep Neural Networks (DNNs) possess the ability to express strong semantic-level features and perform exceptionally well in computer vision tasks such as image recognition. However, compared to the human visual system, distortions in input images, such as blurring and rasterization, can easily cause a sharp drop in neural network performance. Conversely, the human visual system has evolved to extract features from complex scenes and perform recognition and decision-making using limited sensory information. Illusion contour perception is crucial to this process; even if there are breaks in the continuity of adjacent features, global contour perception still occurs, demonstrating the robustness of the human visual system to distorted or occluded scenes. Raster visual illusions, as a classic type of illusion contour, are widely used in psychological and neurophysiological research, but the raster visual illusion perception capability of DNNs has received very little research and application. Therefore, constructing a brain-inspired DNN text recognition model with raster visual illusion perception capability can improve the robustness of text recognition, and DNNs with illusion perception capability are expected to be applied to computer vision tasks such as scene character recognition and camouflaged target detection to improve their performance, thus promoting the development of applications such as autonomous driving and rescue robots.

[0003] Raster visual illusion perception refers to the ability of biological visual systems to perceive clear boundaries in areas lacking color contrast or brightness gradients. Besides humans, this ability is also widely found in non-human primates, fish, birds, and other organisms. This indicates that raster visual illusion perception plays a fundamental and crucial role in biological visual systems, and theoretically, it should be one of the visual perception capabilities that DNNs (Digital Neural Networks) should possess. However, current DNNs based on Convolutional Neural Networks (CNNs) and Transformer architectures primarily employ pure feedforward architectures, exhibiting almost no raster visual illusion perception capability. Furthermore, existing methods for improving DNN visual illusion perception suffer from cumbersome training paradigms and lengthy iteration steps, making them difficult to directly generalize to complex real-world tasks. Summary of the Invention

[0004] To address the aforementioned technical problems, this invention provides a grating optical illusion character recognition method that guides DNNs to learn global shape preferences rather than local features during training, thereby improving the grating optical illusion perception capability of DNNs and enhancing the robustness of character recognition.

[0005] The technical solution adopted in this invention is: a grating optical illusion character recognition method, the specific steps of which are as follows:

[0006] S1. Construct a DNNs character recognition model with grating visual illusion perception;

[0007] The DNNs text recognition model includes: a text recognition model and an edge detection model.

[0008] The edge detection model is used to provide pseudo-labels for edge maps; the text recognition model includes: 1 MFP module, 4 cortical column modules, 3 FFIAM modules, 3 EFM modules, and 1 classification layer module.

[0009] The four cortical column modules are the primary visual cortex V1 column, the secondary visual cortex V2 column, and the two visual fourth area V4 columns.

[0010] The primary visual cortex V1 column includes: one primary stage 1 module, one FBIAM module, one primary stage 2 module, and one primary stage 3 module. The secondary visual cortex V2 column includes: one pooling layer, one secondary stage 1 module, one FBIAM module, one secondary stage 2 module, and one secondary stage 3 module. The first visual cortex V4 column includes: one pooling layer, one V4 stage 1 module, one FBIAM module, one V4 stage 2 module, and one V4 stage 3 module. The second visual cortex V4 column includes: one pooling layer, one V4 stage 1 module, one V4 stage 2 module, and one V4 stage 3 module.

[0011] S2. Train the DNNs text recognition model using the MNIST training set. First, input the training image into the edge detection model and the text recognition model respectively. The edge detection model obtains edge map pseudo-labels, and the text recognition model obtains four sets of side output features and a set of multi-scale fusion features based on the MFP module.

[0012] S3. Input the four sets of side output features from step S2 into the FFIAM module to obtain three sets of attention-modulated side output features;

[0013] S4. Input the group with the smallest feature size among the attention-modulated side output features obtained in step S3 into the classification layer module, and then pass it through a global average pooling layer, an LN layer and a fully connected linear layer to obtain the probability output of text recognition.

[0014] The probability output for character recognition is the probability of belonging to each category, and the MNIST dataset used has a total of 10 categories.

[0015] S5. Calculate the recognition loss by combining the text recognition probability output from step S4 with the text label using the cross-entropy loss function.

[0016] S6. Input the attention-modulated side output features obtained in step S3 and the multi-scale fusion features obtained in step S2 into the EFM module and integrate them to obtain the edge prediction map. Then, calculate the edge loss with the edge map pseudo-label in step S2 through the edge loss function.

[0017] S7. The recognition loss in step S5 and the edge loss in step S6 are weighted and summed to obtain the fusion loss function. The process is then iterated until the maximum number of training iterations is set in advance to complete the training of the DNNs character recognition model and obtain the trained model.

[0018] S8. Based on the DNNs text recognition model trained in step S7, test it using the MNIST test set, that is, input the test image into the trained model for testing, obtain the text recognition result, and complete the grating visual illusion text recognition.

[0019] Furthermore, step S2 is specifically as follows:

[0020] S21. Input the training image into the edge detection model to obtain the pseudo-label of the edge map;

[0021] S22. Input the training image into the MFP module to obtain a set of multi-scale fusion features;

[0022] The input image is fed in parallel into four convolutional layers with dilatancy ratios of 2, 4, 6, and 7, each with a kernel size of 3×3 and an output channel count of C1. The four outputs are summed, passed through an LN layer, and then shuffled to output multi-scale fused features.

[0023] Where C1 = 64.

[0024] S23. The multi-scale fusion features in step S22 are sequentially passed through four sub-modules consisting of depthwise separable convolutions with different receptive field sizes, namely four cortical column modules, to obtain four sets of side output features.

[0025] 1) The first submodule is the primary visual cortex V1 cortical column;

[0026] First, the multi-scale fusion feature is fed into the primary first-stage module to obtain the output feature of the first stage. That is, the multi-scale fusion feature is first fed into a depthwise separable convolutional layer with a receptive field size of 5×5 and the number of output channels of C1, then through a depthwise separable convolutional layer with a receptive field size of 3×3, a dilation rate of 2, and the number of output channels of 2×C1, and then through a convolutional layer with a receptive field size of 1×1 and the number of output channels of C1. The resulting output is added to the multi-scale fusion feature in step S22 to obtain the output feature of the first stage.

[0027] The output features from the first stage are then fed into the FBIAM module, while the second set of side output features are fed back into the FBIAM module to obtain the output features of the FBIAM module. In other words, the two input features are first fused through a feedback channel attention module to obtain the channel attention result, which is then fed into the multi-scale spatial attention module to obtain the output features of the FBIAM module, as detailed below:

[0028] The second set of side output features is first upsampled to twice the original resolution through deconvolution. Then, it is sequentially fed into a convolutional layer with a receptive field size of 1×1 and C output channels, and an LN layer, to obtain the alignment result of the second set of side output features. The output features of the first stage are fed in parallel into spatial average pooling and spatial max pooling, yielding the output results of spatial average pooling and spatial max pooling, respectively. These two outputs are then fed into a shared convolutional layer with a receptive field size of 1×1 and k×C output channels, a GELU layer, and another shared convolutional layer with a receptive field size of 1×1 and C output channels, respectively. The two processed results are then added together, passed through a sigmoid function, and multiplied with the output features of the first stage using a Hadamard product, yielding the processed result of the first stage output features. This result is then added to the alignment result of the second set of side output features to obtain the channel attention result. Then, the channel attention results are fed in parallel into channel average pooling and channel max pooling, and the two results are concatenated. The concatenated result is then fed in parallel into a convolutional layer with a receptive field size of 3×7 and 1 output channel, a convolutional layer with a receptive field size of 5×13 and 1 output channel, a convolutional layer with a receptive field size of 7×3 and 1 output channel, and a convolutional layer with a receptive field size of 13×5 and 1 output channel. The four results are added together and passed through the sigmoid function, and then Hadamard product is performed with the channel attention results. The product result is added together with the channel attention results and then subjected to channel shuffle to obtain the multi-scale spatial attention result, which is the output feature of the FBIAM module.

[0029] Where C represents the smaller number of channels between the two inputs, and k is set to 4.

[0030] Finally, the output features of the FBIAM module are passed to the primary second-stage module, and the resulting output is added to the output features of the FBIAM module to obtain the output features of the second stage. This output feature is then passed to the primary third-stage module to obtain the first set of side output features. Specifically, the output features of the FBIAM module are passed to a depthwise separable convolutional layer with a receptive field size of 4×4, a dilation rate of 2, and 2×C1 output channels. Then, the layer passes through a convolutional layer with a receptive field size of 1×1 and 1 output channels. The resulting output is then added to the output features of the FBIAM module to obtain the output features of the second stage. Finally, the output features of the second stage are passed to a depthwise separable convolutional layer with a receptive field size of 4×4, a dilation rate of 2, and 1 output channel to obtain the first set of side output features.

[0031] 2) The second submodule is the secondary visual cortex V2 cortical column;

[0032] First, the output features of the second stage in the primary visual cortex V1 column are passed through a pooling layer and then fed into the secondary first-stage module to obtain the output features of the first stage. That is, the output features of the second stage in the first sub-module are passed through a pooling layer, downsampled to half the original resolution, and then fed into a depthwise separable convolutional layer with a receptive field size of 6×6, a hole ratio of 2, and a number of output channels of C2 to obtain the output features of the first stage.

[0033] Where C2 = 128.

[0034] The output features of the first stage are then fed into the FBIAM module, and the third set of side output features are fed back into the FBIAM module to obtain the output features of the FBIAM module.

[0035] The FBIAM module structure and processing flow are consistent in the primary visual cortex V1 column, the secondary visual cortex V2 column, and the first visual fourth zone V4 column.

[0036] Finally, the output features of the FBIAM module are passed to the secondary second-stage module, and the resulting output is added to the output features of the FBIAM module to obtain the output features of the second stage. This output feature is then passed to the secondary third-stage module, and the resulting output is added to the output features of the second stage to obtain the second set of side output features. That is, the output features of the FBIAM module are passed to a depthwise separable convolutional layer with a receptive field size of 7×7, a dilation rate of 2, and a number of output channels of C2. Then, it passes through a depthwise separable convolutional layer with a receptive field size of 3×3, a dilation rate of 6, and a number of output channels of 2×C2. Finally, it passes through a convolutional layer with a receptive field size of 1×1 and a number of output channels of C2. The resulting output is then added to the output features of the FBIAM module to obtain the output features of the second stage. The output features of the second stage are then fed into a depthwise separable convolutional layer with a receptive field size of 7×7, a dilation rate of 2, and an output channel number of 2×C2. After passing through a convolutional layer with a receptive field size of 1×1 and an output channel number of C2, the resulting output is added to the output features of the second stage to obtain the second set of side output features.

[0037] 3) The third submodule is the first visual fourth zone V4 cortical column;

[0038] First, the output features of the second stage in the secondary visual cortex V2 cortical column are passed through a pooling layer and then fed into the first stage module of the fourth region to obtain the output features of the first stage. That is, the output features of the second stage in the second sub-module are passed through a pooling layer, downsampled to half of the original resolution, and then fed into a depthwise separable convolutional layer with a receptive field size of 7×7, a hole ratio of 3, and a number of output channels of C3 to obtain the output features of the first stage.

[0039] Where C3 = 256.

[0040] The output features of the first stage are then fed into the FBIAM module, and the fourth set of side output features are fed back into the FBIAM module to obtain the output features of the FBIAM module.

[0041] Finally, the output features of the FBIAM module are passed to the second-stage module in the fourth region, and the resulting output is added to the output features of the FBIAM module to obtain the output features of the second stage. This output feature is then passed to the third-stage module in the fourth region, and the resulting output is added to the output features of the second stage to obtain the third set of side output features. That is, the output features of the FBIAM module are passed to a depthwise separable convolutional layer with a receptive field size of 9×9, a dilation rate of 3, and C3 output channels, then through a depthwise separable convolutional layer with a receptive field size of 3×3, a dilation rate of 12, and 2×C3 output channels, and then through a convolutional layer with a receptive field size of 1×1 and C3 output channels. The resulting output is then added to the output features of the FBIAM module to obtain the output features of the second stage. The output features from the second stage are then fed into a depthwise separable convolutional layer with a receptive field size of 9×9, a dilation rate of 3, and 2×C3 output channels. After passing through a convolutional layer with a receptive field size of 1×1 and 3 output channels, the resulting output is added to the output features from the second stage to obtain the third set of side output features.

[0042] 4) The fourth submodule is the second visual fourth area V4 cortical column;

[0043] First, the output features of the second stage in the V4 cortical column of the first visual region are passed through a pooling layer and then fed into the first stage module of the fourth region to obtain the output features of the first stage. That is, the output features of the second stage in the third sub-module are passed through a pooling layer, downsampled to half of the original resolution, and then fed into a depthwise separable convolutional layer with a receptive field size of 7×7, a dilatancy of 3, and C4 output channels to obtain the output features of the first stage.

[0044] Where C4 = 512.

[0045] Then, the output features of the first stage are fed into the second stage module of the fourth region, and the output is added to the output features of the first stage to obtain the output features of the second stage. Finally, the output features of the second stage are fed into the third stage module of the fourth region, and the output is added to the output features of the second stage to obtain the fourth set of side output features. That is, the output features of the first stage are fed into a depthwise separable convolutional layer with a receptive field size of 9×9, a dilation rate of 3, and a number of output channels of C4, then passed through a depthwise separable convolutional layer with a receptive field size of 3×3, a dilation rate of 12, and a number of output channels of 2×C4, and then passed through a convolutional layer with a receptive field size of 1×1 and a number of output channels of C4. The output is then added to the output features of the first stage to obtain the output features of the second stage. The output features from the second stage are then fed into a depthwise separable convolutional layer with a receptive field size of 9×9, a dilation rate of 3, and 2×C4 output channels. After passing through a convolutional layer with a receptive field size of 1×1 and 4 output channels, the resulting output is added to the output features from the second stage to obtain the fourth set of side output features.

[0046] Furthermore, step S3 is specifically as follows:

[0047] S31. Arrange the four sets of side output features obtained in step S2 in descending order of feature size;

[0048] S32. Based on the sorting results of step S31, the first set of features and the second set of features are fed into the first FFIAM to obtain the first set of attention-modulated side output features.

[0049] The first set of features and the second set of features are first fused through a feedforward channel attention module to obtain the channel attention result. Then, the channel attention result is fed into a multi-scale spatial attention module to obtain the side output features of the first set of attention modulation, as follows:

[0050] The first set of features is sequentially passed through a downsampling layer, an LN layer, and a convolutional layer with a receptive field size of 1×1 and C5 output channels to obtain the alignment result of the first set of features. The alignment result of the first set of features is then passed in parallel to spatial average pooling and spatial max pooling to obtain the output results of spatial average pooling and spatial max pooling, respectively. Then, the two output results are passed sequentially to a convolutional layer with a receptive field size of 1×1 and k×C5 output channels, a GELU layer, and a convolutional layer with a receptive field size of 1×1 and C5 output channels to obtain two processed results. The two processed results are then added together, passed through a sigmoid function, and multiplied with the alignment result of the first set of features by a Hadamard product. This result is then added to the second set of features to obtain the channel attention result. Then, the channel attention results are fed in parallel into channel average pooling and channel max pooling, and the two results are concatenated. The concatenated result is then fed in parallel into a convolutional layer with a receptive field size of 3×7 and 1 output channel, a convolutional layer with a receptive field size of 5×13 and 1 output channel, a convolutional layer with a receptive field size of 7×3 and 1 output channel, and a convolutional layer with a receptive field size of 13×5 and 1 output channel. The four results are added together and passed through the sigmoid function, and then multiplied with the channel attention results by Hadamard. The product result is added together with the channel attention result and then shuffled by the channels to obtain the multi-scale spatial attention result, which is the side output feature of the first set of attention modulation.

[0051] Where C5 represents the larger channel number of the two inputs, and k is set to 4. In the text recognition model, the three FFIAM modules have the same structure and processing flow.

[0052] S33. Input the obtained first set of attention-modulated side output features and the third set of features into the second FFIAM to obtain the second set of attention-modulated side output features.

[0053] S34. Input the second set of attention-modulated side output features and the fourth set of features into the third FFIAM to obtain the third set of attention-modulated side output features.

[0054] Furthermore, step S5 is specifically as follows:

[0055] Let P be the probability output of character recognition in step S4. cls Its dimensions are N×M; the text label is represented as Y. cls Its dimensions are N×M.

[0056] Where N represents the number of samples in a batch, and M represents the total number of categories identified.

[0057] Then, P is calculated using the cross-entropy loss function.cls With Y cls Inter-recognition loss L cls The calculation expression is as follows:

[0058]

[0059] Among them, y ij p represents the true label of sample i in category j. ij This represents the predicted probability of sample i in category j.

[0060] Furthermore, step S6 is specifically as follows:

[0061] S61. Input the attention-modulated side output features obtained in step S3 and the multi-scale fusion features obtained in step S2 into the EFM module and integrate them to obtain the edge prediction map.

[0062] First, the three sets of attention-modulated side output features obtained in step S3 and the multi-scale fusion features obtained in step S2 are arranged in ascending order of size. Then, the first and second sets of features are fed into the first EFM to obtain the output result of the first EFM, as follows:

[0063] The two sets of input features are sequentially passed through a convolutional layer with a receptive field size of 5×5 and an output channel number of C6, an LN layer, and a GELU layer. The smaller feature is upsampled to twice the original resolution and added to the other feature to obtain the output result of the first EFM.

[0064] Where C6 represents the smaller channel number of the two inputs.

[0065] Then, the output of the first EFM and the third set of features are passed into the second EFM to obtain the output of the second EFM. The specific processing flow is the same as that of the first EFM. The output of the second EFM and the fourth set of features are passed into the third EFM to obtain the output of the third EFM, which is the edge prediction map.

[0066] S62. Based on the edge prediction map obtained in step S61 and the pseudo-label of the edge map in step S2, the edge loss is calculated using the edge loss function.

[0067] The pseudo-label of the edge map obtained in step S2 is represented as Y. edge =(y j ,j=1,…,|Y edge |),y j ∈[0,1].

[0068] Among them, y j This represents the pixel value at the j-th pixel.

[0069] Then Y edge The samples are classified into positive and negative sets, denoted as Y. + ={y j ,y j >η} and Y - ={y j ,y j =0}, all other pixel values ​​are ignored, η represents the pixel value threshold, set to 0.2;

[0070] Then, let P represent the edge prediction map obtained in step S61. edge =(p j ,j=1,…,|P edge |),p j ∈[0,1].

[0071] Where, p j This represents the value at the j-th pixel after processing with a sigmoid function.

[0072] Finally, the edge loss function is used to calculate the pseudo-label Y of the edge map. edge and edge prediction map P edge Edge loss L edge The calculation expression is as follows:

[0073]

[0074]

[0075] Where α and β represent weighting coefficients, and λ represents the weight controlling the magnitude of the coefficient, set to 1.

[0076] Furthermore, in step S7, the weighted sum of the identification loss in step S5 and the edge loss in step S6 is as follows:

[0077] Let the total loss be L total The calculation expression is as follows:

[0078] L total =L cls +γ·L edge

[0079] Where γ represents the weighting coefficient, which is set to 0.01.

[0080] The beneficial effects of this invention are as follows: The method of this invention first constructs a DNNs character recognition model with grating visual illusion perception, trains the DNNs character recognition model using the MNIST training set, and then tests the trained model using a test set. The test image is input into the character recognition model to obtain side output features and multi-scale fusion features. The side output features are passed through the FFIAM module to obtain attention-modulated side output features. The group with the smallest feature size among the attention-modulated side output features is passed into the classification layer to obtain the probability output of character recognition. Finally, the character recognition result is obtained, thus completing the grating visual illusion character recognition. The method of this invention constructs a DNN-based text recognition model with grating optical illusion perception based on the relevant neural mechanisms of grating optical illusion perception. Simultaneously, it constructs MFP, FBIAM, FFIAM, and EFM modules, and utilizes the fusion of edge loss and recognition loss to guide the DNN model to learn global contour perception capabilities during training. This means learning global shape preferences rather than local features, endowing the model with grating optical illusion perception capabilities, thereby improving the accuracy and robustness of text recognition. This helps improve the recognition accuracy of text presented in a grating optical illusion manner on printed materials and billboards in scene character recognition tasks, enhancing system reliability. Furthermore, the method of this invention can also be applied to camouflage target detection tasks, utilizing the global contour perception attribute of optical illusions to improve the accuracy of camouflage target detection. Attached Figure Description

[0081] Figure 1 This is a flowchart of a grating optical illusion text recognition method according to the present invention.

[0082] Figure 2 This is a schematic diagram of the DNNs text recognition model described in an embodiment of the present invention.

[0083] Figure 3 This is a schematic diagram of the Multi-scale Feature Projection (MFP) module in an embodiment of the present invention.

[0084] Figure 4 This is a schematic diagram of the Feedback Interaction Attention Module (FBIAM) in an embodiment of the present invention.

[0085] Figure 5 This is a schematic diagram of the Feedforward Interaction Attention Module (FFIAM) in an embodiment of the present invention.

[0086] Figure 6 This is a schematic diagram of the Edge Fusion Module (EFM) in an embodiment of the present invention.

[0087] Table 1 compares the identification results of the present invention with those of other methods. Detailed Implementation

[0088] The method of the present invention will be further described below with reference to the accompanying drawings and embodiments.

[0089] like Figure 1 The flowchart of a grating optical illusion character recognition method of the present invention is shown below, and the specific steps are as follows:

[0090] S1. Construct a DNNs character recognition model with grating visual illusion perception;

[0091] like Figure 2 As shown, the DNNs text recognition model includes: a text recognition model and an edge detection model.

[0092] The edge detection model is used to provide pseudo-labels for edge maps; the text recognition model includes: 1 MFP module, 4 cortical column modules, 3 FFIAM modules, 3 EFM modules, and 1 classification layer module (i.e., Figure 2 (Classifier in the text).

[0093] The four cortical column modules are the primary visual cortex V1 column, the secondary visual cortex V2 column, and the two visual fourth area V4 columns.

[0094] The primary visual cortex V1 column includes: one primary stage 1 module, one FBIAM module, one primary stage 2 module, and one primary stage 3 module. The secondary visual cortex V2 column includes: one pooling layer, one secondary stage 1 module, one FBIAM module, one secondary stage 2 module, and one secondary stage 3 module. The first visual cortex V4 column includes: one pooling layer, one V4 stage 1 module, one FBIAM module, one V4 stage 2 module, and one V4 stage 3 module. The second visual cortex V4 column includes: one pooling layer, one V4 stage 1 module, one V4 stage 2 module, and one V4 stage 3 module.

[0095] S2. Train the DNNs text recognition model using the MNIST training set. First, input the training image into the edge detection model and the text recognition model respectively. The edge detection model obtains edge map pseudo-labels, and the text recognition model obtains four sets of side output features and a set of multi-scale fusion features based on the MFP module.

[0096] S3. Input the four sets of side output features from step S2 into the FFIAM module to obtain three sets of attention-modulated side output features;

[0097] S4. Input the group with the smallest feature size among the attention-modulated side output features obtained in step S3 into the classification layer module, and then pass it through a global average pooling layer, an LN layer and a fully connected linear layer to obtain the probability output of text recognition.

[0098] The probability output for character recognition is the probability of belonging to each category, and the MNIST dataset used has a total of 10 categories.

[0099] S5. Calculate the recognition loss by combining the text recognition probability output from step S4 with the text label using the cross-entropy loss function.

[0100] S6. Input the attention-modulated side output features obtained in step S3 and the multi-scale fusion features obtained in step S2 into the EFM module and integrate them to obtain the edge prediction map. Then, calculate the edge loss with the edge map pseudo-label in step S2 through the edge loss function.

[0101] S7. The recognition loss in step S5 and the edge loss in step S6 are weighted and summed to obtain the fusion loss function. The process is then iterated until the maximum number of training iterations is set in advance to complete the training of the DNNs character recognition model and obtain the trained model.

[0102] In this embodiment, the maximum number of training iterations is 100.

[0103] S8. Based on the DNNs text recognition model trained in step S7, test it using the MNIST test set. That is, input the test image (the corresponding grating optical illusion image) into the trained model for testing, obtain the text recognition result, and complete the grating optical illusion text recognition.

[0104] In this embodiment, step S2 is specifically as follows:

[0105] S21. Input the training image into the edge detection model to obtain the pseudo-label of the edge map;

[0106] like Figure 2 As shown on the left, this embodiment uses the LVP-Net edge detection model pre-trained on the BSDS500-VOC dataset to generate edge maps, and uses the edge maps after non-maximum suppression as pseudo-labels for the edge maps.

[0107] S22. Input the training image into the MFP module to obtain a set of multi-scale fusion features;

[0108] like Figure 3As shown, the input image is fed in parallel into four convolutional layers with a kernel size of 3×3 and an output channel number of C1, with dilatancy ratios of 2, 4, 6 and 7 respectively. The four outputs are added together, and after passing through an LN (Layer Normalization) layer and channel shuffling, multi-scale fused features are output.

[0109] Where C1 = 64.

[0110] S23. The multi-scale fusion features in step S22 are sequentially passed through four sub-modules consisting of depthwise separable convolutions with different receptive field sizes, namely four cortical column modules, to obtain four sets of side output features.

[0111] Inspired by the neural mechanism of grating visual illusions, in addition to pooled feedforward connections, sub-modules also interact with each other through feedback connections. The receptive field size gradually increases with increasing layer depth, as shown in the specific structure. Figure 2 As shown, DW represents depthwise separable convolution, and C1, C2, C3 and C4 are equal to 64, 128, 256 and 512 respectively.

[0112] 1) The first submodule is the primary visual cortex V1 cortical column;

[0113] First, the multi-scale fusion feature is fed into the primary first-stage module to obtain the output feature of the first stage. That is, the multi-scale fusion feature is first fed into a depthwise separable convolutional layer with a receptive field size of 5×5 and the number of output channels of C1, then through a depthwise separable convolutional layer with a receptive field size of 3×3, a dilation rate of 2, and the number of output channels of 2×C1, and then through a convolutional layer with a receptive field size of 1×1 and the number of output channels of C1. The resulting output is added to the multi-scale fusion feature in step S22 to obtain the output feature of the first stage.

[0114] like Figure 4 As shown, the output features obtained from the first stage are fed into the Feedback Interaction Attention Module (FBIAM), and the second set of side output features are simultaneously fed back into the FBIAM module to obtain the output features of the FBIAM module. That is, the two input features are first fused through a feedback channel attention module to obtain the channel attention result, and then the channel attention result is fed into the multi-scale spatial attention module to obtain the output features of the FBIAM module, as detailed below:

[0115] The second set of side output features is first upsampled to twice the original resolution through deconvolution. Then, it is sequentially fed into a convolutional layer with a receptive field size of 1×1 and C output channels, and an LN layer, to obtain the alignment result of the second set of side output features. The output features of the first stage are fed in parallel into spatial average pooling and spatial max pooling, respectively, to obtain the output results of spatial average pooling and spatial max pooling. These two output results are then fed into a shared convolutional layer with a receptive field size of 1×1 and k×C output channels, a Gaussian error linear unit (GELU), and another shared convolutional layer with a receptive field size of 1×1 and C output channels, respectively. The two processed results are then added together, passed through a sigmoid function, and multiplied with the output features of the first stage using a Hadamard product to obtain the processed output features of the first stage. This result is then added to the alignment result of the second set of side output features to obtain the channel attention result. Then, the channel attention results are fed in parallel into channel average pooling and channel max pooling, and the two results are concatenated. The concatenated result is then fed in parallel into a convolutional layer with a receptive field size of 3×7 and 1 output channel, a convolutional layer with a receptive field size of 5×13 and 1 output channel, a convolutional layer with a receptive field size of 7×3 and 1 output channel, and a convolutional layer with a receptive field size of 13×5 and 1 output channel. The four results are added together and passed through the sigmoid function, and then Hadamard product is performed with the channel attention results. The product result is added together with the channel attention results and then subjected to channel shuffle to obtain the multi-scale spatial attention result, which is the output feature of the FBIAM module.

[0116] Where C represents the smaller number of channels between the two inputs, and k is set to 4.

[0117] Finally, the output features of the FBIAM module are passed to the primary second-stage module, and the resulting output is added to the output features of the FBIAM module to obtain the output features of the second stage. This output feature is then passed to the primary third-stage module to obtain the first set of side output features. Specifically, the output features of the FBIAM module are passed to a depthwise separable convolutional layer with a receptive field size of 4×4, a dilation rate of 2, and 2×C1 output channels. Then, the layer passes through a convolutional layer with a receptive field size of 1×1 and 1 output channels. The resulting output is then added to the output features of the FBIAM module to obtain the output features of the second stage. Finally, the output features of the second stage are passed to a depthwise separable convolutional layer with a receptive field size of 4×4, a dilation rate of 2, and 1 output channel to obtain the first set of side output features.

[0118] 2) The second submodule is the secondary visual cortex V2 cortical column;

[0119] First, the output features of the second stage in the primary visual cortex V1 column are passed through a pooling layer and then fed into the secondary first-stage module to obtain the output features of the first stage. That is, the output features of the second stage in the first sub-module are passed through a pooling layer, downsampled to half the original resolution, and then fed into a depthwise separable convolutional layer with a receptive field size of 6×6, a hole ratio of 2, and a number of output channels of C2 to obtain the output features of the first stage.

[0120] Where C2 = 128.

[0121] The output features of the first stage are then fed into the FBIAM module, and the third set of side output features are fed back into the FBIAM module to obtain the output features of the FBIAM module.

[0122] The FBIAM module structure and processing flow are consistent in the primary visual cortex V1 column, the secondary visual cortex V2 column, and the first visual fourth zone V4 column.

[0123] Finally, the output features of the FBIAM module are passed to the secondary second-stage module, and the resulting output is added to the output features of the FBIAM module to obtain the output features of the second stage. This output feature is then passed to the secondary third-stage module, and the resulting output is added to the output features of the second stage to obtain the second set of side output features. That is, the output features of the FBIAM module are passed to a depthwise separable convolutional layer with a receptive field size of 7×7, a dilation rate of 2, and a number of output channels of C2. Then, it passes through a depthwise separable convolutional layer with a receptive field size of 3×3, a dilation rate of 6, and a number of output channels of 2×C2. Finally, it passes through a convolutional layer with a receptive field size of 1×1 and a number of output channels of C2. The resulting output is then added to the output features of the FBIAM module to obtain the output features of the second stage. The output features of the second stage are then fed into a depthwise separable convolutional layer with a receptive field size of 7×7, a dilation rate of 2, and an output channel number of 2×C2. After passing through a convolutional layer with a receptive field size of 1×1 and an output channel number of C2, the resulting output is added to the output features of the second stage to obtain the second set of side output features.

[0124] 3) The third submodule is the first visual fourth zone V4 cortical column;

[0125] First, the output features of the second stage in the secondary visual cortex V2 cortical column are passed through a pooling layer and then fed into the first stage module of the fourth region to obtain the output features of the first stage. That is, the output features of the second stage in the second sub-module are passed through a pooling layer, downsampled to half of the original resolution, and then fed into a depthwise separable convolutional layer with a receptive field size of 7×7, a hole ratio of 3, and a number of output channels of C3 to obtain the output features of the first stage.

[0126] Where C3 = 256.

[0127] The output features of the first stage are then fed into the FBIAM module, and the fourth set of side output features are fed back into the FBIAM module to obtain the output features of the FBIAM module.

[0128] Finally, the output features of the FBIAM module are passed to the second-stage module in the fourth region, and the resulting output is added to the output features of the FBIAM module to obtain the output features of the second stage. This output feature is then passed to the third-stage module in the fourth region, and the resulting output is added to the output features of the second stage to obtain the third set of side output features. That is, the output features of the FBIAM module are passed to a depthwise separable convolutional layer with a receptive field size of 9×9, a dilation rate of 3, and C3 output channels, then through a depthwise separable convolutional layer with a receptive field size of 3×3, a dilation rate of 12, and 2×C3 output channels, and then through a convolutional layer with a receptive field size of 1×1 and C3 output channels. The resulting output is then added to the output features of the FBIAM module to obtain the output features of the second stage. The output features from the second stage are then fed into a depthwise separable convolutional layer with a receptive field size of 9×9, a dilation rate of 3, and 2×C3 output channels. After passing through a convolutional layer with a receptive field size of 1×1 and 3 output channels, the resulting output is added to the output features from the second stage to obtain the third set of side output features.

[0129] 4) The fourth submodule is the second visual fourth area V4 cortical column;

[0130] First, the output features of the second stage in the V4 cortical column of the first visual region are passed through a pooling layer and then fed into the first stage module of the fourth region to obtain the output features of the first stage. That is, the output features of the second stage in the third sub-module are passed through a pooling layer, downsampled to half of the original resolution, and then fed into a depthwise separable convolutional layer with a receptive field size of 7×7, a dilatancy of 3, and C4 output channels to obtain the output features of the first stage.

[0131] Where C4 = 512.

[0132] Then, the output features of the first stage are fed into the second stage module of the fourth region, and the output is added to the output features of the first stage to obtain the output features of the second stage. Finally, the output features of the second stage are fed into the third stage module of the fourth region, and the output is added to the output features of the second stage to obtain the fourth set of side output features. That is, the output features of the first stage are fed into a depthwise separable convolutional layer with a receptive field size of 9×9, a dilation rate of 3, and a number of output channels of C4, then passed through a depthwise separable convolutional layer with a receptive field size of 3×3, a dilation rate of 12, and a number of output channels of 2×C4, and then passed through a convolutional layer with a receptive field size of 1×1 and a number of output channels of C4. The output is then added to the output features of the first stage to obtain the output features of the second stage. The output features from the second stage are then fed into a depthwise separable convolutional layer with a receptive field size of 9×9, a dilation rate of 3, and 2×C4 output channels. After passing through a convolutional layer with a receptive field size of 1×1 and 4 output channels, the resulting output is added to the output features from the second stage to obtain the fourth set of side output features.

[0133] In this embodiment, step S3 is specifically as follows:

[0134] S31. Arrange the four sets of side output features obtained in step S2 in descending order of feature size;

[0135] S32. Based on the sorting results of step S31, the first set of features and the second set of features are fed into the first FFIAM to obtain the first set of attention-modulated side output features.

[0136] like Figure 5 As shown, the first set of features and the second set of features are first fused through a feedforward channel attention module to obtain the channel attention result. Then, the channel attention result is fed into a multi-scale spatial attention module to obtain the side output features of the first set of attention modulation, as follows:

[0137] The first set of features is sequentially passed through a downsampling layer, an LN layer, and a convolutional layer with a receptive field size of 1×1 and C5 output channels to obtain the alignment result of the first set of features. The alignment result of the first set of features is then passed in parallel to spatial average pooling and spatial max pooling to obtain the output results of spatial average pooling and spatial max pooling, respectively. Then, the two output results are passed sequentially to a convolutional layer with a receptive field size of 1×1 and k×C5 output channels, a GELU layer, and a convolutional layer with a receptive field size of 1×1 and C5 output channels to obtain two processed results. The two processed results are then added together, passed through a sigmoid function, and multiplied with the alignment result of the first set of features by a Hadamard product. This result is then added to the second set of features to obtain the channel attention result. Then, the channel attention results are fed in parallel into channel average pooling and channel max pooling, and the two results are concatenated. The concatenated result is then fed in parallel into a convolutional layer with a receptive field size of 3×7 and 1 output channel, a convolutional layer with a receptive field size of 5×13 and 1 output channel, a convolutional layer with a receptive field size of 7×3 and 1 output channel, and a convolutional layer with a receptive field size of 13×5 and 1 output channel. The four results are added together and passed through the sigmoid function, and then multiplied with the channel attention results by Hadamard. The product result is added together with the channel attention result and then shuffled by the channels to obtain the multi-scale spatial attention result, which is the side output feature of the first set of attention modulation.

[0138] Where C5 represents the larger channel number of the two inputs, and k is set to 4. In the text recognition model, the three FFIAM modules have the same structure and processing flow.

[0139] S33. Input the obtained first set of attention-modulated side output features and the third set of features into the second FFIAM to obtain the second set of attention-modulated side output features.

[0140] S34. Input the second set of attention-modulated side output features and the fourth set of features into the third FFIAM to obtain the third set of attention-modulated side output features.

[0141] In this embodiment, step S5 is specifically as follows:

[0142] Let P be the probability output of character recognition in step S4. cls Its dimensions are N×M; the text label is represented as Y. cls Its dimensions are N×M.

[0143] Where N represents the number of samples in a batch, and M represents the total number of categories identified.

[0144] Then, P is calculated using the cross-entropy loss function.cls With Y cls Inter-recognition loss L cls The calculation expression is as follows:

[0145]

[0146] Among them, y ij p represents the true label of sample i in category j. ij This represents the predicted probability of sample i in category j.

[0147] In this embodiment, step S6 is specifically as follows:

[0148] S61. Input the attention-modulated side output features obtained in step S3 and the multi-scale fusion features obtained in step S2 into the EFM module and integrate them to obtain the edge prediction map.

[0149] First, the three sets of attention-modulated side output features obtained in step S3 and the multi-scale fusion features obtained in step S2 are arranged in ascending order of size. Then, the first and second sets of features are fed into the first EFM to obtain the output result of the first EFM, as follows:

[0150] like Figure 6 As shown, the two sets of input features are sequentially passed through a convolutional layer with a receptive field size of 5×5 and an output channel number of C6, an LN layer, and a GELU layer. The smaller feature is upsampled to twice the original resolution and added to the other feature to obtain the output result of the first EFM.

[0151] Where C6 represents the smaller channel number of the two inputs.

[0152] Then, the output of the first EFM and the third set of features are passed into the second EFM to obtain the output of the second EFM. The specific processing flow is the same as that of the first EFM. The output of the second EFM and the fourth set of features are passed into the third EFM to obtain the output of the third EFM, which is the edge prediction map.

[0153] S62. Based on the edge prediction map obtained in step S61 and the pseudo-label of the edge map in step S2, the edge loss is calculated using the edge loss function.

[0154] The pseudo-label of the edge map obtained in step S2 is represented as Y. edge =(y j ,j=1,…,|Y edge |),y j ∈[0,1].

[0155] Among them, y jThis represents the pixel value at the j-th pixel.

[0156] Then Y edge The samples are classified into positive and negative sets, denoted as Y. + ={y j ,y j >η} and Y - ={y j ,y j =0}, all other pixel values ​​are ignored, η represents the pixel value threshold, set to 0.2;

[0157] Then, let P represent the edge prediction map obtained in step S61. edge =(p j ,j=1,…,|P edge |),p j ∈[0,1].

[0158] Where, p j This represents the value at the j-th pixel after processing with a sigmoid function.

[0159] Finally, the edge loss function is used to calculate the pseudo-label Y of the edge map. edge and edge prediction map P edge Edge loss L edge The calculation expression is as follows:

[0160]

[0161] Where α and β represent weighting coefficients used to balance positive and negative samples, and λ represents the weight controlling the magnitude of the coefficients, set to 1.

[0162] In this embodiment, in step S7, the identification loss in step S5 and the edge loss in step S6 are weighted and summed, as follows:

[0163] Let the total loss be L total The calculation expression is as follows:

[0164] L total =L cls +γ·L edge

[0165] Where γ represents the weighting coefficient, which controls the loss balance and is set to 0.01.

[0166] This embodiment conducted ablation and comparison experiments on the MNIST dataset. Extensive experimental results demonstrate that the DNNs character recognition model with feedback interaction constructed in this invention, along with the MFP, FBIAM, FFIAM, and EFM modules, can significantly enhance the model's ability to perceive grating visual illusions. Table 1 compares the recognition results of the method of this invention with other methods, showcasing a quantitative comparison between the two approaches.

[0167] Table 1

[0168]

[0169] As shown in Table 1, the method of this invention uses TOP1 recognition accuracy as the evaluation metric, that is, the category with the highest output probability of the model is taken as the recognition result. Compared with other comparative methods, the method of this invention is significantly superior, which is beneficial for applying the method of this invention to a wider range of visual tasks such as scene character recognition and camouflaged target detection.

[0170] In summary, the method of this invention constructs a DNN-based text recognition model with grating optical illusion perception based on the relevant neural mechanisms of grating optical illusion perception. Simultaneously, it constructs MFP, FBIAM, FFIAM, and EFM modules, and utilizes the fusion of edge loss and recognition loss to guide the DNN model to learn global contour perception capabilities during training. This means learning global shape preferences rather than local features, endowing the model with grating optical illusion perception capabilities, thereby improving the accuracy and robustness of text recognition. This helps improve the recognition accuracy of text presented in a grating optical illusion manner on printed materials and billboards in scene character recognition tasks, enhancing system reliability. Furthermore, the method of this invention can also be applied to camouflage target detection tasks, utilizing the global contour perception attribute of optical illusions to improve the accuracy of camouflage target detection.

[0171] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of this invention.

Claims

1. A method for recognizing grating optical illusion characters, the specific steps of which are as follows: S1. Construct a DNNs character recognition model with grating visual illusion perception; The DNNs text recognition model includes: Character recognition model, edge detection model; The edge detection model is used to provide pseudo-labels for the edge map; The text recognition model includes: 1 MFP module, 4 cortical column modules, 3 FFIAM modules, 3 EFM modules, and 1 classification layer module; Among them, the four cortical column modules are the primary visual cortex V1 cortical column, the secondary visual cortex V2 cortical column, and the two visual fourth area V4 cortical columns. The primary visual cortex V1 column includes: one primary stage 1 module, one FBIAM module, one primary stage 2 module, and one primary stage 3 module; the secondary visual cortex V2 column includes: one pooling layer, one secondary stage 1 module, one FBIAM module, one secondary stage 2 module, and one secondary stage 3 module; the first visual cortex V4 column includes: one pooling layer, one V4 stage 1 module, one FBIAM module, one V4 stage 2 module, and one V4 stage 3 module; the second visual cortex V4 column includes: one pooling layer, one V4 stage 1 module, one V4 stage 2 module, and one V4 stage 3 module. S2. Train the DNNs text recognition model using the MNIST training set. First, input the training image into the edge detection model and the text recognition model respectively. The edge detection model obtains edge map pseudo-labels, and the text recognition model obtains four sets of side output features and a set of multi-scale fusion features based on the MFP module. S3. Input the four sets of side output features from step S2 into the FFIAM module to obtain three sets of attention-modulated side output features; S4. Input the group with the smallest feature size among the attention-modulated side output features obtained in step S3 into the classification layer module, and then pass it through a global average pooling layer, an LN layer and a fully connected linear layer to obtain the probability output of text recognition. The probability output for character recognition is the probability of belonging to each category, and the MNIST dataset used has a total of 10 categories. S5. Calculate the recognition loss by combining the text recognition probability output from step S4 with the text label using the cross-entropy loss function. S6. Input the attention-modulated side output features obtained in step S3 and the multi-scale fusion features obtained in step S2 into the EFM module and integrate them to obtain the edge prediction map. Then, calculate the edge loss with the edge map pseudo-label in step S2 through the edge loss function. S7. The recognition loss in step S5 and the edge loss in step S6 are weighted and summed to obtain the fusion loss function. The process is then iterated until the maximum number of training iterations is set in advance to complete the training of the DNNs character recognition model and obtain the trained model. S8. Based on the DNNs text recognition model trained in step S7, test it using the MNIST test set, that is, input the test image into the trained model for testing, obtain the text recognition result, and complete the grating visual illusion text recognition.

2. The grating optical illusion character recognition method according to claim 1, characterized in that, Step S2 is as follows: S21. Input the training image into the edge detection model to obtain the pseudo-label of the edge map; S22. Input the training image into the MFP module to obtain a set of multi-scale fusion features; The input image is fed in parallel into four convolutional layers with a kernel size of 3×3 and an output channel number of C1, with dilatancy ratios of 2, 4, 6 and 7 respectively. The four outputs are summed, passed through an LN layer and a channel shuffle, and then multi-scale fusion features are output. Where C1 = 64; S23. The multi-scale fusion features in step S22 are sequentially passed through four sub-modules consisting of depthwise separable convolutions with different receptive field sizes, namely four cortical column modules, to obtain four sets of side output features. 1) The first submodule is the primary visual cortex V1 cortical column; First, the multi-scale fusion feature is fed into the primary first-stage module to obtain the output feature of the first stage. That is, the multi-scale fusion feature is first fed into a depthwise separable convolutional layer with a receptive field size of 5×5 and the number of output channels of C1, then through a depthwise separable convolutional layer with a receptive field size of 3×3, a dilation rate of 2, and the number of output channels of 2×C1, and then through a convolutional layer with a receptive field size of 1×1 and the number of output channels of C1. The resulting output is added to the multi-scale fusion feature in step S22 to obtain the output feature of the first stage. The output features from the first stage are then fed into the FBIAM module, while the second set of side output features are fed back into the FBIAM module to obtain the output features of the FBIAM module. In other words, the two input features are first fused through a feedback channel attention module to obtain the channel attention result, which is then fed into the multi-scale spatial attention module to obtain the output features of the FBIAM module, as detailed below: The second set of side output features is first upsampled to twice the original resolution through deconvolution. Then, it is sequentially fed into a convolutional layer with a receptive field size of 1×1 and C output channels, and an LN layer, to obtain the alignment result of the second set of side output features. The output features of the first stage are then fed in parallel into spatial average pooling and spatial max pooling to obtain the output results of spatial average pooling and spatial max pooling, respectively. These two outputs are then fed into a shared convolutional layer with a receptive field size of 1×1 and k×C output channels, a GELU, and another shared convolutional layer with a receptive field size of 1×1 and C output channels, respectively. Finally, the two processed results are added together, passed through a sigmoid function, and then multiplied with the output features of the first stage using a Hadamard product to obtain the processed output features of the first stage. As a result, this result is added to the alignment result of the second set of side output features to obtain the channel attention result; then the channel attention result is fed into channel average pooling and channel max pooling in parallel and the two results are concatenated. The concatenated result is fed into a convolutional layer with a receptive field size of 3×7 and 1 output channel, a convolutional layer with a receptive field size of 5×13 and 1 output channel, a convolutional layer with a receptive field size of 7×3 and 1 output channel, and a convolutional layer with a receptive field size of 13×5 and 1 output channel in parallel. The four results are added and passed through the sigmoid function and then multiplied with the channel attention result by Hadamard. The product result is added to the channel attention result and then shuffled by the channel to obtain the multi-scale spatial attention result, which is the output feature of the FBIAM module. Where C represents the smaller number of channels between the two inputs, and k is set to 4; Finally, the output features of the FBIAM module are fed into the primary second-stage module, and the resulting output is added to the output features of the FBIAM module to obtain the output features of the second stage. This output feature is then fed into the primary third-stage module to obtain the first set of side output features. Specifically, the output features of the FBIAM module are fed into a depthwise separable convolutional layer with a receptive field size of 4×4, a dilation rate of 2, and 2×C1 output channels. Then, the layer passes through a convolutional layer with a receptive field size of 1×1 and 1 output channels. The resulting output is added to the output features of the FBIAM module to obtain the output features of the second stage. The output features of the second stage are then fed into a depthwise separable convolutional layer with a receptive field size of 4×4, a dilation rate of 2, and 1 output channel to obtain the first set of side output features. 2) The second submodule is the secondary visual cortex V2 cortical column; First, the output features of the second stage in the primary visual cortex V1 cortical column are passed through a pooling layer and then fed into the secondary first stage module to obtain the output features of the first stage. That is, the output features of the second stage in the first sub-module are passed through a pooling layer, downsampled to half of the original resolution, and then fed into a depthwise separable convolutional layer with a receptive field size of 6×6, a hole ratio of 2, and a number of output channels of C2 to obtain the output features of the first stage. Where C2 = 128; Then, the output features of the first stage are fed into the FBIAM module, and the third set of side output features are fed back to the FBIAM module to obtain the output features of the FBIAM module. Among them, the FBIAM module structure and processing flow are consistent in the primary visual cortex V1 cortex, the secondary visual cortex V2 cortex, and the first visual fourth area V4 cortex. Finally, the output features of the FBIAM module are passed to the secondary second-stage module, and the resulting output is added to the output features of the FBIAM module to obtain the output features of the second stage. These output features are then passed to the secondary third-stage module, and the resulting output is added to the output features of the second stage to obtain the second set of side output features. In other words, the output features of the FBIAM module are passed to a depthwise separable convolutional layer with a receptive field size of 7×7, a dilation rate of 2, and C2 output channels, and then passed through a receptive field size of 3×3, a dilation rate of 6, and C2 output channels. A 2×C2 depthwise separable convolutional layer is passed through another convolutional layer with a receptive field size of 1×1 and C2 output channels. The output is then added to the output features of the FBIAM module to obtain the output features of the second stage. The output features of the second stage are then passed to a 7×7 depthwise separable convolutional layer with a dilation rate of 2 and 2×C2 output channels. This is followed by another convolutional layer with a receptive field size of 1×1 and C2 output channels. The output is then added to the output features of the second stage to obtain the second set of side output features. 3) The third submodule is the first visual fourth zone V4 cortical column; First, the output features of the second stage in the secondary visual cortex V2 cortical column are passed through a pooling layer and then fed into the first stage module of the fourth region to obtain the output features of the first stage. That is, the output features of the second stage in the second sub-module are passed through a pooling layer, downsampled to half of the original resolution, and then fed into a depthwise separable convolutional layer with a receptive field size of 7×7, a hole ratio of 3, and a number of output channels of C3 to obtain the output features of the first stage. Where C3 = 256; Then, the output features of the first stage are fed into the FBIAM module, and the fourth set of side output features are fed back to the FBIAM module to obtain the output features of the FBIAM module. Finally, the output features of the FBIAM module are passed to the second-stage module in the fourth region, and the resulting output is added to the output features of the FBIAM module to obtain the output features of the second stage. This output feature is then passed to the third-stage module in the fourth region, and the resulting output is added to the output features of the second stage to obtain the third set of side output features. In other words, the output features of the FBIAM module are passed to a depthwise separable convolutional layer with a receptive field size of 9×9, a dilatancy of 3, and C3 output channels, and then passed through a receptive field size of 3×3, a dilatancy of 12, and C3 output channels. A 2×C3 depthwise separable convolutional layer is passed through a 1×1 receptive field convolutional layer with C3 output channels. The output is then added to the output features of the FBIAM module to obtain the output features of the second stage. The output features of the second stage are then passed to a 9×9 depthwise separable convolutional layer with a dilatancy of 3 and 2×C3 output channels. This is followed by a 1×1 convolutional layer with C3 output channels. The output is then added to the output features of the second stage to obtain the third set of side output features. 4) The fourth submodule is the second visual fourth area V4 cortical column; First, the output features of the second stage in the V4 cortical column of the first visual region are passed through a pooling layer and then fed into the first stage module of the fourth region to obtain the output features of the first stage. That is, the output features of the second stage in the third sub-module are passed through a pooling layer, downsampled to half of the original resolution, and then fed into a depthwise separable convolutional layer with a receptive field size of 7×7, a dilatancy of 3, and a number of output channels of C4 to obtain the output features of the first stage. Where C4 = 512; Then, the output features of the first stage are fed into the second stage module of the fourth region, and the resulting output is added to the output features of the first stage to obtain the output features of the second stage. Finally, the output features of the second stage are fed into the third stage module of the fourth region, and the resulting output is added to the output features of the second stage to obtain the fourth set of side output features. That is, the output features of the first stage are fed into a depthwise separable convolutional layer with a receptive field size of 9×9, a dilatancy of 3, and C4 output channels, and then passed through a layer with a receptive field size of 3×3, a dilatancy of 12, and an output channel of C4. A depthwise separable convolutional layer with 2×C4 channels is passed through another convolutional layer with a receptive field size of 1×1 and C4 output channels. The output is then added to the output features of the first stage to obtain the output features of the second stage. The output features of the second stage are then passed to a depthwise separable convolutional layer with a receptive field size of 9×9, a dilation rate of 3, and 2×C4 output channels. This is followed by another convolutional layer with a receptive field size of 1×1 and C4 output channels. The output is then added to the output features of the second stage to obtain the fourth set of side output features.

3. The grating optical illusion character recognition method according to claim 1, characterized in that, Step S3 is as follows: S31. Arrange the four sets of side output features obtained in step S2 in descending order of feature size; S32. Based on the sorting results of step S31, the first set of features and the second set of features are fed into the first FFIAM to obtain the first set of attention-modulated side output features. The first set of features and the second set of features are first fused through a feedforward channel attention module to obtain the channel attention result. Then, the channel attention result is fed into a multi-scale spatial attention module to obtain the side output features of the first set of attention modulation, as follows: The first set of features is sequentially passed through a downsampling layer, an LN layer, and a convolutional layer with a receptive field size of 1×1 and C5 output channels to obtain the alignment result of the first set of features. This alignment result is then passed in parallel to spatial average pooling and spatial max pooling to obtain the output results of spatial average pooling and spatial max pooling, respectively. These two outputs are then passed sequentially to a convolutional layer with a receptive field size of 1×1 and k×C5 output channels, a GELU layer, and another convolutional layer with a receptive field size of 1×1 and C5 output channels to obtain two processed results. These two processed results are then added together, passed through a sigmoid function, and multiplied with the alignment result of the first set of features using a Hadamard product. This final result is then compared with the second set of features. Add the channel attention results; then feed the channel attention results into channel average pooling and channel max pooling in parallel and concatenate the two results. Feed the concatenated results into a convolutional layer with a receptive field size of 3×7 and 1 output channel, a convolutional layer with a receptive field size of 5×13 and 1 output channel, a convolutional layer with a receptive field size of 7×3 and 1 output channel, and a convolutional layer with a receptive field size of 13×5 and 1 output channel in parallel. Add the four results and pass them through the sigmoid function, then perform a Hadamard product with the channel attention results. Add the product result back to the channel attention results and perform a channel shuffle to obtain the multi-scale spatial attention result, which is the side output feature of the first set of attention modulation. Wherein, C5 represents the larger channel number of the two inputs, and k is set to 4; in the text recognition model, the structure and processing flow of the three FFIAM modules are consistent. S33. Input the obtained first set of attention-modulated side output features and the third set of features into the second FFIAM to obtain the second set of attention-modulated side output features. S34. Input the second set of attention-modulated side output features and the fourth set of features into the third FFIAM to obtain the third set of attention-modulated side output features.

4. The grating optical illusion character recognition method according to claim 1, characterized in that, Step S5 is as follows: Let P be the probability output of character recognition in step S4. cls Its dimensions are N×M; the text label is represented as Y. cls Its dimensions are N×M; Where N represents the number of samples in a batch, and M represents the total number of categories identified; Then, P is calculated using the cross-entropy loss function. cls With Y cls Inter-recognition loss L cls The calculation expression is as follows: Among them, y ij p represents the true label of sample i in category j. ij This represents the predicted probability of sample i in category j.

5. The grating optical illusion character recognition method according to claim 1, characterized in that, Step S6 is as follows: S61. Input the attention-modulated side output features obtained in step S3 and the multi-scale fusion features obtained in step S2 into the EFM module and integrate them to obtain the edge prediction map. First, the three sets of attention-modulated side output features obtained in step S3 and the multi-scale fusion features obtained in step S2 are arranged in ascending order of size. Then, the first and second sets of features are fed into the first EFM to obtain the output result of the first EFM, as follows: The two sets of input features are sequentially passed through a convolutional layer with a receptive field size of 5×5 and an output channel number of C6, an LN layer, and a GELU layer. The smaller feature is upsampled to twice the original resolution and added to the other feature to obtain the output result of the first EFM. Where C6 represents the smaller number of channels between the two inputs; Then, the output of the first EFM and the third set of features are passed into the second EFM to obtain the output of the second EFM. The specific processing flow is the same as that of the first EFM. The output of the second EFM and the fourth set of features are passed into the third EFM to obtain the output of the third EFM, which is the edge prediction map. S62. Based on the edge prediction map obtained in step S61 and the pseudo-label of the edge map in step S2, the edge loss is calculated using the edge loss function. The pseudo-label of the edge map obtained in step S2 is represented as Y. edge =(y j ,j=1,…,|Y edge |),y j ∈[0,1]; Among them, y j This represents the pixel value at the j-th pixel. Then Y edge The samples are classified into positive and negative sets, denoted as Y. + ={y j ,y j >η} and Y - ={y j ,y j =0}, all other pixel values ​​are ignored, η represents the pixel value threshold, set to 0.2; Then, let P represent the edge prediction map obtained in step S61. edge =(p j ,j=1,…,|P edge |),p j ∈[0,1]; Where, p j This represents the value at the j-th pixel after processing with a sigmoid function; Finally, the edge loss function is used to calculate the pseudo-label Y of the edge map. edge and edge prediction map P edge Edge loss between L edge The calculation expression is as follows: Where α and β represent weighting coefficients, and λ represents the weight controlling the magnitude of the coefficient, set to 1.

6. The grating optical illusion character recognition method according to claim 1, characterized in that, In step S7, the weighted sum of the identification loss in step S5 and the edge loss in step S6 is as follows: Let the total loss be L total The calculation expression is as follows: L total =L cls +γ·L edge Where γ represents the weighting coefficient, which is set to 0.01.