Text detection method and device, electronic device, and storage medium

The fusion feature map is generated through the backbone network and feature fusion architecture for text detection, which solves the problems of large amount of calculation and long time consumption in the existing technology, and achieves efficient text detection.

CN112597918BActive Publication Date: 2024-09-10INNOVATION QIZHI (XIAN) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011574458.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-25
Publication Date
2024-09-10
Estimated Expiration
2040-12-25

AI Technical Summary

Technical Problem

Existing text detection methods based on sliding windows are computationally intensive, consume a lot of computing resources and take a long time, making it difficult to effectively improve the efficiency of text detection.

Method used

The text image to be processed is converted into multiple deep feature maps of different scales through the backbone network, and the feature fusion architecture is used to perform feature fusion to generate a fused feature map, which is used as the input of the probabilistic branch network and the binary branch network to obtain the probability distribution map and the text area mask map, using the probability distribution map to correct the out-of-box results in the text area mask map.

Benefits of technology

The calculation process is simplified, the accuracy and efficiency of text detection are improved, and the consumption of computing resources is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112597918B
    Figure CN112597918B
Patent Text Reader

Abstract

The present application provides a text detection method and device, electronic device, and storage medium, the method comprising: obtaining a text image to be processed; converting the text image to be processed into multiple deep feature maps of different scales through a backbone network; fusing the multiple deep feature maps of different scales according to a feature fusion architecture to obtain a fused feature map; using the fused feature map as the input of a probability branch network and a binarization branch network respectively to obtain a probability distribution map output by the probability branch network and a text area mask map output by the binarization branch network; and using the probability distribution map to correct the text area framed in the text area mask map. This can simplify the calculation and improve the accuracy of text detection.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a text detection method and device, an electronic device, and a computer-readable storage medium. Background Art

[0002] Text detection is part of the text recognition algorithm process. It generally refers to the process of detecting and extracting text line information from a text image and obtaining the position of each text line on the text image, so that it can be used for subsequent text recognition of each text line, thus forming a basic OCR text recognition process.

[0003] With the rise of deep learning, text detection methods have gradually changed from the original methods based on traditional image processing to deep learning methods. Common methods are methods in the field of computer vision such as image target detection and image target segmentation. The defect detection requirements of different scenes are different, so the detection methods are also diverse. At present, a more popular text detection method is the text detection method based on sliding windows. This method is based on the idea of ​​general target detection. A large number of anchor boxes with different aspect ratios and sizes are set. These anchor boxes are used as sliding windows to traverse and search on the image or on the feature map obtained by convolution operation on the image. For each searched position box, a classification judgment is made as to whether the box contains text. However, this method has too much computational complexity, which not only consumes a lot of computing resources, but also takes a long time. Summary of the invention

[0004] An embodiment of the present application provides a text detection method that can reduce the consumption of computing resources.

[0005] The present application provides a text detection method, the method comprising:

[0006] Get the text image to be processed;

[0007] Converting the text image to be processed into multiple depth feature maps of different scales through a backbone network;

[0008] Performing feature fusion on the multiple depth feature maps of different scales according to a feature fusion architecture to obtain a fused feature map;

[0009] Using the fused feature map as input to a probability branch network and a binarization branch network respectively, to obtain a probability distribution map output by the probability branch network and a text area mask map output by the binarization branch network;

[0010] The text region framed in the text region mask map is corrected using the probability distribution map.

[0011] In one embodiment, the multiple depth feature maps include a first feature map, a second feature map, and a third feature map according to the scale from large to small; the multiple depth feature maps of different scales are subjected to feature fusion according to a feature fusion architecture to obtain a fused feature map, including:

[0012] Performing convolution calculation on the third feature map through the trained first convolution kernel, and upsampling the calculation result by a first multiple to generate a third enlarged feature map;

[0013] Performing feature fusion on the third feature map and the second feature map to obtain a second enlarged feature map;

[0014] Performing feature fusion on the second feature map and the first feature map to obtain a first enlarged feature map;

[0015] The first magnified feature map, the second magnified feature map and the first magnified feature map are spliced ​​to obtain the fused feature map.

[0016] In one embodiment, the step of performing feature fusion on the third feature map and the second feature map to obtain a second enlarged feature map includes:

[0017] Performing convolution calculation on the third feature map through the trained second convolution kernel, and upsampling the calculation result according to the second multiple to obtain a first intermediate feature map;

[0018] Superimposing the first intermediate feature map and the second feature map;

