Scene text detection methods, systems, and devices based on deep convolutional neural networks

By introducing self-correcting convolution and channel attention mechanisms into the ResNet50 network, combined with coordinated attention and progressive scale expansion layers, the problems of false detection and inaccurate positioning in natural scene text detection are solved, significantly improving detection accuracy and recall. rate, especially in dense text and curved text detection.

CN114724155BActive Publication Date: 2024-09-06HUBEI UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210410471.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-19
Publication Date
2024-09-06
Estimated Expiration
2042-04-19

AI Technical Summary

Technical Problem

There are problems of false detection and inaccurate positioning of text areas in natural scene text detection, mainly due to the large differences in language, color, font, direction, and size of texts, complex backgrounds, low contrast, low resolution of images, or occlusions and artifacts Affected by other factors, existing deep learning methods are difficult to effectively separate dense text instances.

Method used

Use a deep convolutional neural network based on the ResNet50 network, replace the 3×3Conv convolution with a self-correcting convolution, embed the channel attention mechanism ECA layer after the convolution layer C2-C5, and introduce a coordinated attention mechanism and a progressive scale expansion layer , improve detection accuracy through data enhancement and post-processing.

Benefits of technology

It effectively expands the network receptive field, avoids information interference and semantic loss, and improves the accuracy and recall rate of text detection. It especially performs well in dense text and curved text detection, reaching 81.6%, 83.5%, and 83.4%. Comprehensive indicator F value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114724155B
    Figure CN114724155B
Patent Text Reader

Abstract

This invention discloses a scene text detection method, system, and device based on a deep convolutional neural network. First, the acquired scene text image undergoes data augmentation to obtain image information of a predetermined size. Next, the preprocessed image information is input into a deep convolutional neural network to extract image features. Then, a coordinated attention mechanism layer is used to enhance the image features. Finally, the enhanced feature map is post-processed using a progressive scaling layer to obtain the text detection result. This invention effectively expands the network's receptive space by introducing calibrated convolution and channel attention into the ResNet50 backbone network, and by introducing coordinated attention after the extracted feature map. This avoids the loss of more semantic information in subsequent dimensionality reduction operations, reduces the distortion of feature maps caused by top-down fusion of feature maps of different scales, and enables the network to have more accurate discrimination regions. The squared Dice loss function improves the accuracy and precision of text detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of digital image processing and computer vision technology, and relates to a method, system and device for detecting text in natural scene text images, and specifically to a method, system and device for detecting scene text based on a deep convolutional neural network with a combination of self-correction and attention mechanisms. Background Art

[0002] In daily life, there is a wealth of text information, and the extraction of this information can greatly improve people's quality of life. Scene text detection and recognition technology can not only quickly determine the specific location of the text in the image, but also extract the text information contained in it, providing strong support for further analysis and understanding of more valuable content. This technology is widely used in scenarios such as instant text translation, bill data recognition, text image retrieval and classification, intelligent robots, unmanned driving, industrial manufacturing, etc. Usually, the text detection results largely determine whether the text can be correctly recognized in text recognition. Therefore, it is necessary to improve the accuracy and precision of text detection.

[0003] Since the text in natural scenes varies greatly in terms of language, color, font, direction, size, etc., some text images have extremely complex backgrounds, even similar to text. In addition, when acquiring images, they are affected by lighting, camera angle, etc., and the images have low contrast, low resolution, or occlusion, artifacts, etc., which leads to false detection or inaccurate text area positioning in the scene text detection process. In recent years, more and more researchers have applied deep learning to natural scene text detection, and have obtained higher detection rates, recognition rates, and generalization capabilities by drawing on methods of target detection, semantic segmentation, and instance segmentation. At present, these methods using deep learning can be divided into two categories: regression-based and segmentation-based text detection methods. The regression-based text detection method regards the text in the image as the same type of detection target, predicts multiple text candidate boxes in the image, and then performs classification and regression to directly detect the entire text instance, but the detection results often contain more irrelevant background information, especially in dense text images where it is difficult to separate text instances. The segmentation-based text detection method first obtains the probability of each pixel being text through a convolutional neural network, obtains the basic components of the text according to the set threshold segmentation, and then performs post-processing to gradually combine the components into a complete text instance. This method can well solve the problem of dense text detection. Summary of the invention

