Method, system, device and storage medium for erasing text in scenes of arbitrary shapes
Through the network structure of a number of erasure of the module, the text in the natural scene is gradually erased, the problem of incomplete scratching of the existing technology and incomplete background texture of the existing technology of the existing technology, and realizing the more efficient text erabia effect.
Patent Information
- Application Number
- CN202111461936.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-02
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2041-12-02
AI Technical Summary
The existing natural scene text erasing technology has poor results when the background is complex and the font size is variable, and it has failed to effectively solve the problems of thoroughness of text erasing and background texture integrity.
The network structure of several grade eradous erase modules is used to gradually erase the text through the iterative eradication operation. Only the pixels of the text area are modified to protect the integrity of the background texture.
The completeness of the text removal and the integrity of the background texture are achieved, which significantly improves the effect of scratching natural scene text.
Smart Images

Figure CN114170099B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of text erasure, and in particular to a method, system, device and storage medium for erasing text in a scene of arbitrary shape. Background Art
[0002] The task of natural scene text erasure is to detect the text area in a complex background, erase the text content and fill in the background texture accordingly, while ensuring the integrity of the visual features. Accurate natural scene text erasure has a wide range of applications in the fields of privacy protection and identity information hiding.
[0003] Since text erasing in natural scenes faces difficulties such as complex backgrounds and variable font sizes, traditional text erasing technology has poor practical application effects.
[0004] In recent years, thanks to the development of deep learning technology, scene text erasure technology has been significantly improved. However, since these methods do not consider the completeness of erasure, the text traces are usually left in the erasure results. In addition, since the problem of over-erasure is not considered, the texture of the background part is often over-erased, thus affecting the visual integrity of the scene image. Summary of the invention
[0005] The purpose of the present invention is to provide a method, system, device and storage medium for erasing text in a scene of arbitrary shape, which can improve the thoroughness of text erasing and the integrity of background texture.
[0006] The objective of the present invention is achieved through the following technical solutions:
[0007] A method for erasing text in a scene of arbitrary shape, comprising:
[0008] Construct a network structure that cascades several erasing modules to gradually erase the text area in the text image;
[0009] Among them, the first-level erasing module inputs the original image, and the second-level erasing module inputs the image output by the previous-level erasing module and the original image. The image output by the previous-level erasing module is optimized in combination with the original image; the text area erasing operation is iteratively performed through the cascaded erasing modules, and the last-level erasing module finally outputs the image after the text is erased.
[0010] A system for erasing text in a scene of arbitrary shape, the system comprising: a network construction unit, which is used to construct a network structure of cascading a plurality of erasing modules, and to implement erasing text in a scene of arbitrary shape using the aforementioned method through the network structure.
[0011] A processing device comprises: one or more processors; a memory for storing one or more programs; wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the aforementioned method.
[0012] A readable storage medium stores a computer program, which implements the above method when the computer program is executed by a processor.
[0013] It can be seen from the technical solution provided by the present invention that, through iterative erasing operations, the text can be gradually erased, ensuring the thoroughness of scene text erasing. Meanwhile, only the pixels in the text area are modified, effectively protecting the integrity of the background texture. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0015] Figure 1 A schematic diagram of a method for erasing text in a scene of arbitrary shape provided by an embodiment of the present invention;
[0016] Figure 2 A schematic diagram of an erasing module provided by an embodiment of the present invention;
[0017] Figure 3 A schematic diagram for comparing erasing effects provided by an embodiment of the present invention;
[0018] Figure 4 A schematic diagram of a processing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0019] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of the present invention.
[0020] First, the terms that may be used in this article are explained as follows:
[0021] The terms "include", "comprises", "contains", "has" or other descriptions with similar semantics should be interpreted as non-exclusive inclusion. For example, including certain technical feature elements (such as raw materials, components, ingredients, carriers, dosage forms, materials, dimensions, parts, components, mechanisms, devices, steps, procedures, methods, reaction conditions, processing conditions, parameters, algorithms, signals, data, products or products, etc.) should be interpreted as including not only certain technical feature elements explicitly listed, but also other technical feature elements known in the art that are not explicitly listed.
[0022] The following is a detailed description of a method for erasing text in a scene of arbitrary shape provided by the present invention. The contents not described in detail in the embodiments of the present invention belong to the prior art known to professional and technical personnel in the field. If no specific conditions are specified in the embodiments of the present invention, the conventional conditions in the field or the conditions recommended by the manufacturer are followed. The instruments used in the embodiments of the present invention, if the manufacturer is not specified, are all conventional products that can be purchased commercially.
[0023] The embodiment of the present invention provides a method for erasing text in an arbitrary shape scene, which mainly includes: constructing a network structure of cascading a plurality of erasing modules to gradually erase the text area in the text image. Figure 1 As shown, it is a schematic diagram of realizing text erasure in any shape scene by utilizing a network structure of cascading several erasing modules; the first-level erasing module inputs the original image, the next-level erasing module inputs the image output by the previous-level erasing module and the original image, and the image output by the previous-level erasing module is optimized in combination with the original image; the text area erasing operation is iteratively performed through the cascaded erasing modules, and the last-level erasing module finally outputs the image after the text is erased.
[0024] In the embodiment of the present invention, different erasing modules share parameters, which can reduce the complexity of the model.
[0025] In the embodiment of the present invention, the erasing module uses a local erasing strategy to erase the text area of the input image, which effectively ensures the integrity of the background texture. Moreover, each erasing module only optimizes the previous erasing result. The input of each erasing module introduces the original image mainly to allow the deep network to perceive the underlying texture information and reduce over-erasing. Exemplarily, the number of erasing modules is set to T=3, and only the result of the output of the last erasing module needs to be supervised, so that each erasing step only needs to improve the previous erasing result, which effectively reduces the difficulty of network learning.
[0026] like Figure 2As shown, it is a schematic diagram of a single erasing module, which mainly includes: a backbone network, a text area positioning branch, a background area reconstruction branch and a complementary fusion layer; the input image is subjected to feature extraction through the backbone network and input into the text area positioning branch and the background area reconstruction branch respectively; the input image includes: the original image, or the image output by the previous erasing module and the original image, that is, the input image for the first erasing module is the original image, and the input images for the remaining erasing modules include the image output by the previous erasing module and the original image; the text area positioning branch generates a text area segmentation map, and the background area reconstruction branch generates a background detail reconstruction image; the text area segmentation map and the background detail reconstruction image are input into the complementary fusion layer together to obtain the image output by the current erasing module. The following is a detailed introduction to each part of the erasing module.
[0027] 1. Backbone network.
[0028] In an embodiment of the present invention, the backbone network mainly includes multiple convolutional layers and multiple residual modules connected in sequence; the features extracted from the last convolutional layer, the second residual module, the third residual module and the last residual in the backbone network will be input into the background area reconstruction branch; the features extracted from the third residual module and the last residual in the backbone network will be input into the text area positioning branch.
[0029] Figure 2 An example is given in which the number of convolutional layers and residual modules in the backbone network is 2 and 5 respectively. For example, in the two convolutional layers, the step size of the convolution operation can be set to 2, and the downsampling rate can be set to 2 in the 2nd, 3rd, and 5th residual modules.
[0030] 2. Text area positioning branch.
[0031] In an embodiment of the present invention, the text area positioning branch includes a plurality of sequentially connected convolutional layers, whose input is two levels of features extracted by the backbone network, the first level of features is the output of the middle layer of the backbone network, and the second level is the output of the last layer of the backbone network; the second level of features is divided into two branches, in the first branch, the second level of features enters the first convolutional layer through the PSP module, in the second branch, the second level of features is cascaded with the output of the second convolutional layer as the input of the third convolutional layer, and the output of the third convolutional layer is cascaded with the first level of features as the input of the fourth convolutional layer; the features output by the last convolutional layer are upsampled to 1 / 4 of the size of the original image, and a text area segmentation map is obtained after a sigmoid operation, and then the text area segmentation map is restored to the original image size through a bilinear interpolation operation.
[0032] Figure 2An example is given in which the number of convolutional layers in the text area localization branch is 5, and the inputs of the three middle convolutional layers are all upsampled.
[0033] 3. Background area reconstruction branch.
[0034] In an embodiment of the present invention, the background area reconstruction branch includes a residual module and multiple convolutional layers arranged in sequence, and its input is four levels of features extracted by the backbone network, and the four levels of features come from the output of the convolutional layers or residual modules of the backbone network that are successively deepened; the fourth level of features passes through the residual module and the first convolutional layer, and then is cascaded with the fourth level of features as the input of the second convolutional layer, and the outputs of the second convolutional layer, the third convolutional layer, and the fourth convolutional layer are cascaded with the third level of features, the second level of features, and the first level of features respectively, and then serve as the input of the next convolutional layer.
[0035] Figure 2 An example is given in which the number of residual modules and convolutional layers in the background area reconstruction branch is 1 and 5 respectively, and the input of each convolutional layer is upsampled.
[0036] During the training phase, two multi-scale prediction modules are set up, each connected to the penultimate convolutional layer and the second to last convolutional layer, to predict the multi-scale reconstruction results; the two multi-scale prediction modules have different inputs, so the prediction results are of different scales (i.e. different sizes). Moreover, the multi-scale reconstruction results are only used during the training phase to improve the final background texture reconstruction effect.
[0037] like Figure 2 As shown in the upper right corner, it is a schematic diagram of a single multi-scale prediction module. The feature map output by the corresponding convolution layer of the background area reconstruction branch is input to the complementary fusion layer in the multi-scale prediction module after passing through the residual module and the 3×3 convolution layer in the multi-scale prediction module; at the same time, the input of the complementary fusion layer also includes the original image and the text area segmentation map predicted by the text area positioning branch.
[0038] 4. Complementary fusion layer.
[0039] The complementary fusion layer mainly fuses the outputs of the two branches as the output of the erasing module. The operation of the complementary fusion layer is expressed as:
[0040]
[0041] Among them, Mask t Text region segmentation map for text region localization branch prediction, I ′t The background detail reconstruction image generated by the background region reconstruction branch, I originalis the original image; t represents the serial number of the erasure module, t=1,…,T, T is the total number of erasure modules in the network structure.
[0042] The complementary fusion in the multi-scale prediction module is also implemented in a similar way, but the I ′t Replaced with the feature map output by the 3×3 convolutional layer in the multi-scale prediction module.
[0043] The above is the main principle of a single erasing module. During the training process, the stochastic gradient descent method (SGD) can be used to perform end-to-end training on the network structure of cascading several erasing modules. The overall loss function of the network structure is:
[0044] L=L loc +L rg +L ssim +L vgg
[0045] Among them, L loc The loss of the text region localization branch; L rg is the local-global reconstruction loss, which is calculated using the output of the text region localization branch and the background region reconstruction branch; L ssim represents ssim loss, L vgg Indicates L vgg Loss, L rg and L vgg All are considered reconstruction losses; among them:
[0046] 1) The loss of the text area localization branch L loc , expressed as:
[0047]
[0048] In the above formula, p k and k Represent the prediction results and labels respectively, and k represents a single pixel.
[0049] 2) Local-global reconstruction loss L rg Includes: Local reconstruction loss L rs and the global reconstruction loss L gs ;
[0050] Local reconstruction loss L rs It is expressed as:
[0051]
[0052] In the above formula, Represents the prediction result of the multi-scale prediction module, i represents the serial number of the multi-scale prediction module, and the two multi-scale prediction modules are respectively connected to the penultimate and penultimate convolutional layers in the background area reconstruction branch, Maski,gt and I i,gt By tagMask gt and I gt Directly scale (the specific scaling ratio can be set according to actual conditions or experience), indicating the labels of the text area segmentation map and the background texture map, the label Mask gt For a given text area segmentation map, label I gt The image after the given text is erased; I out Represents the output of the last level erase module; λ i , β i , λ and β are all set coefficients. For example, λ, λ1, λ2, β, β1, β2 can be set to 13, 10, 12, 2, 0.8 and 1 respectively.
[0053] Global reconstruction loss L gs When calculating, the output I of the last erase module is out Erase image with label I gt Input into the VGG neural network, extract multi-layer features, and the feature map output by the nth layer of the VGG neural network is expressed as and H n , W n are the width and height of the feature map output by the nth layer of the VGG neural network, and R represents a real number set; the feature maps of the nth layer are scaled to Get the scaled predicted feature map With label feature map S m ×S m Represents the size of the feature map after the mth scaling, M represents the number of scaling, and the predicted feature map after scaling With label feature map Both contain feature maps after M scaling, and the feature maps obtained by the m-th scaling are recorded as and Then, calculate the scaled predicted feature map With label feature map Similarity matrix and It is expressed as:
[0054]
[0055] Among them, F n represents the scaled feature map, Respectively represent F n The ath and bth elements in Represents the value of the element at position (a, b) in the similarity matrix; and As F n Substituting into the above formula, we get and Likewise, and Contains the similarity matrix of the feature map after M scaling, and the feature map obtained by the mth scaling and The similarity matrix is recorded as and
[0056] Then calculate the global reconstruction loss L gs , expressed as:
[0057]
[0058] Where N is the total number of layers of the VGG neural network.
[0059] Exemplarily, N=3, M=3 can be set, that is, each layer of feature maps will be scaled 3 times, and S1, S2, and S3 are equal to 8, 4, and 1 respectively.
[0060] 3) The ssim loss is used to penalize the degradation of structural information, L vgg The loss is used to ensure the consistency of visual features. The two losses are expressed as:
[0061] L ssim =-SSIM(I out ,I gt )
[0062] L vgg =VGG(I out ,I gt )
[0063] In the above formula, SSIM.) represents the structural similarity function, and VGG(.) represents the I function for calculating the output of the VGG neural network. out Features and I gt In particular, here and the global reconstruction loss L gs The same VGG neural network is used in
[0064] For example, during the network training process, the initial learning rate is selected as 0.002. When the number of training times reaches 120 and 160 epochs, the learning rate is reduced to 0.1 times the original value, and a total of 200 epochs are trained.
[0065] In order to illustrate the performance of the above method of the present invention, a comparative experiment was carried out with the existing scheme.
[0066] 1. Experimental related datasets: 1) SCUT-EnsText: This dataset is a manually erased scene text erasure dataset, containing a total of 3562 images (2749 training images and 813 test images). The training images contain 16460 words and the test images contain 4864 words. 2) SCUT-Syn: This dataset is a synthetic dataset, containing a total of 8000 training images and 800 test images. This dataset contains some real images.
[0067] Experimental results: The experimental results show that the above method of the present invention achieves advanced performance in arbitrary shape scene text erasure. The PSNR, MSSIM, MSE, AGE, pEPs, and pCEPs are 33.6238, 97.00, 0.0013, 2.1850, 0.0135, and 0.0088 on the SCUT-EnsText dataset. The PSNR, MSSIM, MSE, AGE, pEPs, and pCEPs are 39.40, 97.87, 0.0002, 1.4132, 0.0046, and 0.0007 on the SCUT-Syn dataset.
[0068] 2. Comparison of erasing effects.
[0069] The best existing method (EraseNet) is selected as the comparison scheme; the comparative experimental results are as follows Figure 3 As shown, the first to sixth columns are: original image, background texture label (i.e., the I gt ), segmentation map label (the Mask mentioned above gt ), EraseNet erasing results, results obtained by the text area positioning branch of the present invention, and erasing results of the present invention; by comparing the first row and the second row of the third-to-last column with the last column, it can be seen that the present invention can achieve better and more thorough erasing of the text area, and by comparing the third row, it can be seen that the present invention can better preserve the integrity of the background texture.
[0070] 3. Training and testing speed comparison
[0071] EraseNet Our method-1 Our method-2 Our method-3 PSNR Metrics 32.14 32.74 33.15 33.62 Training time (h) 34.7 11.4 14.3 16.6 Test speed (FPS) 86 204 101 71
[0072] Table 1 Speed comparison results
[0073] Table 1 shows the comparison of the training time and test speed of the method provided by the present invention compared with the best method (EraseNet). Our method-1 means that we only use one erasing module in the model deployment; correspondingly, our method-2 and our method-3 respectively mean that we use two or three erasing modules in the model deployment. From the comparison results, it can be seen that the method provided by the present invention has significant advantages in erasing effect, network training speed and erasing speed.
[0074] Another embodiment of the present invention further provides a system for erasing text in a scene of arbitrary shape, the system comprising: a network construction unit for constructing Figure 1 The network structure of cascading several erasing modules is shown, and the above-mentioned method is used through the network structure to realize the erasing of text in scenes of arbitrary shapes.
[0075] Technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the system can be divided into different functional modules to complete all or part of the functions described above.
[0076] Another embodiment of the present invention further provides a processing device, such as Figure 4 As shown, it mainly includes: one or more processors; a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the methods provided by the aforementioned embodiments.
[0077] Furthermore, the processing device also includes at least one input device and at least one output device; in the processing device, the processor, memory, input device, and output device are connected via a bus.
[0078] In the embodiment of the present invention, the specific types of the memory, input device and output device are not limited; for example:
[0079] The input device may be a touch screen, an image acquisition device, a physical button or a mouse, etc.;
[0080] The output device may be a display terminal;
[0081] The memory may be a random access memory (RAM) or a non-volatile memory, such as a disk memory.
[0082] Another embodiment of the present invention further provides a readable storage medium storing a computer program, which implements the method provided in the above embodiment when the computer program is executed by a processor.
[0083] In the embodiment of the present invention, the readable storage medium is a computer-readable storage medium and can be set in the aforementioned processing device, for example, as a memory in the processing device. In addition, the readable storage medium can also be a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk, etc., which can store program codes.
[0084] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A method for erasing text in a scene of arbitrary shape, characterized in that: include: Construct a network structure that cascades several erasing modules to gradually erase the text area in the text image; The first erasing module inputs the original image, and the next erasing module inputs the image output by the previous erasing module and the original image, and optimizes the image output by the previous erasing module in combination with the original image; the text area is erased iteratively through the cascaded erasing modules, and the last erasing module finally outputs the image after the text is erased; All erasure modules in the network structure have the same structure and shared parameters; Each erasing module includes: a backbone network, a text area positioning branch, a background area reconstruction branch and a complementary fusion layer; the backbone network is used to extract features from the input image and input them into the text area positioning branch and the background area reconstruction branch respectively; the input image includes: an original image, or an image output by the previous level erasing module and an original image; the text area positioning branch generates a text area segmentation map, and the background area reconstruction branch generates a background detail reconstructed image; the text area segmentation map and the background detail reconstructed image are input into the complementary fusion layer together to obtain the image output by the current level erasing module.
2. The method for erasing text in a scene of arbitrary shape according to claim 1, characterized in that: The backbone network includes multiple convolutional layers and multiple residual modules connected in sequence; the features extracted from the last convolutional layer, the second residual module, the third residual module and the last residual in the backbone network will be input into the background area reconstruction branch; the features extracted from the third residual module and the last residual in the backbone network will be input into the text area positioning branch.
3. A method for erasing text in a scene of arbitrary shape according to claim 1 or 2, characterized in that: The text area positioning branch includes a plurality of sequentially connected convolutional layers, whose input is two levels of features extracted by the backbone network, the first level of features is the output of the middle layer of the backbone network, and the second level is the output of the last layer of the backbone network; the second level of features is divided into two branches, in the first branch, the second level of features enters the first convolutional layer through the PSP module, in the second branch, the second level of features is cascaded with the output of the second convolutional layer as the input of the third convolutional layer, and the output of the third convolutional layer is cascaded with the first level of features as the input of the fourth convolutional layer; The features output by the last convolutional layer are upsampled to 1 / 4 of the original image size, and the text area segmentation map is obtained after a sigmoid operation, and then the text area segmentation map is restored to the original image size through a bilinear interpolation operation.
4. A method for erasing text in a scene of arbitrary shape according to claim 1 or 2, characterized in that: The background area reconstruction branch includes a residual module and a plurality of convolutional layers arranged in sequence, and its input is four levels of features extracted by the backbone network, and the four levels of features come from the output of the convolutional layers or the residual module of the backbone network that are successively deepened; the fourth level of features is cascaded with the fourth level of features after passing through the residual module and the first convolutional layer as the input of the second convolutional layer, and the outputs of the second convolutional layer, the third convolutional layer, and the fourth convolutional layer are cascaded with the third level of features, the second level of features, and the first level of features respectively as the input of the next convolutional layer; During the training phase, two multi-scale prediction modules are set up, each connected to the penultimate and second-to-last convolutional layers, to predict the multi-scale reconstruction results.
5. The method for erasing text in a scene of arbitrary shape according to claim 1, characterized in that: The operation of the complementary fusion layer is expressed as: Among them, Mask t Text region segmentation map predicted by the text region localization branch, I′ t The background detail reconstruction image generated by the background region reconstruction branch, I original is the original image; t represents the serial number of the erasure module, t=1,…,T, T is the total number of erasure modules in the network structure.
6. The method for erasing text in a scene of arbitrary shape according to claim 1, characterized in that: During the training phase, the overall loss function of the network structure is: L=L loc +L rg +L ssim +L vgg Among them, L loc The loss of the text region localization branch; L rg is the local-global reconstruction loss, which is calculated using the output of the text region localization branch and the background region reconstruction branch; L ssim represents ssim loss, L vgg Indicates L vgg Loss, L rg and L vgg All are considered reconstruction losses; among them: The loss L of the text region localization branch loc , expressed as: In the above formula, p k and k Represent the prediction results and labels respectively, and k represents a single pixel; Local-global reconstruction loss L rg Includes: Local reconstruction loss L rs and the global reconstruction loss L gs ; Local reconstruction loss L rs It is expressed as: In the above formula, Represents the prediction result of the multi-scale prediction module, i represents the serial number of the multi-scale prediction module, and the two multi-scale prediction modules are respectively connected to the penultimate and penultimate convolutional layers in the background area reconstruction branch, Mask i,gt and I i,gt By tagMask gt and I gt Directly scale to obtain the labels of the text area segmentation map and the background texture map, the label Mask gt For a given text area segmentation map, label I gt The image after the given text is erased; I out Represents the output of the last level erase module; λ i , β i , λ and β are all set coefficients; Global reconstruction loss L gs When calculating, the output I of the last erase module is out Erase image with label I gt Input into the VGG neural network, extract multi-layer features, and the feature map output by the nth layer of the VGG neural network is expressed as and H n , W n are the width and height of the feature map output by the nth layer of the VGG neural network, and R represents a real number set; the feature maps of the nth layer are scaled to Get the scaled predicted feature map With label feature map S m ×S m Represents the size of the feature map after the mth scaling, M represents the number of scaling, and the predicted feature map after scaling With label feature map Both contain feature maps after M scaling, and the feature maps obtained by the m-th scaling are recorded as and Then, calculate the scaled predicted feature map With label feature map Similarity matrix and It is expressed as: Among them, F n represents the scaled feature map, Respectively represent F n The ath and bth elements in Represents the value of the element at position (a, b) in the similarity matrix; and As F n Substituting into the above formula, we get and and Contains the similarity matrix of the feature map after M scaling, and the feature map obtained by the mth scaling and The similarity matrix is recorded as and Then calculate the global reconstruction loss L gs , expressed as: Where N is the total number of layers of the VGG neural network; The ssim loss is used to penalize the degradation of structural information, L vgg The loss is used to ensure the consistency of visual features. The two losses are expressed as: L ssim =-SSIM(I out ,I gt ) L vgg =VGG(I out I gt ) In the above formula, SSIM(.) represents the structural similarity function, and VGG(.) represents the I function of calculating the output of the VGG neural network. out Features and I gt The consistency of features and the global reconstruction loss L gs The same VGG neural network is used in 7. A system for erasing text in a scene of arbitrary shape, characterized in that: The system comprises: a network construction unit, which is used to construct a network structure of cascading a plurality of erasing modules, and to realize erasing text in scenes of arbitrary shapes by using the method described in any one of claims 1 to 6 through the network structure.
8. A processing device, characterized in that: include: one or more processors; A memory for storing 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 method according to any one of claims 1 to 6.
9. A readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Scene text erasing method of a depth model based on a full convolutional network
CN109492627A
Video scene text detection method and system based on deep learning, medium and equipment
CN109919025A