[0019] The superposition result is convolved through a trained third convolution kernel, and the calculation result is upsampled by a third multiple to obtain the second enlarged feature map.

[0020] In one embodiment, the step of performing feature fusion on the second feature map and the first feature map to obtain a first enlarged feature map includes:

[0021] Performing convolution calculation on the second feature map through the trained fourth convolution kernel, and upsampling the calculation result by a fourth multiple to obtain a second intermediate feature map;

[0022] Superimposing the second intermediate feature map with the first feature map;

[0023] The superposition result is convolved through the trained fifth convolution kernel, and the calculation result is upsampled by a fifth multiple to obtain the first enlarged feature map.

[0024] In one embodiment, the step of correcting the text area framed in the text area mask map by using the probability distribution map includes:

[0025] Taking the minimum probability value in the probability distribution map as a threshold, finding the pixel points whose probability is greater than the threshold;

[0026] According to the position of the pixel point, the text area framed in the text area mask image is corrected.

[0027] In one embodiment, before converting the to-be-processed text image into a plurality of depth feature maps of different scales through a backbone network, the method further includes:

[0028] Deep learning is performed using sample images of known probability distribution maps and text area mask maps to train the backbone network, the feature fusion architecture, the probability branch network, and the binarization branch network.

[0029] In one embodiment, the deep learning using the sample images with known probability distribution graphs and text area mask graphs includes:

[0030] Extracting a predicted probability distribution map and a predicted text area mask map of the sample image through an initial backbone network, an initial feature fusion architecture, an initial probability branch network, and an initial binarization branch network;

[0031] According to the predicted probability distribution map of the sample image and the predicted text area mask map, a binary map is obtained according to a preset fusion formula;

[0032] Calculating a loss function value according to the known probability distribution map and text area mask map of the sample image, the predicted probability distribution map and the predicted text area mask map, and the binarized map;

[0033] Reversely optimize the network parameters of the initial backbone network, the initial feature fusion architecture, the initial probability branch network, and the initial binarization branch network until the loss function value meets the preset conditions.

[0034] The present application provides a text detection device, which includes:

[0035] An image acquisition module, used to acquire the text image to be processed;

[0036] A feature extraction module, used for converting the text image to be processed into multiple depth feature maps of different scales through a backbone network;

[0037] A feature fusion module, used to fuse the multiple depth feature maps of different scales according to a feature fusion architecture to obtain a fused feature map;

[0038] A branch detection module, used to use the fused feature map as input to a probability branch network and a binarization branch network respectively, to obtain a probability distribution map output by the probability branch network and a text area mask map output by the binarization branch network;

[0039] The text correction module is used to correct the text area framed in the text area mask map using the probability distribution map.

[0040] An embodiment of the present application provides an electronic device, the electronic device comprising:

[0041] processor;

[0042] a memory for storing processor-executable instructions;

[0043] Wherein, the processor is configured to execute the above-mentioned text detection method.

[0044] An embodiment of the present application provides a computer-readable storage medium, which stores a computer program. The computer program can be executed by a processor to complete the above-mentioned text detection method.

[0045] The technical solution provided by the above-mentioned embodiment of the present application can obtain the fused feature map of the image to be processed through the backbone network and the feature fusion architecture, and then obtain the probability distribution map and the text area mask map through two branch networks; the probability distribution map can be used to correct the text-image area framed in the text area mask map, thereby simplifying the calculation and improving the accuracy of text detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solution of the embodiments of the present application, the drawings required for use in the embodiments of the present application are briefly introduced below.

[0047] Figure 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;

[0048] Figure 2 is a flowchart of a text detection method provided in an embodiment of the present application;

[0049] Figure 3 yes Figure 2 Detailed flowchart of step S230 in the corresponding embodiment;

[0050] Figure 4 It is a schematic diagram of a feature fusion architecture provided in an embodiment of the present application;

[0051] Figure 5 is a schematic diagram of two network branches provided in an embodiment of the present application;

[0052] Figure 6is a label schematic diagram of a sample image provided in an embodiment of the present application;

[0053] Figure 7 Schematic diagram of the training process of the text detection model provided in the embodiment of the present application;

[0054] Figure 8 It is a block diagram of a text detection device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application.

[0056] Similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0057] Figure 1 1 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 100 can be used to execute the text detection method provided in an embodiment of the present application. Figure 1 As shown, the electronic device 100 includes: one or more processors 102, and one or more memories 104 storing processor executable instructions. The processor 102 is configured to execute the text detection method provided in the following embodiment of the present application.