[0004] In order to solve the above technical problems, the present invention proposes a method, system and device for scene text detection based on a deep convolutional neural network combining self-correction and attention mechanism.

[0005] The technical solution adopted by the method of the present invention is: a scene text detection method based on a deep convolutional neural network, wherein the deep convolutional neural network is based on the ResNet50 network structure, 3×3Conv convolution in the ResNet50 network is replaced with a self-correction convolution, and then a channel attention mechanism ECA layer is embedded after the convolution layers C2-C5, and an efficient channel attention mechanism is introduced after each layer of the ResNet50 network; a coordination attention mechanism layer is added after feature fusion; and finally a progressive scale expansion layer is added to post-process the image;

[0006] The method comprises the following steps:

[0007] Step 1: Perform data enhancement operations such as random brightness transformation, random rotation, scaling, and cropping on the acquired scene text image to obtain image information of a predetermined size;

[0008] Step 2: Input the preprocessed image information into the deep convolutional neural network to extract image features F;

[0009] Step 3: Use the coordinated attention mechanism layer to enhance the image feature F;

[0010] Step 4: Post-process the enhanced feature map using a progressive scale expansion layer to obtain text detection results.

[0011] The technical solution adopted by the system of the present invention is: a scene text detection system based on a deep convolutional neural network, wherein the deep convolutional neural network is based on the ResNet50 network structure, 3×3Conv convolution in the ResNet50 network is replaced with a self-correction convolution, and then an efficient channel attention mechanism is embedded after the convolution layers C2-C5; a coordinated attention mechanism layer is added after feature fusion; and finally a progressive scale expansion layer is added to post-process the image;

[0012] The system includes the following modules:

[0013] Module 1 is used to perform data enhancement operations such as random brightness transformation, random rotation, scaling, and cropping on the acquired scene text image to obtain image information of a predetermined size;

[0014] Module 2, used to input the preprocessed image information into the deep convolutional neural network to extract image features F;

[0015] Module 3 is used to enhance the image feature F using a coordinated attention mechanism layer;

[0016] Module 4 is used to post-process the enhanced feature map using a progressive scale expansion layer to obtain text detection results.

[0017] The technical solution adopted by the device of the present invention is: a scene text detection device based on a deep convolutional neural network, comprising:

[0018] one or more processors;

[0019] A storage device is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the scene text detection method based on the deep convolutional neural network.

[0020] Compared with the existing algorithms, the present invention has the following significant advantages and effects:

[0021] (1) The present invention utilizes self-correcting convolution, so that each position in the feature map can consider the surrounding context information, and embed the obtained context information scalar into the original scale space. It can not only simulate the dependency between channels and effectively expand the receptive field of the self-correcting convolution layer, but also avoid information interference from irrelevant areas to a certain extent.

[0022] (2) The present invention models the correlation between channels of the feature graph through the channel attention mechanism, which effectively avoids the loss of semantic information caused by dimensionality reduction operations, reduces the complexity of the deep convolutional neural network, and allows the deep convolutional neural network to maintain good performance.

[0023] (3) The present invention uses coordinated attention in the feature enhancement part to gather the input features in the horizontal and vertical directions respectively, and then encode them into two one-dimensional attention maps in different directions through the sigmoid activation function, so that the output not only has long-range dependencies but also preserves accurate position information. The obtained feature map is converted into an attention map and multiplied with the input, which makes up for the deviation caused by the FPN fusion process.

[0024] (4) The present invention squares the Dice coefficient, thereby increasing the penalty of the deep convolutional neural network for false detection and missed detection, making the prediction results of the deep convolutional neural network closer to the actual labeling, thereby improving the performance of the deep convolutional neural network. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 A structural diagram of a deep convolutional neural network according to an embodiment of the present invention;

[0026] Figure 2 Schematic diagram of the embedding method of channel attention according to an embodiment of the present invention;

[0027] Figure 3 Schematic diagram of the self-correcting convolution principle of an embodiment of the present invention;

[0028] Figure 4This is a schematic diagram of an efficient channel attention mechanism according to an embodiment of the present invention;

[0029] Figure 5 A diagram showing the structure of the coordinated attention mechanism layer according to an embodiment of the present invention;

[0030] Figure 6 Schematic diagram of post-processing extension of text detection according to an embodiment of the present invention. DETAILED DESCRIPTION

