Watermark removal model training sample generation method, system, storage medium, computer

By generating watermarked text and synthesizing transparent watermarked images using computer vision technology, this method solves the problem of obtaining training samples for watermark removal models in existing technologies, and achieves the generation of high-quality watermark removal training samples.

CN116524287BActive Publication Date: 2026-02-27CHINA LIFE ASSET MANAGEMENT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210049478.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-17
Publication Date
2026-02-27
Estimated Expiration
2042-01-17

AI Technical Summary

Technical Problem

Existing generative adversarial models are prone to losing original information during watermark removal, resulting in low-quality clean images and difficulty in collecting training samples.

Method used

Watermarked text is generated using computer vision technology, rotated and synthesized into a transparent watermark image, and combined with image-type scanned PDFs, noise is added to generate training samples.

Benefits of technology

It achieves automated generation of high-quality watermark removal model training samples, simplifying the process of obtaining training samples.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116524287B_ABST
    Figure CN116524287B_ABST
Patent Text Reader

Abstract

A watermark removal model training sample generation method, system, storage medium and computer; the present application automatically synthesizes watermark based on computer vision technology, generates background transparent watermark text with a length of not more than 30 characters through font type and font size, realizes 0-180 degree rotation of the transparent watermark text and generates a watermark picture, uploads an image type scan PDF to be added with watermark, and the computer completes the paging of the image type scan PDF and synthesizes each page with the generated background transparent watermark picture, thereby quickly generating training samples for the image type scan PDF watermark.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular to a watermark removal model training sample generation method, system, storage medium and computer. BACKGROUND

[0002] With the development of digital media technology and computer technology, various digital media such as images are spread through the Internet, and people can download and use them. In order to protect the copyright of the image, a watermark is often added to the image. Since the watermark will interfere or destroy the inherent data information of the image to some extent, in order to better apply the value of the image, the watermark in the image needs to be removed.

[0003] At present, the watermark removal model can be used to remove the watermark of the watermark image to obtain the corresponding clean image. However, in the watermark removal process, the traditional generative adversarial model may lose the original information of the watermark image, resulting in a low quality of the clean image obtained. Therefore, the watermark removal model needs to be trained to remove the watermark, but a certain number of training samples are needed to train to improve the quality, and it is very troublesome to collect the training samples, especially the image type scan. SUMMARY

[0004] The technical problem to be solved by the present application is to provide a watermark removal model training sample generation method, system, storage medium and computer capable of generating watermark training samples.

[0005] In order to solve the above technical problems, the first technical scheme adopted by the present application is:

[0006] A watermark removal model training sample generation method, comprising

[0007] S1: generating watermark text based on computer vision technology through different fonts and font sizes;

[0008] S2: generating a picture with transparent background for the watermark text generated in step S1;

[0009] S3: rotating the watermark text generated in step S1 to generate a watermark picture;

[0010] S4: uploading an image type scan PDF to be added with a watermark;

[0011] S5: analyzing the image type scan PDF, respectively generating a picture for each page;

[0012] S6: synthesizing all the watermark pictures with transparent background generated in steps S2 and S3 with the picture generated in step S5 for each page;

[0013] S7: the watermarked picture generated in step S6 is added with background noise to complete the generation of the training sample.

[0014] Preferably, S1 further comprises:

[0015] Based on computer vision technology, a length of no more than 30 characters of the watermark text or a number of bytes equivalent to 30 characters is generated by different fonts and font sizes.

[0016] Preferably, S3 further comprises:

[0017] The watermark text generated in step S1 is rotated by 0-180° to generate a watermark picture.

[0018] Preferably, S4 further comprises:

[0019] An image type scanned PDF to be added with a watermark is uploaded, and an encryption program is executed.

[0020] Preferably, after S6, the two or more watermark pictures of S2 and S3 are synthesized in the picture generated in S5 at random positions, and the watermark positions are avoided to be overlapped.

[0021] Preferably, after S7, the watermark pictures generated in steps S2 and S3 are corresponded to the watermarked picture generated in step S7.

[0022] Preferably, the noise is salt and pepper noise.

[0023] To solve the above technical problems, the second technical scheme adopted by the present application is:

[0024] An image type scanned watermarked picture removal model training sample generation system comprises a processing unit, and the processing unit executes the above-mentioned watermarked picture removal model training sample generation method.

[0025] To solve the above technical problems, the third technical scheme adopted by the present application is:

[0026] A storage medium stores a computer program, and the computer program is executed by a processor to realize the above-mentioned watermarked picture removal model training sample generation method.

[0027] To solve the above technical problems, the fourth technical scheme adopted by the present application is:

[0028] A computer comprises at least a memory and a processor, the memory stores a computer program, and the processor executes the computer program on the memory to realize the above-mentioned watermarked picture removal model training sample generation method.

[0029] The beneficial effects of the present application are that the present application automatically synthesizes a watermark based on computer vision technology, generates a background transparent watermark text with a length of no more than 30 characters through font type and font size, realizes 0-180° rotation of the watermark text and generates a watermark picture for the transparent watermark text, uploads an image type scan PDF to be added with a watermark, and the computer completes the paging of the image type scan PDF and synthesizes each page with the generated background transparent watermark picture to quickly generate a training sample of the watermark of the image type scan PDF. BRIEF DESCRIPTION OF DRAWINGS