[0058] The processor 102 can be a gateway, a smart terminal, or a device including a central processing unit (CPU), a graphics processing unit (GPU), or other forms of processing units with data processing capabilities and / or instruction execution capabilities. It can process data of other components in the electronic device 100 and control other components in the electronic device 100 to perform desired functions.

[0059] The memory 104 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 102 may run the program instructions to implement the text detection method described below. Various applications and various data, such as various data used and / or generated by the application, may also be stored in the computer-readable storage medium.

[0060] In one embodiment, Figure 1 The electronic device 100 shown may also include an input device 106, an output device 108, and a data acquisition device 110, which are interconnected via a bus system 112 and / or other forms of connection mechanisms (not shown). Figure 1 The components and structures of the electronic device 100 shown are merely exemplary and non-limiting. The electronic device 100 may also have other components and structures as required.

[0061] The input device 106 may be a device for a user to input instructions, and may include one or more of a keyboard, a mouse, a microphone, a touch screen, etc. The output device 108 may output various information (e.g., images or sounds) to the outside (e.g., a user), and may include one or more of a display, a speaker, etc. The data acquisition device 110 may acquire an image of an object, and store the acquired image in the memory 104 for use by other components. Exemplarily, the data acquisition device 110 may be a camera.

[0062] In one embodiment, the various components in the example electronic device 100 for implementing the text detection method of the embodiment of the present application can be integrated or dispersed, such as integrating the processor 102, memory 104, input device 106 and output device 108 into one, while separating the data acquisition device 110.

[0063] In one embodiment, the example electronic device 100 for implementing the text detection method of the embodiment of the present application can be implemented as an intelligent terminal such as a smart phone, a tablet computer, a smart watch, a car-mounted device, etc.

[0064] Figure 2 is a flow chart of a text detection method provided in an embodiment of the present application. The method can be executed by the electronic device 100, such as Figure 2As shown, the method includes the following steps S210-S240.

[0065] Step S210: Obtain the text image to be processed.

[0066] The text image to be processed can be directly acquired by the electronic device, or sent to the electronic device by an external device. The text image to be processed refers to an image containing text, and the position of the text is unknown.

[0067] Step S220: converting the text image to be processed into multiple depth feature maps of different scales through a backbone network.

[0068] Among them, the backbone network can be trained in advance, and different scales refer to different sizes of deep feature maps. The deep feature map is used to characterize the features of the text image to be processed. For example, the backbone network can be a ResNet50 network. In one embodiment, the size of the image to be processed can be 640×640, and through the last three feature layers of the ResNet50 network, feature maps of sizes 80×80, 40×40, and 20×20 can be obtained respectively. For the purpose of distinction, they can be called the first feature map, the second feature map, and the second feature map in order from large to small scales.

[0069] Step S230: performing feature fusion on the multiple depth feature maps of different scales according to a feature fusion architecture to obtain a fused feature map.

[0070] The parameters of the feature fusion architecture can be trained in advance, and the feature fusion architecture can also be called an encoder module. Feature fusion refers to merging multiple deep feature maps into one feature map. For distinguishing, the merged feature map is called a fused feature map.

[0071] In one embodiment, if Figure 3 As shown, the above step S230 may include the following steps S231-S234.

[0072] Step S231: performing convolution calculation on the third feature map through the trained first convolution kernel, and upsampling the calculation result by a first multiple to generate a third enlarged feature map.

[0073] Among them, the third feature map is the feature map with the smallest scale. For example, Figure 4 As shown, the third feature map R3 is convolved by the trained 1×1 convolution kernel (ie, the first convolution kernel), and then the convolution result is upsampled by 8 times (ie, the first multiple) to obtain R3' (equivalent to the third enlarged feature map). Upsampling can use existing interpolation methods.

[0074] Step S232: performing feature fusion on the third feature map and the second feature map to obtain a second enlarged feature map.

[0075] like Figure 4 As shown, the second feature map R2 and the third feature map R3 can be fused to obtain the second enlarged feature map R2'. Specifically, the third feature map R3 can be convolved with the trained second convolution kernel (1×1), and the calculation result can be upsampled by the second multiple (such as 2 times) to obtain the first intermediate feature map; the first intermediate feature map and the second feature map R2 are superimposed (element-wise add); the superposition result is convolved with the trained third convolution kernel (1×1), and the calculation result is upsampled by the third multiple (such as 4 times) to obtain the second enlarged feature map R2'.

[0076] Step S233: performing feature fusion on the second feature map and the first feature map to obtain a first enlarged feature map.

