Method, system, device and storage medium for image de-watermarking
By constructing an image decomposition and restoration model and using multiple loss functions to optimize network parameters, the problem of incomplete watermark removal in existing technologies is solved, and efficient removal of complex watermarks and image restoration are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- AFIRSTSOFT CO LTD
- Filing Date
- 2023-06-09
- Publication Date
- 2026-05-29
AI Technical Summary
Existing technologies struggle to effectively remove watermarks of varying transparency and type, and their accuracy is insufficient, especially when restoring images in complex real-life scenarios.
An image decomposition model and an image inpainting model are constructed, including a mask decoding branch, a background decoding branch, a restoration branch, and an illusion branch. Watermarked images are reconstructed through various means. The U-Net architecture and feature extraction module are used for image decomposition and reconstruction. The network parameters are optimized by combining L1 loss, VGG loss, and BCE loss.
It achieves efficient removal of watermarks with different transparency and types, improving the accuracy and adaptability of image restoration.
Smart Images

Figure CN116757905B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and in particular to a method, system, device, and storage medium for removing watermarks from images. Background Technology
[0002] Image watermark removal aims to restore the original content of an image damaged by a watermark, which is crucial for image editing and understanding. Most current watermark removal methods are based on neural networks and primarily focus on watermarks with uniform transparency or a single watermark type, such as text or pattern watermarks. They are not effective in handling the diverse range of watermarks found in real-world applications.
[0003] Therefore, existing technologies still need to be improved and developed. Summary of the Invention
[0004] The main objective of this invention is to solve the technical problem that existing methods for recovering folders from hard drives tend to generate a large number of duplicate folders and result in inaccurate recovery.
[0005] The first aspect of the present invention provides a method for removing watermarks from images, the method comprising:
[0006] An image decomposition model and an image restoration model are constructed. The image decomposition model includes a mask decoding branch and a background decoding branch. The image restoration model includes a restoration branch and an illusion branch.
[0007] The watermarked image is input into the image decomposition model, and the watermarked component image and the clean component image are obtained from the watermarked image through the mask decoding branch and the background decoding branch.
[0008] The watermarked component image and the clean component image are input into the image restoration model. The restoration branch reconstructs the image based on the image content of the watermark position in the clean component image to obtain the first reconstructed image.
[0009] The watermark component image and the watermark default image obtained based on the watermarked image are input into the image restoration model. The illusion branch reconstructs the image at the watermark position based on the image content around the watermark position in the watermark default image to obtain a second reconstructed image.
[0010] The first reconstructed image, the second reconstructed image, and the watermark component image are input into a preset image fusion network for feature fusion to obtain a finely watermark-free image.
[0011] In an optional embodiment of the first aspect of the present invention, the mask decoding branch includes a self-calibrating mask improvement module; the background decoding branch includes a mask-guided background enhancement module; and the image decomposition model adopts the U-Net architecture.
[0012] In an optional embodiment of the first aspect of the present invention, the step of inputting the watermarked image into the image decomposition model and obtaining the watermarked component image and the clean component image from the watermarked image through the mask decoding branch and the background decoding branch includes:
[0013] The watermarked image is input into the image decomposition model, and after being processed by the shared encoder and shared decoder in the image decomposition model, it is split into two paths and input into the self-calibration mask improvement module and the mask-guided background enhancement module, respectively, to obtain the watermarked component image and the clean component image.
[0014] In an optional embodiment of the first aspect of the present invention, the recovery branch includes a first local-to-global feature extraction module, and the hallucination branch includes a second local-to-global feature extraction module, wherein the first local-to-global feature extraction module and the second local-to-global feature extraction module have the same structure.
[0015] In an optional embodiment of the first aspect of the present invention, both the first local-to-global feature extraction module and the second global feature extraction module include a global feature extraction submodule and a local feature extraction submodule; the global feature extraction submodule includes a global-to-global multilayer neural network branch and a global-to-local attention network branch; the local feature extraction submodule includes a local-to-global illusion network branch and a local-to-local multilayer neural network branch.
[0016] In an optional embodiment of the first aspect of the present invention, after constructing the image decomposition model and the image restoration model, the step of inputting the watermarked image into the image decomposition model includes:
[0017] Obtain a watermarked image sample set and a background image set of the watermarked image sample set;
[0018] Using the background image set as a reference sample, the image decomposition model and the image restoration model are trained using the watermarked image sample set;
[0019] The network structure parameters in the image decomposition model and the image restoration model are optimized based on the training results.
[0020] In an optional embodiment of the first aspect of the present invention, the network structure parameters include L1 loss, VGG loss and BCE loss.
[0021] A second aspect of the present invention provides an image watermark removal system, the image watermark removal system comprising:
[0022] The model building module is used to build an image decomposition model and an image restoration model. The image decomposition model includes a mask decoding branch and a background decoding branch, and the image restoration model includes a restoration branch and an illusion branch.
[0023] The image decomposition module is used to input the watermarked image into the image decomposition model, and obtain the watermarked component image and the clean component image from the watermarked image through the mask decoding branch and the background decoding branch;
[0024] The first image reconstruction module is used to input the watermarked component image and the clean component image into the image restoration model, and to perform image reconstruction on the watermark position based on the image content of the watermark position in the clean component image through the recovery branch to obtain the first reconstructed image.
[0025] The second image reconstruction module is used to input the watermark component image and the watermark default image obtained based on the watermarked image into the image restoration model, and to perform image reconstruction on the watermark position based on the image content around the watermark position in the watermark default image through the illusion branch to obtain the second reconstructed image.
[0026] The image fusion module is used to input the first reconstructed image, the second reconstructed image, and the watermark component image into a preset image fusion network for feature fusion to obtain a finely watermark-free image.
[0027] A third aspect of the present invention provides an image watermark removal device, the image watermark removal device comprising: a memory and at least one processor, the memory storing instructions, and the memory and the at least one processor being interconnected via a circuit;
[0028] The at least one processor invokes the instructions in the memory to cause the image watermark removal device to perform the image watermark removal method as described in any of the preceding claims.
[0029] A fourth aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the image watermark removal method as described in any of the preceding claims.
[0030] Beneficial Effects: This invention provides a method, system, device, and storage medium for image watermark removal. The method includes constructing an image decomposition model and an image inpainting model; inputting the watermarked image into the image decomposition model, obtaining a watermarked component image and a clean component image from the watermarked image through a mask decoding branch and a background decoding branch; inputting the watermarked component image and the clean component image into the image inpainting model, reconstructing the image based on the image content at the watermark location in the image through a recovery branch to obtain a first reconstructed image; inputting the watermarked component image and the watermark default image into the image inpainting model, reconstructing the image based on the image content around the watermark location in the image through an illusion branch to obtain a second reconstructed image; and inputting the first reconstructed image, the second reconstructed image, and the watermarked component image into an image fusion network for feature fusion to obtain a refined watermark-removed image. This invention combines multiple methods to reconstruct watermarked images and is highly adaptable to watermarks with varying transparency. Attached Figure Description
[0031] Figure 1 This is a schematic diagram of an embodiment of an image watermark removal method according to the present invention;
[0032] Figure 2 This is a schematic diagram of the structure of an image decomposition model and an image restoration model according to the present invention;
[0033] Figure 3 This is a schematic diagram of the structure of a first local-to-global feature extraction module according to the present invention;
[0034] Figure 4 This is a schematic diagram of an embodiment of an image watermark removal system according to the present invention;
[0035] Figure 5 This is a schematic diagram of an embodiment of an image watermark removal device according to the present invention. Detailed Implementation
[0036] The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" or "having" and any variations thereof are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0037] Please see Figure 1The first aspect of the present invention provides a method for removing watermarks from images, the method comprising:
[0038] S100. Construct an image decomposition model and an image restoration model. The image decomposition model includes a mask decoding branch and a background decoding branch. The image restoration model includes a restoration branch and an illusion branch.
[0039] See Figure 2 In an exemplary embodiment of step S100, the mask decoding branch includes a self-calibrating mask improvement module; the background decoding branch includes a mask-guided background enhancement module, and the image decomposition model adopts a U-Net architecture. In the image decomposition model used in this invention, watermark localization and watermark removal are two tasks that share all five encoder blocks and the first decoder block. Three of the five encoder blocks are independent decoder blocks, which respectively form the mask decoder branch and the background decoder branch. In the mask decoder branch, it is equipped with a self-calibrating mask improvement (SMR) module and is assigned to indicate the location of the watermark. In addition to the mask predicted from the last decoder block, it predicts the side output mask based on features from the other two decoder blocks. In the background decoder branch, it consists of a mask-guided background enhancement (MBE) module and is assigned to restore the damaged background area covered by the watermark.
[0040] See Figure 2 The recovery branch includes a first local-global feature extraction module, and the hallucination branch includes a second local-global feature extraction module. The first and second local-global feature extraction modules have the same structure, both being LG (Local-Global) modules. The main function of the LG module is to extract local and global information of the features. See [link to documentation]. Figure 3 Both the first local-to-global feature extraction module and the second global feature extraction module include a global feature extraction submodule and a local feature extraction submodule; the global feature extraction submodule includes a global-to-global multilayer neural network branch and a global-to-local attention network branch; the local feature extraction submodule includes a local-to-global illusion network branch and a local-to-local multilayer neural network branch.
[0041] S200: Input the watermarked image into the image decomposition model, and obtain the watermarked component image and the clean component image from the watermarked image through the mask decoding branch and the background decoding branch; Figure 2 Taking the image decomposition model shown as an example, the SMR module uses features extracted from the master mask prediction to calibrate the results and generate refined predictions, while the MBE module combines decoder features from the SMR branch to guide the removal of the watermark components.
[0042] In an optional embodiment of step S200, the step of inputting the watermarked image into the image decomposition model and obtaining the watermarked component image and the clean component image from the watermarked image through the mask decoding branch and the background decoding branch includes: inputting the watermarked image into the image decomposition model, sequentially processing it through the shared encoder and the shared decoder in the image decomposition model, and then splitting it into two paths and inputting them into the self-calibration mask improvement module and the mask-guided background enhancement module, respectively, to obtain the watermarked component image and the clean component image.
[0043] Specifically, the calculation process of the example of step S200 above is as follows:
[0044] From the input watermarked image After passing through the MBE module, (i.e., the coarse-grained watermark-removed image) and the watermark component obtained through the SMR module. (mask) (i.e., watermark component image);
[0045]
[0046]
[0047]
[0048]
[0049] in, This represents the clean component image. Represents a watermarked image. Indicates the transparency of the watermark. The mask representing the ground truth of the watermarked image. Represents the background image. This indicates the output after passing through the SMR module. This indicates the output after passing through the Encoder. This represents the output of the Decoder. This represents the input features of the Decoder. This indicates the final output of the MBE module.
[0050] S300: Input the watermarked component image and the clean component image into the image restoration model. Reconstruct the image of the watermark location based on the image content of the clean component image using the recovery branch, obtaining a first reconstructed image. In step S300, the clean component image obtained in step S200 is... (cleancomponent) and watermark component (mask) is sent to the Recovery branch to obtain (i.e., the first reconstructed image): ,in This indicates the output of the LG (Local-Global module).
[0051] S400: Input the watermark component image and the watermark default image obtained based on the watermarked image into the image restoration model. Reconstruct the watermark location using the illusion branch based on the image content surrounding the watermark location in the watermark default image to obtain a second reconstructed image. In step S400, the obtained watermark component... (mask) and (1- ) Sending you into the Hallucination branch yields... (i.e., the second reconstructed image): .
[0052] S500: The first reconstructed image, the second reconstructed image, and the watermark component image are input into a preset image fusion network for feature fusion to obtain a refined watermark-free image. In step S500, the image obtained in step S200 is... and the result obtained in step S300 and the result obtained in step 400 Send to Fusion Network to get : ,in, Indicates the process, such as Figure 1 The output of the Fusion Network shown is illustrated. The Fusion Network primarily performs a final feature fusion of the outputs from the two branches and the predicted mask, refining the network's output.
[0053] In an optional embodiment of the first aspect of the present invention, after constructing the image decomposition model and the image restoration model, the step of inputting the watermarked image into the image decomposition model includes:
[0054] Obtain a watermarked image sample set and a background image set of the watermarked image sample set; use the background image set as a reference sample and train the image decomposition model and the image restoration model using the watermarked image sample set; optimize the network structure parameters in the image decomposition model and the image restoration model based on the training results; the network structure parameters include L1 loss, VGG loss and BCE loss.
[0055] Specifically, this invention combines content recovery and hallucination in a dewatermarking framework. For each of the recovery and hallucination branches, there are two inputs. Image recovery is performed using the obtained feature vectors. Pixel loss (L1 loss), perceptual loss (VGG loss), and BCE loss (Binary Cross-Entropy) are used to optimize the image dewatermarking network parameters corresponding to the two branches.
[0056] (1) Calculation of Pixel loss (L1 loss): L1 loss is used to constrain the network's restoration results to be closer to the real image. , , , composition.
[0057] The result obtained in step S200 and the result obtained in step S300 and background image Perform L1 loss optimization, where Represented as:
[0058]
[0059] The clean component obtained in step S200 (clean component) image and Background image with watermark Perform L1 loss optimization, where Represented as:
[0060]
[0061] The result obtained in step S300 and background image Perform L1 loss optimization, where Represented as:
[0062]
[0063] in , In this invention, it is 0.75.
[0064] The result obtained in step S400 and background image Perform L1 loss optimization, where Represented as:
[0065]
[0066] therefore
[0067] (2) Calculation of VGG loss: Perceptual loss is used on the pre-trained VGG network to improve the reconstruction results. The formula for calculating VGG loss is:
[0068]
[0069] Similar to L1 loss, this invention has four predicted VGG losses:
[0070]
[0071]
[0072]
[0073]
[0074] The total loss of VGG is:
[0075]
[0076] (3) The BCE loss is calculated using binary cross-entropy loss (BCE) to constrain the primary mask prediction and self-calibrated mask prediction in the final SMR block. The formula for the BCE loss is:
[0077]
[0078] in, The ground truth of the mask These are predicted values.
[0079] Therefore, the mask loss is expressed as:
[0080]
[0081] in, This represents the loss of the primary mask and M. This represents the loss of the self-calibrated mask and M.
[0082] In summary, the image watermark removal method of this invention comprises two stages: Stage 1 primarily obtains the clean component and the watermark component (mask) from the input watermarked image; Stage 2 proposes a novel inpainting network, consisting of two branches performing content restoration and illusion in parallel, and a fusion network to balance the two prediction results, which helps handle watermarks with large areas of transparency. The inpainting network reconstructs the image from two aspects: the restoration branch extracts the remaining original content under the watermark to generate a reconstruction, while the illusion branch renders the watermark area entirely based on the surrounding environment. The restoration branch is responsible for removing transparent watermarks, while the illusion branch provides auxiliary reconstruction to refine the results. If the watermark is opaque, the illusion branch will dominate the reconstruction.
[0083] This invention combines content restoration and illusion frameworks to consider two scenarios. First, an image decomposition module is designed to locate the watermark region and separate the weakened clean component from the watermark component (mask). Then, two results are obtained from the branch inpainting network, and finally, a fusion network generates a refined reconstruction result. This effectively addresses watermarks with varying transparency in real-world applications.
[0084] See Figure 4 A second aspect of the present invention provides an image watermark removal system, the image watermark removal system comprising:
[0085] The model building module 10 is used to build an image decomposition model and an image restoration model. The image decomposition model includes a mask decoding branch and a background decoding branch. The image restoration model includes a restoration branch and an illusion branch.
[0086] Image decomposition module 20 is used to input the watermarked image into the image decomposition model, and obtain the watermarked component image and the clean component image from the watermarked image through the mask decoding branch and the background decoding branch;
[0087] The first image reconstruction module 30 is used to input the watermark component image and the clean component image into the image restoration model, and to perform image reconstruction on the watermark position based on the image content of the watermark position in the clean component image through the recovery branch to obtain the first reconstructed image.
[0088] The second image reconstruction module 40 is used to input the watermark component image and the watermark default image obtained based on the watermarked image into the image restoration model, and to perform image reconstruction on the watermark position based on the image content around the watermark position in the watermark default image through the illusion branch to obtain the second reconstructed image.
[0089] The image fusion module 50 is used to input the first reconstructed image, the second reconstructed image and the watermark component image into a preset image fusion network for feature fusion to obtain a finely watermark-free image.
[0090] In an optional embodiment of the second aspect of the present invention, the mask decoding branch includes a self-calibrating mask improvement module; the background decoding branch includes a mask-guided background enhancement module; and the image decomposition model adopts the U-Net architecture.
[0091] In an optional embodiment of the second aspect of the present invention, the image decomposition module 20 is specifically used to input the watermarked image into the image decomposition model, and after being processed by the shared encoder and the shared decoder in the image decomposition model, it is divided into two paths and input into the self-calibration mask improvement module and the mask-guided background enhancement module respectively, to obtain the watermarked component image and the clean component image.
[0092] In an optional embodiment of the second aspect of the present invention, both the first local-to-global feature extraction module and the second global feature extraction module include a global feature extraction submodule and a local feature extraction submodule; the global feature extraction submodule includes a global-to-global multilayer neural network branch and a global-to-local attention network branch; the local feature extraction submodule includes a local-to-global illusion network branch and a local-to-local multilayer neural network branch.
[0093] In an optional embodiment of the second aspect of the present invention, the image watermark removal system further includes:
[0094] The sample collection module is used to acquire a watermarked image sample set and a background image set of the watermarked image sample set;
[0095] The model training module is used to train the image decomposition model and the image restoration model using the background image set as a reference sample and the watermarked image sample set.
[0096] The network parameter optimization module is used to optimize the network structure parameters in the image decomposition model and the image restoration model based on the training results.
[0097] In an optional embodiment of the first aspect of the present invention, the network structure parameters include L1 loss, VGG loss and BCE loss.
[0098] Figure 5This is a schematic diagram of an image watermark removal device provided in an embodiment of the present invention. The image watermark removal device can vary significantly due to differences in configuration or performance, and may include one or more processors 60 (central processing units, CPUs) (e.g., one or more processors) and memory 70, and one or more storage media 80 (e.g., one or more mass storage devices) for storing applications or data. The memory and storage media can be short-term or persistent storage. The program stored in the storage media may include one or more modules (not shown in the diagram), each module including a series of instruction operations on the image watermark removal device. Furthermore, the processor may be configured to communicate with the storage media and execute the series of instruction operations in the storage media on the image watermark removal device.
[0099] The image watermark removal device of the present invention may further include one or more power supplies 90, one or more wired or wireless network interfaces 100, one or more input / output interfaces 110, and / or one or more operating systems, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 5 The illustrated image watermark removal device structure does not constitute a specific limitation on the image watermark removal device of the present invention. It may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.
[0100] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the image watermark removal method.
[0101] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the system or system / unit described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0102] If the integrated unit is implemented as a software functional unit 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 invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0103] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for removing watermarks from images, characterized in that, The method for removing watermarks from images includes: An image decomposition model and an image restoration model are constructed. The image decomposition model includes a mask decoding branch and a background decoding branch. The image restoration model includes a restoration branch and an illusion branch. The watermarked image is input into the image decomposition model, and the watermarked component image and the clean component image are obtained from the watermarked image through the mask decoding branch and the background decoding branch. The watermarked component image and the clean component image are input into the image restoration model. The restoration branch reconstructs the image based on the image content of the watermark position in the clean component image to obtain the first reconstructed image. The watermark component image and the watermark default image obtained based on the watermarked image are input into the image restoration model. The illusion branch reconstructs the image at the watermark position based on the image content around the watermark position in the watermark default image to obtain a second reconstructed image. The first reconstructed image, the second reconstructed image, and the watermark component image are input into a preset image fusion network for feature fusion to obtain a finely watermark-free image. The mask decoding branch includes a self-calibrating mask improvement module; the background decoding branch includes a mask-guided background enhancement module; the image decomposition model adopts the U-Net architecture; The recovery branch includes a first local global feature extraction module, and the hallucination branch includes a second local global feature extraction module. The first local global feature extraction module and the second local global feature extraction module have the same structure. Both the first local-to-global feature extraction module and the second local-to-global feature extraction module include a global feature extraction submodule and a local feature extraction submodule; the global feature extraction submodule includes a global-to-global multilayer neural network branch and a global-to-local attention network branch; the local feature extraction submodule includes a local-to-global illusion network branch and a local-to-local multilayer neural network branch.
2. The image watermark removal method according to claim 1, characterized in that, The step of inputting the watermarked image into the image decomposition model and obtaining the watermarked component image and the clean component image from the watermarked image through the mask decoding branch and the background decoding branch includes: The watermarked image is input into the image decomposition model, and after being processed by the shared encoder and shared decoder in the image decomposition model, it is split into two paths and input into the self-calibration mask improvement module and the mask-guided background enhancement module, respectively, to obtain the watermarked component image and the clean component image.
3. The image watermark removal method according to claim 1, characterized in that, After constructing the image decomposition model and the image restoration model, the step of inputting the watermarked image into the image decomposition model includes: Obtain a watermarked image sample set and a background image set of the watermarked image sample set; Using the background image set as a reference sample, the image decomposition model and the image restoration model are trained using the watermarked image sample set; The network structure parameters in the image decomposition model and the image restoration model are optimized based on the training results.
4. The image watermark removal method according to claim 3, characterized in that, The network structure parameters include L1 loss, VGG loss, and BCE loss.
5. An image watermark removal system, characterized in that, The image watermark removal system includes: The model building module is used to build an image decomposition model and an image restoration model. The image decomposition model includes a mask decoding branch and a background decoding branch, and the image restoration model includes a restoration branch and an illusion branch. The image decomposition module is used to input the watermarked image into the image decomposition model, and obtain the watermarked component image and the clean component image from the watermarked image through the mask decoding branch and the background decoding branch; The first image reconstruction module is used to input the watermarked component image and the clean component image into the image restoration model, and to perform image reconstruction on the watermark position based on the image content of the watermark position in the clean component image through the recovery branch to obtain the first reconstructed image. The second image reconstruction module is used to input the watermark component image and the watermark default image obtained based on the watermarked image into the image restoration model, and to perform image reconstruction on the watermark position based on the image content around the watermark position in the watermark default image through the illusion branch to obtain the second reconstructed image. The image fusion module is used to input the first reconstructed image, the second reconstructed image, and the watermark component image into a preset image fusion network for feature fusion to obtain a finely watermark-free image. The mask decoding branch includes a self-calibrating mask improvement module; the background decoding branch includes a mask-guided background enhancement module; the image decomposition model adopts the U-Net architecture; The recovery branch includes a first local global feature extraction module, and the hallucination branch includes a second local global feature extraction module. The first local global feature extraction module and the second local global feature extraction module have the same structure. Both the first local-to-global feature extraction module and the second local-to-global feature extraction module include a global feature extraction submodule and a local feature extraction submodule; the global feature extraction submodule includes a global-to-global multilayer neural network branch and a global-to-local attention network branch; the local feature extraction submodule includes a local-to-global illusion network branch and a local-to-local multilayer neural network branch.
6. An image watermark removal device, characterized in that, The image watermark removal device includes: a memory and at least one processor, wherein the memory stores instructions, and the memory and the at least one processor are interconnected via a line; The at least one processor invokes the instructions in the memory to cause the image watermark removal device to perform the image watermark removal method as described in any one of claims 1-5.
7. A computer-readable storage medium storing a computer program thereon, characterized in that, When the computer program is executed by the processor, it implements the image watermark removal method as described in any one of claims 1-5.