[0031] In order to facilitate ordinary technicians in the field to understand and implement the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the implementation examples described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0032] The present invention provides a scene text detection method based on deep convolutional neural network, see Figure 1 , the deep convolutional neural network adopted in this embodiment first replaces the 3×3Conv convolution in the ResNet50 network with a self-correction convolution on the ResNet50 network structure, splits the original convolution into 4 small convolutions and two branches (correction branch, context semantic inheritance branch), and then embeds the channel attention mechanism ECA layer behind the convolution layer C2-C5; without introducing additional learning parameters, the network can obtain spatial information of different scales, and correct the extracted features through the correction branch; at the same time, an efficient channel attention mechanism is introduced after each layer of the network, so that the focus of network detection is concentrated on the text area, and richer semantic information is extracted; secondly, a coordinated attention mechanism layer is added after feature fusion to correct the position deviation of feature maps of different scales in the top-down fusion process. Finally, text instance kernels of different sizes are obtained through convolution prediction, and a progressive scale expansion algorithm is used to gradually expand from the smallest kernel to the largest kernel to obtain the final text instance. The squared Dice coefficient loss function is used in the deep convolutional neural network training process. This loss can increase the penalty for false detection and missed detection of the deep convolutional neural network, thereby improving the accuracy and recall rate of deep convolutional neural network detection.

[0033] In this embodiment, based on the original ResNet50 backbone network, the self-calibrated convolutions (SConv) replace the 3×3Conv convolutions in the original network in the Bottleneck, which only considers the context information around each spatial position to avoid interference from irrelevant areas in the global context information; secondly, efficient channel attention (ECA) is introduced at the end of the Bottleneck of each layer, which can interact with channel information without reducing the dimension of the feature map, thereby enhancing the feature extraction capability of the network.

[0034] In this embodiment, after replacing the convolution in the backbone network with the self-correcting convolution, the channel attention mechanism ECA is embedded after the convolution layers C2-C5. The embedding method is as follows: Figure 2 As shown, feature maps of different scales are then extracted from each ECA layer Their sizes are 1 / 4, 1 / 8, 1 / 16, and 1 / 32 of the original input image, respectively. Then, the feature fusion operation is performed from top to bottom in the form of feature pyramid network FPN: 1×1Conv is used to fused the top feature map Convolution obtains feature map P5; P2, P3, and P4 are obtained by convolution at the same level. After the 1×1Conv convolution operation, the feature maps P3, P4, and P5 of the previous layer are upsampled by 2 times and fused together; finally, P2, P3, P4, and P5 are concat-operated to obtain the fused feature map F.

[0035] The calculation formulas for P2, P3, and P4 are as shown in formula (1), where n is 2, 3, or 4, Conv 1×1 Represents 1×1 convolution, Up r2 Indicates 2x upsampling using bilinear interpolation.

[0036] P n =Conv 1×1 (C2)+Up r2 (P n+1 ) (1)

[0037] Please see Figure 3 This embodiment proposes to use self-correcting convolution instead of traditional convolution to improve the text feature extraction capability of deep convolutional neural network. The convolution performs convolution feature transformation in two different scale spaces, builds the correlation between space and channel around each spatial position, and enlarges the receptive field of each convolution layer, thereby enriching the semantic information. The convolution operation process can be divided into the following three steps:

[0038] (1) The input feature M of size C×H×W is divided into M1 and M2, both of which have a size of C / 2×H×W; where C, H, and W represent the number of channels, height, and width of feature M, respectively;

[0039] (2) The original convolution kernel K of size (C, C, 3, 3) is divided into four small convolution kernels K1, K2, K3, and K4, whose sizes are all (C / 2, C / 2, 3, 3) to collect different types of context information; convolution kernels K1, K2, and K3 perform self-correction operations on M1 in branch 1 to obtain N1; convolution kernel K4 performs convolution operations on the original scale feature M2 in branch 2 to retain the original spatial background information, obtaining N2;

[0040] (3) Concatenate the original scale-space output features N1 and N2 to obtain feature N that is the same size as the input M;

[0041] Among them, in the self-correction process of branch 1, the feature M1 is first downsampled using a 4×4 average pooling layer to obtain M 11 , as shown in formula (2), and then the convolution kernel K1 is used to extract features and upsample to obtain M 12 , restore the size to M1, as shown in formula (3), the upsampling method is bilinear interpolation; then add it to M1, use Sigmoid activation function mapping to calculate the correction weight, and multiply it with the convolution kernel K2 to extract features for correction, and get M 13 , as shown in formula (4), and finally the corrected feature N1 of the branch is obtained through the K3 convolution operation, as shown in formula (5).