[0077] like Figure 4 As shown, the second feature map R2 and the first feature map R1 are fused to obtain the first enlarged feature map R1'. Specifically, the second feature map R2 can be convolved with the trained fourth convolution kernel (1×1), and the calculation result can be upsampled by the fourth multiple (such as 2 times) to obtain the second intermediate feature map; the second intermediate feature map and the first feature map R1 are superimposed (element-wise add); the superimposed result is convolved with the trained fifth convolution kernel (1×1), and the calculation result is upsampled by the fifth multiple (such as 2 times) to obtain the first enlarged feature map R1'.

[0078] Step S234: splicing the first enlarged feature map, the second enlarged feature map and the first enlarged feature map to obtain the fused feature map.

[0079] like Figure 4 As shown, the first enlarged feature map R1', the second enlarged feature map R2', and the third enlarged feature map R3' are concatenated to obtain a fused feature map R.

[0080] Step S240: using the fused feature map as input to the probability branch network and the binarization branch network respectively, to obtain a probability distribution map output by the probability branch network and a text area mask map output by the binarization branch network.

[0081] Among them, the probability branch network and the binarization branch network can be trained in advance. The probability branch network and the binarization branch network can also be called decoder modules. The fused feature map is input into the probability branch network to output the probability distribution map. The fused feature map is input into the binarization branch network to output the text area mask map.

[0082] The probability distribution graph is used to indicate the probability of each pixel belonging to the region where the text is located. The closer to the center of the text line, the greater the probability, and the probability of the text line boundary and background is smaller. The text region mask is a binary image, in which the predicted text region can be represented by white and the non-text region can be represented by black.

[0083] In one embodiment, if Figure 5 As shown in the figure, the fused feature map R is subjected to 3x3 convolution + 1x1 convolution + 4x upsampling + sigmoid operation through two branch networks (the weight parameters of the two branch networks are different) to obtain a probability distribution map (i.e., global threshold map) and a text area mask map (i.e., shrink text map).

[0084] Step S250: using the probability distribution map to correct the text region framed in the text region mask map.

[0085] Since the probability distribution map indicates the probability of each pixel belonging to the text position, if a pixel has a high probability of belonging to the text, and this pixel is not in the text area framed by the text area mask map, for example, this pixel is not in the white area of ​​the text area mask map, then the text area mask map can be modified to treat this pixel as the text area.

[0086] In one embodiment, the minimum probability value in the probability distribution map can be used as a threshold to find pixels with probabilities greater than the threshold; according to the positions of these pixels, the text area framed in the text area mask map is corrected. That is, if one of these pixels is not within the text area framed in the text area mask map, the text area framed in the text area mask map needs to be modified to include these pixels. Then, the positions of each text line can be obtained through connected domain calculation and contour regression.

[0087] Among them, the text detection model based only on probability graphs needs to use artificial thresholds set according to experience to obtain the position of each text line during post-processing, and the post-processing is relatively complicated. The embodiment of the present application adds the thresholds during post-processing to the network training, and the post-processing is simple.

[0088] The technical solution provided by the above-mentioned embodiment of the present application can obtain the fused feature map of the image to be processed through the backbone network and the feature fusion architecture, and then obtain the probability distribution map and the text area mask map through two branch networks; the probability distribution map can be used to correct the text-image area framed in the text area mask map, thereby simplifying the calculation and improving the accuracy of text detection.

[0089] In one embodiment, before the above-mentioned step S220, the method provided in the embodiment of the present application also includes: performing deep learning using sample images of known probability distribution maps and text area mask maps to train the backbone network, the feature fusion architecture, the probability branch network, and the binarization branch network.

[0090] The sample image can be considered as an image containing text with a known probability distribution map and a text area mask map. Figure 6 As shown, the first column is the sample image, the second column is the text area mask of the sample image in the first column, and the third column is the probability distribution map of the sample image in the first column. Among them, the text area mask of the sample image can make a binary mask image of each text line according to the annotation data, and shrink a certain distance (for example, half the height) into the polygon. The probability distribution map of the text line area can be made so that the closer to the center of the text line, the greater the probability. Among them, the probability within the range of white pixels in the text area mask is the same, and all take the maximum value. The probability of the text line boundary and the background is the smallest, and the probability range is 0.3-0.7.

[0091] In one embodiment, the backbone network, the feature fusion architecture, the probability branch network, and the binarization branch network may be collectively referred to as a text detection model. Figure 7 As shown, the training steps of the text detection model may include steps S710 to S740.