[0030] Figure 1 A watermark text example generated by a watermark removal model training sample generation method of the embodiment of the present application;

[0031] Figure 2 An image type scan example of a watermark removal model training sample generation method of the embodiment of the present application;

[0032] Figure 3 A synthesized picture example 1 of a watermark removal model training sample generation method of the embodiment of the present application;

[0033] Figure 4 A synthesized picture example 2 of a watermark removal model training sample generation method of the embodiment of the present application. DETAILED DESCRIPTION

[0034] To explain the technical content, the achieved purposes and effects of the present application in detail, the following will be explained in combination with the embodiments and the drawings.

[0035] Embodiment one

[0036] Please refer to Figures 1 to 4 A (image type scan) watermark removal model training sample generation method, comprising

[0037] S11: Based on computer vision technology, a watermark text with a length of no more than 30 characters (Chinese characters) or a byte number of no more than 30 characters equivalent number of bytes (for example, one Chinese character 2 bytes, one English letter 1 byte, i.e. 60 English letters) is generated through different fonts and font sizes;

[0038] S12: The watermark text generated in step S11 is generated into a picture with a transparent background (see Figure 1 );

[0039] S13: The watermark text generated in step S11 is realized to rotate the watermark text 0-180° and generate a watermark picture;

[0040] S14: Upload an image type scan PDF to be added with a watermark, and execute an encryption program;

[0041] S15: Analyze the image type scan PDF, and separately according to each page (each page is independently split out), generate a picture for each page (see Figure 2 , give a picture as an example, the text content in the figure is meaningless, Figure 3 、 Figure 4 The same text is meaningless);

[0042] S16: Synthesize all the watermark pictures generated by steps S11 and S13 and the picture generated by step S15 (refer to Figure 3 and Figure 4 (45° rotation));

[0043] S17: Synthesize two or more watermark pictures of S12 and S13 in the picture generated by S15 at a random position, and avoid overlapping the watermark position;

[0044] S18: Add salt and pepper noise to the watermark-containing picture synthesized in step S16 to complete the training sample generation;

[0045] S19: Establish a corresponding relationship between the watermark picture generated by steps S12 and S13 and the watermark-containing picture generated by step S17.

[0046] Example two

[0047] An image type scan watermark removal model training sample generation system includes a processing unit that executes the watermark removal model training sample generation method described in example one.

[0048] Example three

[0049] A storage medium stores a computer program that, when executed by a processor, implements the watermark removal model training sample generation method described in example one.

[0050] Example four

[0051] A computer includes at least a memory and a processor, the memory stores a computer program, and the processor implements the watermark removal model training sample generation method described in example one when executing the computer program on the memory.

[0052] The above is only an embodiment of the present application, and does not limit the patent scope of the present application, any equivalent transformation or direct or indirect application in related technical fields based on the content of the present application specification and drawings, are also included in the patent protection scope of the present application.

Claims

1. A method for generating a training sample of a watermark removal model, characterized in that, Comprising S1: generating watermark text by different fonts and font sizes based on computer vision technology; S2: generating a picture with transparent background for the watermark text generated in step S1; S3: rotating the watermark text generated in step S1 and generating a watermark picture; S4: uploading an image type scanned PDF to which a watermark is to be added; S5: analyzing the image type scanned PDF, and generating a picture for each page respectively; S6: synthesizing all the watermark pictures with transparent background generated in steps S2 and S3 with the pictures generated in step S5; S7: adding background noise to the watermark picture synthesized in step S6 to complete the generation of training samples; wherein S3 further comprises: rotating the watermark text generated in step S1 by 0-180 degrees and generating a watermark picture; wherein after step S6, two or more watermark pictures generated in steps S2 and S3 are synthesized at random positions in the pictures generated in step S5, and the watermark positions are avoided to overlap; wherein the noise is salt and pepper noise. 2.The method of claim 1, wherein, S1 further comprises: generating a watermark text with a length of no more than 30 characters or a byte number equivalent to the number of characters of no more than 30 characters by different fonts and font sizes based on computer vision technology. 3.The method of claim 1, wherein, S4 further comprises: uploading the image type scanned PDF to which a watermark is to be added and executing an encryption program. 4.The method of claim 1, wherein, After step S7, the watermark pictures generated in steps S2 and S3 are corresponded to the watermark picture generated in step S7.

5. An image type scan document watermark removal model training sample generation system, characterized in that, The computer program is executed by the processor to realize the watermark removal model training sample generation method of any one of claims 1-4.

6. A storage medium storing a computer program, characterized by The computer program is executed by the processor to realize the watermark removal model training sample generation method of any one of claims 1-4.

7. A computer comprising at least a memory, a processor, said memory having stored thereon a computer program, characterized in that, The processor executes the computer program on the memory to realize the watermark removal model training sample generation method of any one of claims 1-4.

Citation Information

Patent Citations

  • Watermark recognition online training, sample preparation and removal methods, watermark recognition online training device, equipment and medium

    CN112419135A