[0042] M 11 =AvgPool(M1) (2)

[0043] M 12 =Up r2 (F1(M 11 ))=Up r2 (M 11 *K1) (3)

[0044] M 13 =F2(M1)*σ(M1+M 12 )=M1*K2*σ(M1+M 12 ) (4)

[0045] N1=F3(M 13 )=M 13 *K3 (5)

[0046] Among them, F i Represents the convolution kernel K i The convolution operation, σ is the sigmoid function, Up r2 Upsampling is 2 times.

[0047] The receptive field of traditional convolution is often limited, ignoring the semantic information of the context. Through the correction operation, each position in the feature map can consider the surrounding context information, and the obtained context information scalar is embedded into the original scale space. It can not only simulate the dependency between channels and effectively expand the receptive field of the self-correction convolution layer, but also avoid information interference from irrelevant areas to a certain extent.

[0048] Although the convolution operation can fuse the spatial information within the receptive field during feature extraction, it often ignores the correlation between the channels. Therefore, the channel attention mechanism is used to enhance the feature extraction capability of the backbone network. However, the dimensionality reduction operation in feature extraction will indiscriminately lose important information for feature extraction, which has a certain negative impact on the prediction of the channel attention mechanism. In addition, the required features are not related to all channels of the image, so there is no need to establish a connection between the features and all channels, and establishing such a connection will consume more computing resources of the deep convolutional neural network. Therefore, one-dimensional convolution can effectively avoid dimensionality reduction operations on the basis of realizing local channel information interaction, reduce the complexity of the deep convolutional neural network, and keep the deep convolutional neural network at a good performance.

[0049] The implementation principle of this efficient channel attention mechanism is as follows Figure 4 As shown in the figure, X is the original input image information. After global average pooling (GAP), the unreduced information is obtained. Then, a one-dimensional convolution operation with a size of k is performed to achieve cross-channel information interaction within a small range of adjacent channels. The value of k is proportional to the number of channels C. Its calculation formula is shown in formula (6). Then, the weight value of each channel is obtained through the sigmoid function, and then multiplied with the original input information to obtain the image information containing channel attention. As shown in formula (7).

[0050]

[0051]

[0052] Where |t| odd Indicates the odd number closest to t, C1D k Represents a one-dimensional convolution operation with k kernels.

[0053] Four feature maps of different scales are extracted from each layer of the backbone network, and the features are fused using feature pyramid networks (FPN) to obtain feature map F; then coordinated attention (CA) is used to enhance the original feature map to obtain a new feature map To enhance the text boundary information and expand the distinction between text and non-text areas.

[0054] The feature map obtained by FPN fusion has unclear text area boundaries and even some deviations, which affects the post-processing of text detection. The above effects can be corrected by combining channel and position attention. Therefore, this paper uses coordinated attention CA to process the feature map after FPN fusion, and continuously adjusts the weight values ​​of each channel and each position during the training process to obtain a more accurate and reliable feature map. The structure of coordinated attention CA is as follows Figure 5 As shown in Figure 1, for a given input X, a pooling layer of size (h, 1) and (1, w) is used to perform average pooling along the horizontal and vertical axes, respectively, encoding each channel in these two directions. The output of channel c on the horizontal axis is Similarly, the output on the vertical axis is As shown in formula (8) and (9). Then connect these two feature maps and use 1×1Conv to perform operations and nonlinear mapping to obtain the feature map f, as shown in formula (10); then split the feature map into two tensors g along the spatial dimension h , g w , as shown in formula (11) (12), and multiplied by the original input to get the output As shown in formula (13).

[0055]

[0056]

[0057] f = δ(Conv 1×1 ([z h ,z w ])) (10)

[0058] g h =σ(Conv 1×1 (f h )) (11)

[0059] g w =σ(Conv 1×1 (f w )) (12)

[0060]

[0061] Among them, i and j represent the pixel coordinates in input X, H and W represent the height and width of input X, and f h 、f w represents the feature map f after being split along two different directions, [·,·] represents the concatenation operation of two tensors, Conv 1×1 represents 1×1 convolution, δ represents nonlinear mapping, and σ is the sigmoid function.