[0092] Step S710: extracting a predicted probability distribution map and a predicted text area mask map of the sample image through an initial backbone network, an initial feature fusion architecture, an initial probability branch network, and an initial binarization branch network.

[0093] For the purpose of distinction, the network model before parameter training is completed can be called the initial xx network. For example, the initial backbone network can be called the backbone network after weight parameter training is completed. Similarly, the initial feature fusion architecture can be called the feature fusion architecture after weight parameter training is completed, and so on.

[0094] For the purpose of distinction, the probability distribution map and text area mask map obtained by the sample image through the incompletely trained text detection model can be called the predicted probability distribution map and the predicted text area mask map.

[0095] Step S720: obtaining a binarized image according to the predicted probability distribution image of the sample image and the predicted text area mask image in accordance with a preset fusion formula.

[0096] The preset fusion formula can be 1 / (1+e -100*(s-g)), where s represents the predicted text area mask map, and g represents the predicted probability distribution map. The predicted text area mask map and the predicted probability distribution map calculated by this formula can be called a binary map. This preset fusion formula can play a role in distinguishing values ​​similar to a fixed threshold, and at the same time, the predicted text area mask map and the predicted probability distribution map are linked together when calculating the loss.

[0097] Step S730: Calculate the loss function value according to the known probability distribution map and text area mask map of the sample image, the predicted probability distribution map and predicted text area mask map, and the binarization map.

[0098] Among them, based on the known probability distribution map of the sample image and the text area mask map, the real binary map of the sample image can be calculated. The loss function value can be divided into three parts: cross entropy loss, diceloss and L1 loss (L1 norm loss function, also known as minimum absolute deviation LAD, minimum absolute error LAE).

[0099] Specifically, the cross entropy loss, dice loss and L1 loss can be calculated according to the predicted probability distribution map of the sample image, the predicted text area mask map and the predicted binarized map, and the real probability distribution map of the sample image, the real text area mask map and the real binarized map according to the cross entropy loss loss function formula, the dice loss loss function formula and the L1 loss loss function formula. The overall loss function value can be the sum of the three loss function values.

[0100] Step S740: reversely optimize the network parameters of the initial backbone network, the initial feature fusion architecture, the initial probability branch network, and the initial binarization branch network until the loss function value meets the preset conditions.

[0101] In one embodiment, the network parameters of the initial backbone network, the initial feature fusion architecture, the initial probability branch network, and the initial binarization branch network can be adjusted by a back propagation algorithm until the overall loss function value meets a preset condition. The preset condition can be that the loss function value is less than a threshold.

[0102] The following is an embodiment of the device of the present application, which can be used to execute the above-mentioned text detection method embodiment of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the text detection method of the present application.

[0103] Figure 8A block diagram of a text detection device shown in an embodiment of the present application is shown in FIG. Figure 8 As shown, the device includes: an image acquisition module 810, a feature extraction module 820, a feature fusion module 830, a branch detection module 840 and a text correction module 850.

[0104] An image acquisition module 810 is used to acquire a text image to be processed;

[0105] A feature extraction module 820 is used to convert the text image to be processed into multiple depth feature maps of different scales through a backbone network;

[0106] A feature fusion module 830 is used to perform feature fusion on the multiple depth feature maps of different scales according to a feature fusion architecture to obtain a fused feature map;

[0107] A branch detection module 840 is used to use the fused feature map as input to a probability branch network and a binarization branch network respectively, to obtain a probability distribution map output by the probability branch network and a text area mask map output by the binarization branch network;

[0108] The text correction module 850 is used to correct the text area framed in the text area mask map using the probability distribution map.

[0109] The implementation process of the functions and effects of each module in the above-mentioned device is specifically described in the implementation process of the corresponding steps in the above-mentioned text detection method, which will not be repeated here.

[0110] In several embodiments provided in the present application, the disclosed devices and methods may also be implemented in other ways. The device embodiments described above are merely schematic, for example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to the multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram may represent a module, a program segment or a part of a code, and a module, a program segment or a part of a code contains one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they may sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of boxes in the block diagram and / or the flowchart, can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0111] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0112] If the function is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.

Claims