[0062] Compared with global channel attention, the feature vector obtained does not use two-dimensional global pooling to transform the entire feature tensor, but gathers the input features in the horizontal and vertical directions respectively, and then encodes them into two one-dimensional attention maps in different directions through the sigmoid activation function. After processing in this way, the output not only has long-range dependencies, but also preserves accurate position information. Therefore, the obtained feature map is converted into an attention map and multiplied with the input. The additional information obtained can make up for the deviation caused by the FPN fusion process.

[0063] Please see Figure 6 , the progressive scale expansion layer of this embodiment uses 1×1Conv to enhance Perform convolution operations to obtain text instance kernels S1 to S n , and post-process it using the progressive scale expansion method, gradually expanding from the smallest text instance kernel S1 to the largest text instance kernel S n , and its expansion process is as follows Figure 6 As shown (0 in the figure represents S i Pixels in S i+1 , different colors represent different text instances. ), in the process of expansion S i+1 A position in the i When the same text instance is found in the image, the position is merged (i.e. the color of the position in the image becomes S i For the case where the ownership of a pixel cannot be determined (such as X in the figure), the solution principle is first come first served (for example, if the text instance in the lower left corner of the algorithm is first extended to the conflicting pixel X, then the pixel belongs to the text instance).

[0064] The deep convolutional neural network of this embodiment is a trained deep convolutional neural network. The loss function L used in training the deep convolutional neural network consists of two parts: L c and L s , the sum of the two according to a certain weight is used as the loss function of the entire deep convolutional neural network. c It is used to measure the matching degree of text instances between prediction and true annotation when not scaled, L s is used to measure the matching degree after scaling; the calculation method of the loss function L is shown in formula (14).

[0065] L=λL c +(1-λ)L s (14)

[0066] Where λ is L c and L s The weight coefficient of , the value of λ is taken as 0.7.

[0067] The present invention adopts Dice coefficient loss function to represent L c , L s , the calculation of Dice coefficient is shown in formula (15).

[0068]

[0069] Among them, S i,x,y and G i,x,y Respectively represent the final predicted results S i and the true annotation G of the training samples i The pixel value at the position (x, y) in the image. Considering that there is inevitably background information similar to the strokes of the text in the text image, it is easy to cause false detection and reduce the detection accuracy. In order to better distinguish between text and non-text areas, the online hard example mining (OHEM) training method is used when training the deep convolutional neural network, and the ratio of positive to negative samples is set to 1:3.

[0070] Loss function L c The calculation method of is shown in formula (16).

[0071] L c =1-D 2 (S n *M,G n *M) (16)

[0072] Among them, M represents the training mask mined by online hard examples.

[0073] Loss function L s The calculation method of is shown in formula (17).

[0074]

[0075] Where W represents S n The mask of the text area in S n,x,y Indicates S n The pixel value at position (x,y) in .

[0076] The present invention squares the Dice coefficient so that the value of the loss function increases compared to before the modification, thereby increasing the penalty intensity of the deep convolutional neural network for false detection and missed detection, making the prediction results of the deep convolutional neural network closer to the actual labeling, thereby improving the performance of the deep convolutional neural network.

[0077] The method of this embodiment includes the following steps:

[0078] Step 1: Perform data enhancement operations such as random brightness transformation, random rotation, scaling, and cropping on the acquired scene text image to obtain image information of a fixed size of 640×640×3;

[0079] Step 2: Input the preprocessed image information into the deep convolutional neural network to extract the image feature F;

[0080] Step 3: Use the coordinated attention mechanism layer to enhance the image feature F;

[0081] Step 4: Post-process the enhanced feature map using a progressive scale expansion layer to obtain text detection results.

[0082] The present invention introduces corrected convolution and channel attention into the backbone network of ResNet50, and introduces coordinated attention after the extracted feature map, which effectively expands the network receptive space, avoids the loss of more semantic information in subsequent dimensionality reduction operations, and reduces the degree of feature map distortion caused by the top-down fusion of feature maps of different scales, so that the network has a more accurate identification area; by designing the squared Dice loss function, the penalty for prediction errors of deep convolutional neural networks is increased, thereby improving the accuracy and precision of deep convolutional neural network text detection.

[0083] The detection effect of the invention on curved text is good, and its level has reached the method that has used a large amount of data for pre-training in the past two years. On the ICDAR2015, Total-Text, and CTW1500 datasets, the detection method proposed in this paper achieved 81.6%, 83.5%, and 83.4% in the comprehensive index F value respectively.

[0084] It should be understood that the above description of the preferred embodiment is relatively detailed and cannot be regarded as limiting the scope of patent protection of the present invention. Under the enlightenment of the present invention, ordinary technicians in this field can also make substitutions or modifications without departing from the scope of protection of the claims of the present invention, which all fall within the scope of protection of the present invention. The scope of protection requested for the present invention shall be based on the attached claims.

Claims

1. A scene text detection method based on deep convolutional neural network, characterized by: The deep convolutional neural network is based on the ResNet50 network structure. The 3×3Conv convolution in the ResNet50 network is replaced with a self-correcting convolution. Then, a channel attention mechanism ECA layer is embedded after the convolution layers C2-C5, and an efficient channel attention mechanism is introduced after each layer of the ResNet50 network. Add a coordinated attention mechanism layer after feature fusion; Finally, a progressive scale expansion layer is added to post-process the image; After replacing the 3×3Conv convolution with the self-correction convolution in the ResNet50 network, the channel attention mechanism ECA layer is embedded after the convolution layers C2-C5, and then feature maps of different scales are extracted from each ECA layer. The sizes of these images are 1 / 4, 1 / 8, 1 / 16, and 1 / 32 of the original input image, respectively. Then, the feature fusion operation is performed from top to bottom using the feature pyramid network FPN: 1×1 Conv is used to fused the top feature map. Convolution obtains feature map P5; P2, P3, and P4 are obtained by convolution at the same level. After the 1×1Conv convolution operation, the feature maps P3, P4, and P5 of the previous layer are added and fused by 2 times upsampling; finally, P2, P3, P4, and P5 are concat-operated to obtain the fused feature map F; The calculation formula for P2, P3, and P4 is: P n =Conv 1×1 (C2)+Up r2 (P n+1 )(1) Where n is 2, 3, or 4, Conv 1×1 Represents 1×1 convolution, Up r2 Indicates 2x upsampling using bidirectional linear interpolation; The self-correction convolution, the convolution operation process includes the following three steps: (1) The input feature M of size C×H×W is divided into M1 and M2, both of which have a size of C / 2×H×W; where C, H, and W represent the number of channels, height, and width of feature M, respectively; (2) The original convolution kernel K of size (C, C, 3, 3) is divided into four small convolution kernels K1, K2, K3, and K4, whose sizes are all (C / 2, C / 2, 3, 3) to collect different types of context information; convolution kernels K1, K2, and K3 perform self-correction operations on M1 in branch 1 to obtain N1; convolution kernel K4 performs convolution operations on the original scale feature M2 in branch 2 to retain the original spatial background information, obtaining N2; (3) Concatenate the original scale-space output features N1 and N2 to obtain feature N that is consistent with the input M; Among them, in the self-correction process of branch 1, the feature M1 is first downsampled using a 4×4 average pooling layer to obtain M 11 ; Then extract the features through the convolution kernel K1 and upsample to get M 12 , restore the size to M1, and use bilinear interpolation as the upsampling method; then add it to M1, use Sigmoid activation function mapping to calculate the correction weight, and multiply it with convolution kernel K2 to extract features for correction, and get M 13 ;Finally, the corrected feature N1 of this branch is obtained through the K3 convolution operation; M 11 =AvgPool(M1)(2) M 12 =Up r2 (F1(M 11 ))=Up r2 (M 11 *K1)(3) M 13 =F2(M1)*σ(M1+M 12 )=M1*K2*σ(M1+M 12 )(4) N1=F3(M 13 )=M 13 *K3(5) Among them, F i Represents the convolution kernel K i The convolution operation, σ is the sigmoid function, Up r2 Upsampling is 2 times; The efficient channel attention mechanism obtains the unreduced dimension information through global average pooling for the input original image information X, then performs a one-dimensional convolution operation with a size of k, and then obtains the weight value of each channel through the sigmoid function, and then multiplies it with the original input information to obtain the image information containing channel attention. Among them, t odd Indicates the odd number closest to t, C1D k represents a one-dimensional convolution operation with a kernel number of k, C is the number of channels, and σ is the sigmoid function; The coordinated attention mechanism layer uses pooling layers of size (h, 1) and (1, w) for a given input X, performs average pooling along the horizontal and vertical axes respectively, and encodes each channel in these two directions; the output of channel c on the horizontal axis is The output on the vertical axis is Then connect these two feature maps and use 1×1Conv to perform operations and nonlinear mapping to obtain the feature map f; then split the feature map into two tensors g along the spatial dimension h , g w , and multiply it with the original input to get the output f=δ(Conv 1×1 ([z h ,z w ]))(10) g h =σ(Conv 1×1 (f h ))(11) g w =σ(Conv 1×1 (f w ))(12) Among them, i and j represent the pixel coordinates in input X, H and W represent the height and width of input X, and f h 、f w represents the feature map f after being split along two different directions, [·,·] represents the concatenation operation of two tensors, Conv 1×1 represents 1×1 convolution, δ represents nonlinear mapping, and σ is the sigmoid function; The progressive scale expansion layer uses 1×1Conv to enhance the Perform convolution operations to obtain text instance kernels S1 to S n , and post-process it using the progressive scale expansion method, gradually expanding from the smallest text instance kernel S1 to the largest text instance kernel S n , in the process of expansion S i+1 A position in the i When the same text instance is found, the position is merged. If the pixel ownership cannot be determined, the principle of solving it is first come first served. The deep convolutional neural network is a trained deep convolutional neural network; the loss function L used in the training process is L c and L s It consists of two parts, L c It is used to measure the matching degree of text instances between prediction and true annotation when not scaled, L s It is used to measure the matching degree after scaling; L=λL c +(1-λ)L s (14) Where λ is L c The weight coefficient of Loss function L c for: L c =1-D 2 (S n *M,G n *M)(15) Among them, S i,x,y and G i,x,y Respectively represent the final predicted results S i and the true annotation G of the training samples i The pixel value at position (x, y) in the figure; M represents the training mask mined from online hard examples; Loss function L s for: Where W represents S n The mask of the text area in S n,x,y Indicates S n The pixel value at position (x, y) in the image; The method comprises the following steps: Step 1: Perform data enhancement operation on the acquired scene text image to obtain image information of a predetermined size; Step 2: Input the preprocessed image information into the deep convolutional neural network to extract image features F; Step 3: Use the coordinated attention mechanism layer to enhance the image feature F; Step 4: Post-process the enhanced feature map using a progressive scale expansion layer to obtain text detection results.

2. A scene text detection system based on deep convolutional neural network, characterized by: The deep convolutional neural network is based on the ResNet50 network structure. The 3×3Conv convolution in the ResNet50 network is replaced with a self-correcting convolution. Then, a channel attention mechanism ECA layer is embedded after the convolution layers C2-C5, and an efficient channel attention mechanism is introduced after each layer of the ResNet50 network. Add a coordinated attention mechanism layer after feature fusion; Finally, a progressive scale expansion layer is added to post-process the image; After replacing the 3×3Conv convolution with the self-correction convolution in the ResNet50 network, the channel attention mechanism ECA layer is embedded after the convolution layers C2-C5, and then feature maps of different scales are extracted from each ECA layer. The sizes of these images are 1 / 4, 1 / 8, 1 / 16, and 1 / 32 of the original input image, respectively. Then, the feature fusion operation is performed from top to bottom using the feature pyramid network FPN: 1×1 Conv is used to fused the top feature map. Convolution obtains feature map P5; P2, P3, and P4 are obtained by convolution at the same level. After the 1×1Conv convolution operation, the feature maps P3, P4, and P5 of the previous layer are added and fused by 2 times upsampling; finally, P2, P3, P4, and P5 are concat-operated to obtain the fused feature map F; The calculation formula for P2, P3, and P4 is: P n =Conv 1×1 (C2)+Up r2 (P n+1 )(1) Where n is 2, 3, or 4, Conv 1×1 Represents 1×1 convolution, Up r2 Indicates 2x upsampling using bidirectional linear interpolation; The self-correction convolution, the convolution operation process includes the following three steps: (1) The input feature M of size C×H×W is divided into M1 and M2, both of which have a size of C / 2×H×W; where C, H, and W represent the number of channels, height, and width of feature M, respectively; (2) The original convolution kernel K of size (C, C, 3, 3) is divided into four small convolution kernels K1, K2, K3, and K4, whose sizes are all (C / 2, C / 2, 3, 3) to collect different types of context information; convolution kernels K1, K2, and K3 perform self-correction operations on M1 in branch 1 to obtain N1; convolution kernel K4 performs convolution operations on the original scale feature M2 in branch 2 to retain the original spatial background information, obtaining N2; (3) Concatenate the original scale-space output features N1 and N2 to obtain feature N that is consistent with the input M; Among them, in the self-correction process of branch 1, the feature M1 is first downsampled using a 4×4 average pooling layer to obtain M 11 ; Then extract the features through the convolution kernel K1 and upsample to get M 12 , restore the size to M1, and use bilinear interpolation as the upsampling method; then add it to M1, use Sigmoid activation function mapping to calculate the correction weight, and multiply it with convolution kernel K2 to extract features for correction, and get M 13 ;Finally, the corrected feature N1 of this branch is obtained through the K3 convolution operation; M 11 =AvgPool(M1)(2) M 12 =Up r2 (F1(M 11 ))=Up r2 (M 11 *K1)(3) M 13 =F2(M1)*σ(M1+M 12 )=M1*K2*σ(M1+M 12 )(4) N1=F3(M 13 )=M 13 *K3(5) Among them, F i Represents the convolution kernel K i The convolution operation, σ is the sigmoid function, Up r2 Upsampling is 2 times; The efficient channel attention mechanism obtains the unreduced dimension information through global average pooling for the input original image information X, then performs a one-dimensional convolution operation with a size of k, and then obtains the weight value of each channel through the sigmoid function, and then multiplies it with the original input information to obtain the image information containing channel attention. Among them, t odd Indicates the odd number closest to t, C1D k represents a one-dimensional convolution operation with a kernel number of k, C is the number of channels, and σ is the sigmoid function; The coordinated attention mechanism layer uses pooling layers of size (h, 1) and (1, w) for a given input X, performs average pooling along the horizontal and vertical axes respectively, and encodes each channel in these two directions; the output of channel c on the horizontal axis is The output on the vertical axis is Then connect these two feature maps and use 1×1Conv to perform operations and nonlinear mapping to obtain the feature map f; then split the feature map into two tensors g along the spatial dimension h , g w , and multiply it with the original input to get the output f=δ(Conv 1×1 ([z h ,z w ]))(10) g h =σ(Conv 1×1 (f h ))(11) g w =σ(Conv 1×1 (f w ))(12) Among them, i and j represent the pixel coordinates in input X, H and W represent the height and width of input X, and f h 、f w represents the feature map f after being split along two different directions, [·,·] represents the concatenation operation of two tensors, Conv 1×1 represents 1×1 convolution, δ represents nonlinear mapping, and σ is the sigmoid function; The progressive scale expansion layer uses 1×1Conv to enhance the Perform convolution operations to obtain text instance kernels S1 to S n , and post-process it using the progressive scale expansion method, gradually expanding from the smallest text instance kernel S1 to the largest text instance kernel S n , in the process of expansion S i+1 A position in the i When the same text instance is found, the position is merged. If the pixel ownership cannot be determined, the principle of solving it is first come first served. The deep convolutional neural network is a trained deep convolutional neural network; the loss function L used in the training process is L c and L s It consists of two parts, L c It is used to measure the matching degree of text instances between prediction and true annotation when not scaled, L s It is used to measure the matching degree after scaling; L=λL c +(1-λ)L s (14) Where λ is L c The weight coefficient of Loss function L c for: L c =1-D 2 (S n *M,G n *M)(15) Among them, S i,x,y and G i,x,y Respectively represent the final predicted results S i and the true annotation G of the training samples i The pixel value at position (x, y) in the figure; M represents the training mask mined from online hard examples; Loss function L s for: Where W represents S n The mask of the text area in S n,x,y Indicates S n The pixel value at position (x, y) in the image; The system includes the following modules: Module 1 is used to perform data enhancement operation on the acquired scene text image to obtain image information of a predetermined size; Module 2, used to input the preprocessed image information into the deep convolutional neural network to extract image features F; Module 3 is used to enhance the image feature F using a coordinated attention mechanism layer; Module 4 is used to post-process the enhanced feature map using a progressive scale expansion layer to obtain text detection results.

3. A scene text detection device based on a deep convolutional neural network, characterized in that: include: one or more processors; A storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, enables the one or more processors to implement the scene text detection method based on deep convolutional neural network as described in claim 1.