1. A text detection method, characterized in that: The method comprises: Get the text image to be processed; Converting the text image to be processed into multiple depth feature maps of different scales through a backbone network; Performing feature fusion on the multiple depth feature maps of different scales according to a feature fusion architecture to obtain a fused feature map; The fused feature map is used as the input of the probability branch network and the binarization branch network respectively, and a probability distribution map output by the probability branch network and a text area mask map output by the binarization branch network are obtained; the probability distribution map is used to indicate the probability that each pixel belongs to the area where the text is located, and the closer to the center of the text line, the greater the probability, and the smaller the probability of the text line boundary and the background; Using the probability distribution map to correct the text area framed in the text area mask map; Wherein, the step of using the probability distribution map to correct the text area framed in the text area mask map includes: Taking the minimum probability value in the probability distribution map as a threshold, finding the pixel points whose probability is greater than the threshold; According to the position of the pixel point, the text area framed in the text area mask image is corrected.

2. The method according to claim 1, characterized in that According to the scale from large to small, the multiple depth feature maps include a first feature map, a second feature map and a third feature map; the multiple depth feature maps of different scales are subjected to feature fusion according to a feature fusion architecture to obtain a fused feature map, including: Performing convolution calculation on the third feature map through the trained first convolution kernel, and upsampling the calculation result by a first multiple to generate a third enlarged feature map; Performing feature fusion on the third feature map and the second feature map to obtain a second enlarged feature map; Performing feature fusion on the second feature map and the first feature map to obtain a first enlarged feature map; The first magnified feature map, the second magnified feature map and the first magnified feature map are spliced ​​to obtain the fused feature map.

3. The method according to claim 2, characterized in that The step of fusing the third feature map with the second feature map to obtain a second enlarged feature map comprises: Performing convolution calculation on the third feature map through the trained second convolution kernel, and upsampling the calculation result according to the second multiple to obtain a first intermediate feature map; Superimposing the first intermediate feature map and the second feature map; The superposition result is convolved through a trained third convolution kernel, and the calculation result is upsampled by a third multiple to obtain the second enlarged feature map.

4. The method according to claim 2, characterized in that The step of fusing the second feature map with the first feature map to obtain a first enlarged feature map includes: Performing convolution calculation on the second feature map through the trained fourth convolution kernel, and upsampling the calculation result by a fourth multiple to obtain a second intermediate feature map; Superimposing the second intermediate feature map with the first feature map; The superposition result is convolved through the trained fifth convolution kernel, and the calculation result is upsampled by a fifth multiple to obtain the first enlarged feature map.

5. The method according to claim 1, characterized in that Before converting the text image to be processed into a plurality of depth feature maps of different scales through a backbone network, the method further includes: Deep learning is performed using sample images of known probability distribution maps and text area mask maps to train the backbone network, the feature fusion architecture, the probability branch network, and the binarization branch network.

6. The method according to claim 5, characterized in that The method of performing deep learning using sample images with known probability distribution maps and text area mask maps includes: Extracting a predicted probability distribution map and a predicted text area mask map of the sample image through an initial backbone network, an initial feature fusion architecture, an initial probability branch network, and an initial binarization branch network; According to the predicted probability distribution map of the sample image and the predicted text area mask map, a binary map is obtained according to a preset fusion formula; Calculating a loss function value according to the known probability distribution map and text area mask map of the sample image, the predicted probability distribution map and the predicted text area mask map, and the binarized map; Reversely optimize the network parameters of the initial backbone network, the initial feature fusion architecture, the initial probability branch network, and the initial binarization branch network until the loss function value meets the preset conditions.

7. A text detection device, characterized in that: include: An image acquisition module, used to acquire the text image to be processed; A feature extraction module, used for converting the text image to be processed into multiple depth feature maps of different scales through a backbone network; A feature fusion module, used to fuse the multiple depth feature maps of different scales according to a feature fusion architecture to obtain a fused feature map; A branch detection module is used to use the fused feature map as input to a probability branch network and a binarization branch network respectively, to obtain a probability distribution map output by the probability branch network and a text area mask map output by the binarization branch network; the probability distribution map is used to indicate the probability that each pixel belongs to the area where the text is located, and the closer to the center of the text line, the greater the probability, and the smaller the probability of the text line boundary and the background; A text correction module, used for correcting the text area framed in the text area mask map using the probability distribution map; Wherein, the step of using the probability distribution map to correct the text area framed in the text area mask map includes: Taking the minimum probability value in the probability distribution map as a threshold, finding the pixel points whose probability is greater than the threshold; According to the position of the pixel point, the text area framed in the text area mask image is corrected.

8. An electronic device, characterized in that: The electronic device comprises: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to execute the text detection method described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and the computer program can be executed by a processor to complete the text detection method described in any one of claims 1-6.