Generation of watermark detection model and watermark detection method, device and equipment
By generating a detection branch module based on the relationship between watermark embedding strength and size, a watermark detection model is constructed, and the problem of high complexity of detection image watermarks in the prior art is solved, and efficient detection of different watermarks is achieved.
Patent Information
- Application Number
- CN201910461993.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-05-30
- Publication Date
- 2025-01-14
- Estimated Expiration
- 2039-05-30
AI Technical Summary
In the prior art, it is difficult and complex to detect image watermarks, and it is impossible to effectively process watermarks in a large number of images, resulting in difficulty in manual review.
By generating multiple watermark detection branch modules, the model is trained based on the information of different watermark embedding intensity and size relationships, and the watermark detection model is constructed to automatically detect watermarks in the image.
It realizes effective detection under different watermark embedding strengths and size relationships, reduces detection complexity, and improves the accuracy and efficiency of automatic detection.
Smart Images

Figure CN112017092B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and storage device for generating a watermark detection model. The present application also relates to a method, device, electronic device and storage device for watermark detection. Background Art
[0002] Images contain rich and intuitive information. Currently, in the fields of social networking, shopping, and tourism on the Internet, a large number of images are needed to convey information to the majority of users. Since the spread of information on the Internet is extremely fast and convenient, more and more individuals and companies choose to embed watermarks in their images, such as watermarking trademarks or URLs in certain areas of the image to protect the intellectual property rights of the image. Therefore, before using the image, the image user needs to review the image to detect whether there is a watermark in the image to avoid misuse or infringement. However, with the rapid development and application of the Internet, image users obtain a large number of images through various channels every day. In this case, manual review can no longer meet the needs.
[0003] Under the existing technology, traditional image processing and optimization methods are used to automatically detect watermarks embedded in images by analyzing the consistency of a large number of image watermarks. This detection method detects the watermark by inputting a set of pictures into the algorithm, separating the watermark and the background image through the algorithm. Using this method, it is necessary to collect a large number of image sets using the same watermark, and it is required that the watermark embedding size, relative position and embedding strength of these images with the same visible watermark are the same. These requirements are difficult to achieve in practical applications.
[0004] Therefore, the existing technology has the problem that watermark detection is difficult and complex. Summary of the invention
[0005] The present application provides a method, device, electronic device and storage device for generating a watermark detection model to solve the existing problem of high difficulty and complexity in detecting watermarks.
[0006] The present application provides a method for generating a watermark detection model, comprising:
[0007] Obtaining multiple watermark data sets; wherein the carrier objects in the same watermark data set have the same watermark embedding strength information and the same size relationship information, the size relationship information is used to represent the relationship between the size information of the watermark template and the size information of the carrier object, the watermark template is a template used when adding watermark information to the carrier object;
[0008] Generate multiple watermark detection branch modules according to the multiple watermark data sets; each watermark detection branch module is used to obtain a preliminary watermark detection result for the carrier object based on the specified watermark embedding strength information and the specified size relationship information;
[0009] A watermark detection model is generated according to the multiple watermark detection branch modules; the watermark detection model is used to obtain a final watermark detection result for a carrier object according to the preliminary watermark detection results of the multiple watermark detection branch modules.
[0010] Optionally, obtaining the watermark data set includes:
[0011] Obtaining a carrier object set; wherein each carrier object in the same carrier object set has the same watermark embedding strength information and the same size relationship information; each carrier object in different carrier object sets has different watermark embedding strength information and different size relationship information;
[0012] Get label information of carrier object set;
[0013] A plurality of watermark data sets are generated according to the carrier object set and the label information.
[0014] Optionally, also include:
[0015] Saving the label information into a text file;
[0016] Converting the text file into a non-text file in a predetermined format;
[0017] The step of generating a plurality of watermark data sets according to the carrier object set and the label information includes:
[0018] A plurality of watermark data sets are generated according to the carrier object set and the non-text file.
[0019] Optionally, the tag information includes at least one of the following:
[0020] Category information of the watermark in the carrier object;
[0021] The location information where the watermark is embedded in the carrier object;
[0022] The name information of the watermark in the carrier object.
[0023] Optionally, generating multiple watermark detection branch modules according to the multiple watermark data sets includes:
[0024] Inputting the carrier object in the watermark data set into the convolution layer in the neural network model to extract the feature map of the carrier object;
[0025] Inputting the feature map of the carrier object into a candidate region network in a neural network model to generate a recommended region containing a watermark;
[0026] Inputting the feature map of the carrier object and the recommended region into a region of interest pooling layer in a neural network model to obtain a feature map of the recommended region;
[0027] Inputting the recommended region feature map into a classifier to obtain a test value of the category of the watermark in the carrier object;
[0028] A neural network model is trained according to the test value and the label information to generate a watermark detection branch module.
[0029] Optionally, the number of the watermark detection branches is equal to the number of the watermark data sets; one watermark data set is used to generate one watermark detection branch module.
[0030] The present application also provides a watermark detection method, comprising:
[0031] Obtaining a carrier object to be detected;
[0032] The carrier object to be detected is input into the watermark detection model to obtain the watermark detection result for the carrier object to be detected; the watermark detection model is used to obtain the watermark detection result for the carrier object to be detected based on the watermark embedding strength information and size relationship information of the carrier object to be detected.
[0033] Optionally, the step of inputting the carrier object to be detected into a watermark detection model to obtain a watermark detection result for the carrier object to be detected includes:
[0034] Inputting the carrier object to be detected into a watermark detection model to obtain a plurality of preliminary watermark detection results for the carrier object to be detected;
[0035] According to the multiple preliminary watermark detection results for the carrier object to be detected, a final watermark detection result for the carrier object to be detected is obtained.
[0036] Optionally, the method further includes: obtaining a confidence level for each preliminary watermark detection result;
[0037] The step of obtaining a final watermark detection result for the carrier object to be detected according to the multiple preliminary watermark detection results for the carrier object to be detected comprises:
[0038] According to the multiple preliminary watermark detection results and the confidence level of each preliminary watermark detection result, a final watermark detection result for the carrier object to be detected is determined.
[0039] Optionally, determining the final watermark detection result for the carrier object to be detected according to the multiple preliminary watermark detection results and the confidence level of each preliminary watermark detection result includes:
[0040] The preliminary watermark detection result with the highest confidence is taken as the final watermark detection result.
[0041] Optionally, the carrier object to be detected is input into a watermark detection model to obtain a plurality of preliminary watermark detection results for the carrier object to be detected, including:
[0042] Inputting the carrier object to be detected into the convolution layer of the watermark detection model to extract the feature map of the carrier object to be detected;
[0043] Inputting the feature map of the carrier object to be detected into the candidate region network of the watermark detection model to generate a recommended region containing a visible watermark;
[0044] Inputting the feature map of the carrier object to be detected and the recommended area into the interest region pooling layer of the watermark detection model to obtain a feature map of the recommended area;
[0045] The recommended region feature map is input into a classifier to obtain preliminary results of watermark detection in the plurality of carrier objects to be detected.
[0046] Optionally, the preliminary watermark detection result includes at least one of the following information:
[0047] Category information of the watermark in the carrier object to be detected;
[0048] The location information of the watermark in the carrier object to be detected.
[0049] The present application also provides a watermark detection method, comprising:
[0050] Obtaining a carrier object to be detected;
[0051] Obtaining watermark embedding strength information and size relationship information of the carrier object to be detected, wherein the size relationship information is used to indicate the relationship between the size information of the watermark template and the size information of the carrier object, and the watermark template is a template used when adding watermark information to the carrier object;
[0052] According to the watermark embedding strength information and the size relationship information, a watermark detection result for the carrier object to be detected is obtained.
[0053] The present application also provides a device for generating a watermark detection model, comprising:
[0054] A watermark data set obtaining unit, used to obtain multiple watermark data sets; wherein the carrier objects in the same watermark data set have the same watermark embedding strength information and the same size relationship information, the size relationship information is used to indicate the relationship between the size information of the watermark template and the size information of the carrier object, the watermark template is a template used when adding watermark information to the carrier object;
[0055] A watermark detection branch generating unit, configured to generate a plurality of watermark detection branch modules according to the plurality of watermark data sets; each watermark detection branch module is configured to obtain a preliminary watermark detection result for a carrier object based on specified watermark embedding strength information and specified size relationship information;
[0056] The watermark detection model generation unit is used to generate a watermark detection model according to the multiple watermark detection branch modules; the watermark detection model is used to obtain a final watermark detection result for a carrier object according to the preliminary watermark detection results of the multiple watermark detection branch modules.
[0057] The present application also provides an electronic device, including:
[0058] processor;
[0059] The memory is used to store a program of a method for generating a watermark detection model. After the device is powered on and the program of the method for generating a watermark detection model is run by the processor, the following steps are performed:
[0060] Obtaining multiple watermark data sets; wherein the carrier objects in the same watermark data set have the same watermark embedding strength information and the same size relationship information, the size relationship information is used to represent the relationship between the size information of the watermark template and the size information of the carrier object, the watermark template is a template used when adding watermark information to the carrier object;
[0061] Generate multiple watermark detection branch modules according to the multiple watermark data sets; each watermark detection branch module is used to obtain a preliminary watermark detection result for the carrier object based on the specified watermark embedding strength information and the specified size relationship information;
[0062] A watermark detection model is generated according to the multiple watermark detection branch modules; the watermark detection model is used to obtain a final watermark detection result for a carrier object according to the preliminary watermark detection results of the multiple watermark detection branch modules.
[0063] The present application also provides a storage device storing a program of a method for generating a watermark detection model, wherein the program is executed by a processor to perform the following steps:
[0064] Obtaining multiple watermark data sets; wherein the carrier objects in the same watermark data set have the same watermark embedding strength information and the same size relationship information, the size relationship information is used to represent the relationship between the size information of the watermark template and the size information of the carrier object, the watermark template is a template used when adding watermark information to the carrier object;
[0065] Generate multiple watermark detection branch modules according to the multiple watermark data sets; each watermark detection branch module is used to obtain a preliminary watermark detection result for the carrier object based on the specified watermark embedding strength information and the specified size relationship information;
[0066] A watermark detection model is generated according to the multiple watermark detection branch modules; the watermark detection model is used to obtain a final watermark detection result for a carrier object according to the preliminary watermark detection results of the multiple watermark detection branch modules.
[0067] The present application further provides a watermark detection device, comprising:
[0068] A carrier object obtaining unit to be detected, used to obtain the carrier object to be detected;
[0069] The watermark detection result obtaining unit is used to input the carrier object to be detected into the watermark detection model to obtain the watermark detection result for the carrier object to be detected; the watermark detection model is used to obtain the watermark detection result for the carrier object to be detected based on the watermark embedding strength information and size relationship information of the carrier object to be detected.
[0070] The present application further provides an electronic device, including:
[0071] processor;
[0072] The memory is used to store a program of the watermark detection method. After the device is powered on and the program of the watermark detection method is run by the processor, the following steps are performed:
[0073] Obtaining a carrier object to be detected;
[0074] The carrier object to be detected is input into the watermark detection model to obtain the watermark detection result for the carrier object to be detected; the watermark detection model is used to obtain the watermark detection result for the carrier object to be detected based on the watermark embedding strength information and size relationship information of the carrier object to be detected.
[0075] The present application further provides a storage device storing a program of a watermark detection method, wherein the program is executed by a processor to perform the following steps:
[0076] Obtaining a carrier object to be detected;
[0077] The carrier object to be detected is input into the watermark detection model to obtain the watermark detection result for the carrier object to be detected; the watermark detection model is used to obtain the watermark detection result for the carrier object to be detected based on the watermark embedding strength information and size relationship information of the carrier object to be detected.
[0078] Compared with the prior art, this application has the following advantages:
[0079] The present application provides a method for generating a watermark detection model. The first embodiment of the present application trains branches under multiple different watermark embedding strength information and different size relationship information, and constructs a watermark detection model based on the trained multiple branches. The above-mentioned watermark detection model can effectively complete the detection task of visible watermarks under different watermark embedding strengths and different size relationships, and solve the existing problem of high difficulty and complexity in detecting watermarks. BRIEF DESCRIPTION OF THE DRAWINGS
[0080] Figure 1A This is a schematic diagram of the first application scenario embodiment provided by the present application.
[0081] Figure 1B A schematic diagram of a second application scenario embodiment provided in this application.
[0082] Figure 1 This is a flowchart of a method for generating a watermark detection model provided in the first embodiment of the present application.
[0083] Figure 2 This is a flowchart of obtaining a watermark data set provided by the first embodiment of the present application.
[0084] Figure 3 It is a schematic diagram of generating multiple watermark detection branch modules according to multiple watermark data sets provided in the first embodiment of the present application.
[0085] Figure 4 It is a flowchart of generating multiple watermark detection branch modules according to multiple watermark data sets provided by the first embodiment of the present application.
[0086] Figure 5 It is a schematic diagram of a watermark detection model provided in the first embodiment of the present application.
[0087] Figure 6 This is a flow chart of a watermark detection method provided in the second embodiment of the present application.
[0088] Figure 7 It is a flowchart of obtaining multiple preliminary watermark detection results for a carrier object to be detected, provided in the second embodiment of the present application.
[0089] Figure 8This is a flow chart of a watermark detection method provided in the third embodiment of the present application.
[0090] Fig. 9 It is a schematic diagram of a device for generating a watermark detection model provided in the fourth embodiment of the present application.
[0091] Fig.10 It is a schematic diagram of an electronic device provided in the fifth embodiment of the present application.
[0092] Fig.11 It is a schematic diagram of a watermark detection device provided in the seventh embodiment of the present application.
[0093] Fig.12 It is a schematic diagram of an electronic device provided in the eighth embodiment of the present application. DETAILED DESCRIPTION
[0094] Many specific details are set forth in the following description to facilitate a full understanding of the present invention. However, the present invention can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present invention, so the present invention is not limited to the specific implementation disclosed below.
[0095] In order to more clearly demonstrate the present application, the application scenario of the watermark detection method provided in the embodiment of the present application is first introduced.
[0096] Some embodiments provided in this application can be applied to scenarios where a client interacts with a server, such as Figure 1A As shown, it is a schematic diagram of the first application scenario embodiment provided by the present application. The client first establishes a connection with the server. After the connection, the client sends the image to be detected to the server. The server receives the image to be detected and performs watermark detection on the image to be detected, obtains the watermark detection result of the image to be detected, and sends the watermark detection result of the image to be detected to the client. The client receives the watermark detection result of the image to be detected.
[0097] In addition, some embodiments provided in this application can be applied to internal processing of the client, such as Figure 1B As shown, it is a schematic diagram of the second application scenario embodiment provided by the present application. After the client obtains the image to be detected, it detects the image to be detected, obtains the watermark detection result of the image to be detected, and then outputs the watermark detection result of the image to be detected. It should be noted that the above two application scenarios are only two embodiments of the application scenarios. The purpose of providing these two application scenario embodiments is to facilitate the understanding of the watermark detection method of the present application, and is not used to limit the watermark detection method of the present application.
[0098] The first embodiment of the present application provides a method for generating a watermark detection model. Figure 1 , Figure 2 , Figure 3 , Figure 4 Provide explanation.
[0099] like Figure 1 As shown, in step S101, multiple watermark data sets are obtained; wherein, the carrier objects in the same watermark data set have the same watermark embedding strength information and the same size relationship information, and the size relationship information is used to represent the relationship between the size information of the watermark template and the size information of the carrier object, and the watermark template is a template used when embedding watermark information into the carrier object.
[0100] The watermark embedding strength may refer to a watermark embedding strength factor. The stronger the watermark embedding strength, the better the robustness of the watermark.
[0101] The size relationship may refer to the scale ratio between the watermark template and the carrier object, that is, the ratio between the width and height of the watermark template rectangle and the width and height of the carrier object respectively.
[0102] See also Figure 2 , which is a flowchart of obtaining a watermark data set provided by the first embodiment of the present application, specifically including steps S101 - 1 to S101 - 3.
[0103] like Figure 2 As shown, in step S101-1, a carrier object set is obtained; wherein each carrier object in the same carrier object set has the same watermark embedding strength information and the same size relationship information; each carrier object in different carrier object sets has different watermark embedding strength information and different size relationship information.
[0104] Each carrier object set may refer to a collection of carrier objects including multiple embedded watermarks.
[0105] The obtaining of the carrier object set may refer to obtaining multiple carrier object sets, wherein each carrier object in each carrier object set has the same watermark embedding strength information and the same size relationship information; and each carrier object in different carrier object sets has different watermark embedding strength information and different size relationship information.
[0106] For example, n sets of visible watermark image sets (i.e., carrier object sets) are obtained, which are numbered 1, 2, 3, ... n. The watermark embedding strength in the visible watermark image set No. 1 is α = x1, and the scale ratio between the watermark template and the added image (carrier object) is s = y1; the watermark embedding strength in the visible watermark image set No. 2 is α = x2, and the scale ratio between the watermark template and the added image is s = y2; the watermark embedding strength in the visible watermark image set No. 3 is α = x3, and the scale ratio between the watermark template and the added image is s = y3; and so on, the watermark embedding strength in the visible watermark image set No. n-1 is α = xn-1, and the scale ratio between the watermark template and the added image is s = yn-1; the watermark embedding strength in the visible watermark image set No. n is α = xn, and the scale ratio between the watermark template and the added image is s = yn (xi, yi in the above description are both decimals between 0 and 1, i∈[1,n]). The watermark embedding positions in the above n groups of visible watermark image sets are random, and the position information of adding watermarks is recorded in the process of embedding the watermark template.
[0107] like Figure 2 As shown, in step S101 - 2 , label information of the carrier object set is obtained.
[0108] The tag information includes at least one of the following: category information of the watermark in the carrier object; location information of the watermark embedded in the carrier object; name information of the watermark in the carrier object. The category of the watermark in the carrier object is determined according to the watermark embedding strength information and size relationship information of the carrier object. For example, the category information of the watermark in the carrier object in the visible watermark picture set No. 1 in the above example can be (α=x1, s=y1).
[0109] like Figure 2 As shown, in step S101-3, multiple watermark data sets are generated according to the carrier object set and the label information.
[0110] As an implementation method, in order to facilitate automatic processing, the tag information can be first saved in a text file, and then the text file can be converted into a non-text file in a predetermined format. The non-text file in the predetermined format can be an XML file.
[0111] The step of generating a plurality of watermark data sets according to the carrier object set and the label information includes:
[0112] A plurality of watermark data sets are generated according to the carrier object set and the non-text file.
[0113] Still using the above example, we can first save the label information of each visible watermark image set into a TXT file; then convert the TXT file into an XML file in VOC2007 format, merge visible watermark image set No. 1 with XML file No. 1 to create watermark data set No. 1, merge visible watermark image set No. 2 with XML file No. 2 to create watermark data set No. 2, merge visible watermark image set No. 3 with XML file No. 3 to create watermark data set No. 3, and so on, to construct watermark data sets No. 1 to n.
[0114] like Figure 1 As shown, in step S102, multiple watermark detection branch modules are generated according to the multiple watermark data sets; each watermark detection branch module is used to obtain a preliminary watermark detection result for the carrier object based on specified watermark embedding strength information and specified size relationship information.
[0115] The specified watermark embedding strength refers to the watermark embedding strength of the watermark data set corresponding to the watermark detection branch module. For example, the watermark embedding strength corresponding to watermark detection branch 1 is α=x1; the watermark embedding strength corresponding to watermark detection branch n is α=xn.
[0116] The specified size relationship refers to the size relationship of the watermark data set corresponding to the watermark detection branch module. For example, the size relationship corresponding to the watermark detection branch 1 is the scale ratio s=y1.
[0117] The preliminary watermark detection result refers to the preliminary watermark detection result obtained by a watermark detection branch module. Each watermark detection branch module obtains a preliminary watermark detection result, and then obtains the final watermark detection result based on the preliminary watermark detection result.
[0118] The number of the watermark detection branches can be equal to the number of the watermark data sets; one watermark data set is used to generate one watermark detection branch module. Figure 3 As shown, n watermark detection branch modules are generated according to n watermark data sets.
[0119] For example, the n watermark data sets constructed in step 101 are respectively input into the basic object detection network Faster R-CNN to obtain branches 1 to n. Among them, Faster R-CNN is an object detection network based on deep learning.
[0120] See also Figure 4 , which is a flowchart of generating multiple watermark detection branch modules according to multiple watermark data sets provided by the first embodiment of the present application, specifically including steps S102-1 to S102-4.
[0121] like Figure 4As shown, in step S102-1, the carrier object in the watermark data set is input into the convolution layer in the neural network model to extract the feature map of the carrier object.
[0122] For example, Figure 3 As shown, the neural network model is Faster R-CNN, the watermark data set includes watermark data sets 1 to n, and the pictures (carrier objects) with visible watermarks in the watermark data set are input into the convolutional layers Conv layers (for example, the VGG16 convolutional network is selected) to extract feature maps of the pictures with visible watermarks.
[0123] like Figure 4 As shown, in step S102-2, the feature map of the carrier object is input into the candidate area network in the neural network model to generate a recommended area containing a watermark.
[0124] For example, Figure 3 As shown in the figure, the feature map of the above picture with visible watermark is input into the candidate region network RPN (Region Proposals Networks) layer to generate anchors (rectangular boxes generated at each pixel in the image in the deep learning-based target detection algorithm Faster R-CNN). The RPN layer uses softmax to determine whether the anchors belong to the foreground (anchors containing watermarks) or the background (anchors not containing watermarks), and then uses bounding box regression to correct the anchors to obtain accurate recommended areas containing watermarks.
[0125] like Figure 4 As shown, in step S102-3, the feature map of the carrier object and the recommended area are input into the region of interest pooling layer in the neural network model to obtain a feature map of the recommended area.
[0126] For example, Figure 3 As shown in the figure, the feature map of the image with visible watermark generated by the convolution layer and the recommended area containing the watermark generated by the candidate area network layer are input into the RoI Pooling (region of interest pooling layer), and the region of interest pooling layer extracts the proposal feature map (proposal feature maps).
[0127] like Figure 4 As shown, in step S102-4, the recommended region feature map is input into a classifier to obtain a test value of the category of the watermark in the carrier object.
[0128] like Figure 4 As shown, in step S102-5, the neural network model is trained according to the test value and the label information to generate a watermark detection branch module.
[0129] like Figure 1 As shown, in step S103, a watermark detection model is generated according to the multiple watermark detection branch modules; the watermark detection model is used to obtain a final result of watermark detection for a carrier object according to the preliminary results of watermark detection by the multiple watermark detection branch modules.
[0130] like Figure 5 As shown, it is a schematic diagram of a watermark detection model.
[0131] So far, the introduction to the first embodiment of the present application is completed. The first embodiment of the present application trains multiple branches under different watermark embedding strength information and different size relationship information, and constructs a watermark detection model based on the trained multiple branches. The above watermark detection model can effectively detect visible watermarks under different watermark embedding strengths and different size relationships, solving the existing problem of high difficulty and complexity in detecting watermarks.
[0132] The second embodiment of the present application provides a watermark detection method as follows: Figure 6 , Figure 7 Provide explanation.
[0133] like Figure 6 As shown, in step S601, a carrier object to be detected is obtained.
[0134] The carrier object to be detected may refer to any image. For example, the carrier object to be detected is an image embedded with a visible watermark.
[0135] like Figure 6 As shown, in step S602, the carrier object to be detected is input into the watermark detection model to obtain the watermark detection result for the carrier object to be detected; the watermark detection model is used to obtain the watermark detection result for the carrier object to be detected based on the watermark embedding strength information and size relationship information of the carrier object to be detected.
[0136] The watermark embedding strength may refer to a watermark embedding strength factor. The stronger the watermark embedding strength, the better the robustness of the watermark.
[0137] The size relationship may refer to the scale ratio of the watermark template to the carrier object, that is, the ratio of the width and height of the watermark template rectangle to the width and height of the carrier object to be detected. The watermark template is the template used when adding watermark information to the carrier object to be detected.
[0138] The watermark detection result includes: category information of the watermark in the carrier object to be detected; location information of the watermark in the carrier object to be detected, image name of the watermark in the carrier object to be detected, etc.
[0139] The step of inputting the carrier object to be detected into a watermark detection model to obtain a watermark detection result for the carrier object to be detected includes:
[0140] Inputting the carrier object to be detected into a watermark detection model to obtain a plurality of preliminary watermark detection results for the carrier object to be detected;
[0141] According to the multiple preliminary watermark detection results for the carrier object to be detected, a final watermark detection result for the carrier object to be detected is obtained.
[0142] like Figure 5 As shown, the watermark detection model is composed of multiple watermark detection branch modules, each of which can obtain a preliminary watermark detection result for the carrier object to be detected, and obtain the final watermark detection result for the carrier object to be detected based on the multiple preliminary watermark detection results.
[0143] See also Figure 7 , which is a flowchart provided by the second embodiment of the present application for inputting a carrier object to be detected into a watermark detection model to obtain multiple preliminary watermark detection results for the carrier object to be detected, specifically including steps S502-1 to S502-4.
[0144] like Figure 7 As shown, in step S502-1, the carrier object to be detected is input into the convolutional layer of the watermark detection model to extract the feature map of the carrier object to be detected.
[0145] like Figure 7 As shown, in step S502-2, the feature map of the carrier object to be detected is input into the candidate area network of the watermark detection model to generate a recommended area containing a visible watermark.
[0146] like Figure 7 As shown, in step S502-3, the feature map of the carrier object to be detected and the recommended area are input into the interest region pooling layer of the watermark detection model to obtain a feature map of the recommended area.
[0147] like Figure 7 As shown, in step S502-4, the recommended region feature map is input into a classifier to obtain preliminary watermark detection results in the plurality of carrier objects to be detected.
[0148] As a preferred manner, the second embodiment of the present application may further include: obtaining the confidence level of each preliminary watermark detection result.
[0149] The step of obtaining a final watermark detection result for the carrier object to be detected according to the multiple preliminary watermark detection results for the carrier object to be detected comprises:
[0150] According to the multiple preliminary watermark detection results and the confidence level of each preliminary watermark detection result, a final watermark detection result for the carrier object to be detected is determined.
[0151] The step of determining a final watermark detection result for the carrier object to be detected according to the plurality of preliminary watermark detection results and the confidence level of each preliminary watermark detection result comprises:
[0152] The preliminary watermark detection result with the highest confidence is taken as the final watermark detection result.
[0153] For example, Figure 5 As shown, the input image (i.e., the carrier object to be detected) is input into the multi-branch watermark detection model, and each branch will obtain its own corresponding preliminary detection results: the position coordinates of the visible watermark detection frame and the confidence score of the detection result (n branches obtain their corresponding confidence scores 1, 2, 3, ..., scoren-1 and scoren respectively). If a branch does not detect the watermark, the watermark detection frame information output by the branch will be set to [0, 0, 0, 0], and the detection confidence of the branch will also be set to 0. The multi-branch self-watermark detection model will use the confidence (score) of the detection results of the n branches as the decision criterion, select the branch with the maximum confidence (score) as the final detection result, and output the position coordinates, category, image name and confidence of the visible watermark detection frame. If all branches do not detect the visible watermark, the multi-branch watermark detection model will set the position of the visible watermark detection frame of the detected image to [0, 0, 0, 0], the confidence to 0 and the image name.
[0154] The third embodiment of the present application provides a watermark detection method as follows: Figure 8 Provide explanation.
[0155] like Figure 8 As shown, in step 801, a carrier object to be detected is obtained.
[0156] like Figure 8 As shown, in step 802, the watermark embedding strength information and size relationship information of the carrier object to be detected are obtained, and the size relationship information is used to represent the relationship between the size information of the watermark template and the size information of the carrier object. The watermark template is a template used when adding watermark information to the carrier object.
[0157] like Figure 8 As shown, in step 803, the watermark detection result for the carrier object to be detected is obtained according to the watermark embedding strength information and the size relationship information.
[0158] Corresponding to the method for generating a watermark detection model provided in the first embodiment of the present application, the fourth embodiment of the present application also provides a device for generating a watermark detection model.
[0159] like Fig. 9 As shown, the generating device of the watermark detection model includes:
[0160] The watermark data set obtaining unit 901 is used to obtain multiple watermark data sets; wherein the carrier objects in the same watermark data set have the same watermark embedding strength information and the same size relationship information, and the size relationship information is used to indicate the relationship between the size information of the watermark template and the size information of the carrier object, and the watermark template is a template used when adding watermark information to the carrier object;
[0161] The watermark detection branch generating unit 902 is used to generate a plurality of watermark detection branch modules according to the plurality of watermark data sets; each watermark detection branch module is used to obtain a preliminary watermark detection result for the carrier object based on the specified watermark embedding strength information and the specified size relationship information;
[0162] The watermark detection model generating unit 903 is used to generate a watermark detection model according to the multiple watermark detection branch modules; the watermark detection model is used to obtain a final watermark detection result for the carrier object according to the preliminary watermark detection results of the multiple watermark detection branch modules.
[0163] Optionally, the watermark data set obtaining unit is specifically used for:
[0164] Obtaining a carrier object set; wherein each carrier object in the same carrier object set has the same watermark embedding strength information and the same size relationship information; each carrier object in different carrier object sets has different watermark embedding strength information and different size relationship information;
[0165] Get label information of carrier object set;
[0166] A plurality of watermark data sets are generated according to the carrier object set and the label information.
[0167] Optionally, the device further comprises:
[0168] A label information storage unit, used to store the label information in a text file;
[0169] A text file conversion unit, used for converting the text file into a non-text file in a predetermined format;
[0170] The step of generating a plurality of watermark data sets according to the carrier object set and the label information includes:
[0171] A plurality of watermark data sets are generated according to the carrier object set and the non-text file.
[0172] Optionally, the tag information includes at least one of the following:
[0173] Category information of the watermark in the carrier object;
[0174] The location information where the watermark is embedded in the carrier object;
[0175] The name information of the watermark in the carrier object.
[0176] Optionally, the watermark detection branch generating unit is specifically used to:
[0177] Inputting the carrier object in the watermark data set into the convolution layer in the neural network model to extract the feature map of the carrier object;
[0178] Inputting the feature map of the carrier object into a candidate region network in a neural network model to generate a recommended region containing a watermark;
[0179] Inputting the feature map of the carrier object and the recommended region into a region of interest pooling layer in a neural network model to obtain a feature map of the recommended region;
[0180] Inputting the recommended region feature map into a classifier to obtain a test value of the category of the watermark in the carrier object;
[0181] A neural network model is trained according to the test value and the label information to generate a watermark detection branch module.
[0182] Optionally, the number of the watermark detection branches is equal to the number of the watermark data sets; one watermark data set is used to generate one watermark detection branch module.
[0183] It should be noted that for the detailed description of the watermark detection model generation device provided in the fourth embodiment of the present application, reference can be made to the relevant description of the first embodiment of the present application, which will not be repeated here.
[0184] Corresponding to the method for generating a watermark detection model provided in the first embodiment of the present application, the fifth embodiment of the present application also provides an electronic device.
[0185] like Fig.10 As shown, the electronic device includes:
[0186] Processor 1001;
[0187] The memory 1002 is used to store a program of a method for generating a watermark detection model. After the device is powered on and the processor runs the program of the method for generating a watermark detection model, the following steps are performed:
[0188] Obtaining multiple watermark data sets; wherein the carrier objects in the same watermark data set have the same watermark embedding strength information and the same size relationship information, the size relationship information is used to represent the relationship between the size information of the watermark template and the size information of the carrier object, the watermark template is a template used when adding watermark information to the carrier object;
[0189] Generate multiple watermark detection branch modules according to the multiple watermark data sets; each watermark detection branch module is used to obtain a preliminary watermark detection result for the carrier object based on the specified watermark embedding strength information and the specified size relationship information;
[0190] A watermark detection model is generated according to the multiple watermark detection branch modules; the watermark detection model is used to obtain a final watermark detection result for a carrier object according to the preliminary watermark detection results of the multiple watermark detection branch modules.
[0191] Optionally, obtaining the watermark data set includes:
[0192] Obtaining a carrier object set; wherein each carrier object in the same carrier object set has the same watermark embedding strength information and the same size relationship information; each carrier object in different carrier object sets has different watermark embedding strength information and different size relationship information;
[0193] Get label information of carrier object set;
[0194] A plurality of watermark data sets are generated according to the carrier object set and the label information.
[0195] Optionally, the electronic device further performs the following steps:
[0196] Saving the label information into a text file;
[0197] Converting the text file into a non-text file in a predetermined format;
[0198] The step of generating a plurality of watermark data sets according to the carrier object set and the label information includes:
[0199] A plurality of watermark data sets are generated according to the carrier object set and the non-text file.
[0200] Optionally, the tag information includes at least one of the following:
[0201] Category information of the watermark in the carrier object;
[0202] The location information where the watermark is embedded in the carrier object;
[0203] The name information of the watermark in the carrier object.
[0204] Optionally, generating multiple watermark detection branch modules according to the multiple watermark data sets includes:
[0205] Inputting the carrier object in the watermark data set into the convolution layer in the neural network model to extract the feature map of the carrier object;
[0206] Inputting the feature map of the carrier object into a candidate region network in a neural network model to generate a recommended region containing a watermark;
[0207] Inputting the feature map of the carrier object and the recommended region into a region of interest pooling layer in a neural network model to obtain a feature map of the recommended region;
[0208] Inputting the recommended region feature map into a classifier to obtain a test value of the category of the watermark in the carrier object;
[0209] A neural network model is trained according to the test value and the label information to generate a watermark detection branch module.
[0210] Optionally, the number of the watermark detection branches is equal to the number of the watermark data sets; one watermark data set is used to generate one watermark detection branch module.
[0211] It should be noted that the detailed description of the electronic device provided in the fifth embodiment of the present application can refer to the relevant description of the first embodiment of the present application, and will not be repeated here.
[0212] Corresponding to the method for generating a watermark detection model provided in the first embodiment of the present application, the sixth embodiment of the present application further provides a storage device storing a program of the method for generating a watermark detection model, the program being executed by a processor to perform the following steps:
[0213] Obtaining multiple watermark data sets; wherein the carrier objects in the same watermark data set have the same watermark embedding strength information and the same size relationship information, the size relationship information is used to represent the relationship between the size information of the watermark template and the size information of the carrier object, the watermark template is a template used when adding watermark information to the carrier object;
[0214] Generate multiple watermark detection branch modules according to the multiple watermark data sets; each watermark detection branch module is used to obtain a preliminary watermark detection result for the carrier object based on the specified watermark embedding strength information and the specified size relationship information;
[0215] A watermark detection model is generated according to the multiple watermark detection branch modules; the watermark detection model is used to obtain a final watermark detection result for a carrier object according to the preliminary watermark detection results of the multiple watermark detection branch modules.
[0216] It should be noted that for the detailed description of the storage device provided in the sixth embodiment of the present application, reference can be made to the relevant description of the first embodiment of the present application, which will not be repeated here.
[0217] Corresponding to the watermark detection method provided in the second embodiment of the present application, the seventh embodiment of the present application also provides a watermark detection device.
[0218] like Fig.11 As shown, the watermark detection device comprises:
[0219] The to-be-detected carrier object obtaining unit 1101 is used to obtain the to-be-detected carrier object;
[0220] The watermark detection result obtaining unit 1102 is used to input the carrier object to be detected into the watermark detection model to obtain the watermark detection result for the carrier object to be detected; the watermark detection model is used to obtain the watermark detection result for the carrier object to be detected based on the watermark embedding strength information and size relationship information of the carrier object to be detected.
[0221] Optionally, the watermark detection result obtaining unit includes:
[0222] A preliminary detection result obtaining subunit is used to input the carrier object to be detected into a watermark detection model to obtain a plurality of preliminary watermark detection results for the carrier object to be detected;
[0223] The final detection result obtaining subunit is used to obtain the final watermark detection result for the carrier object to be detected based on the multiple preliminary watermark detection results for the carrier object to be detected.
[0224] Optionally, the device further comprises: a confidence obtaining unit, configured to obtain the confidence of each preliminary watermark detection result;
[0225] The final detection result obtaining subunit is specifically used for:
[0226] According to the multiple preliminary watermark detection results and the confidence level of each preliminary watermark detection result, a final watermark detection result for the carrier object to be detected is determined.
[0227] Optionally, the final detection result obtaining subunit is specifically used for:
[0228] The preliminary watermark detection result with the highest confidence is taken as the final watermark detection result.
[0229] Optionally, the preliminary detection result obtaining subunit is specifically used for:
[0230] Inputting the carrier object to be detected into the convolution layer of the watermark detection model to extract the feature map of the carrier object to be detected;
[0231] Inputting the feature map of the carrier object to be detected into the candidate region network of the watermark detection model to generate a recommended region containing a visible watermark;
[0232] Inputting the feature map of the carrier object to be detected and the recommended area into the interest region pooling layer of the watermark detection model to obtain a feature map of the recommended area;
[0233] The recommended region feature map is input into a classifier to obtain preliminary results of watermark detection in the plurality of carrier objects to be detected.
[0234] Optionally, the preliminary watermark detection result includes at least one of the following information:
[0235] Category information of the watermark in the carrier object to be detected;
[0236] The location information of the watermark in the carrier object to be detected.
[0237] It should be noted that for the detailed description of the watermark detection device provided in the seventh embodiment of the present application, reference can be made to the relevant description of the second embodiment of the present application, which will not be repeated here.
[0238] Corresponding to the watermark detection method provided in the second embodiment of the present application, the eighth embodiment of the present application also provides an electronic device.
[0239] like Fig.12 As shown, the electronic device includes:
[0240] Processor 1201;
[0241] The memory 1202 is used to store the program of the watermark detection method. After the device is powered on and the program of the watermark detection method is run by the processor, the following steps are performed:
[0242] Obtaining a carrier object to be detected;
[0243] The carrier object to be detected is input into the watermark detection model to obtain the watermark detection result for the carrier object to be detected; the watermark detection model is used to obtain the watermark detection result for the carrier object to be detected based on the watermark embedding strength information and size relationship information of the carrier object to be detected.
[0244] Optionally, the step of inputting the carrier object to be detected into a watermark detection model to obtain a watermark detection result for the carrier object to be detected includes:
[0245] Inputting the carrier object to be detected into a watermark detection model to obtain a plurality of preliminary watermark detection results for the carrier object to be detected;
[0246] According to the multiple preliminary watermark detection results for the carrier object to be detected, a final watermark detection result for the carrier object to be detected is obtained.
[0247] Optionally, the electronic device further performs the following steps:
[0248] Obtaining the confidence level of each preliminary watermark detection result;
[0249] The step of obtaining a final watermark detection result for the carrier object to be detected according to the multiple preliminary watermark detection results for the carrier object to be detected comprises:
[0250] According to the multiple preliminary watermark detection results and the confidence level of each preliminary watermark detection result, a final watermark detection result for the carrier object to be detected is determined.
[0251] Optionally, determining the final watermark detection result for the carrier object to be detected according to the multiple preliminary watermark detection results and the confidence level of each preliminary watermark detection result includes:
[0252] The preliminary watermark detection result with the highest confidence is taken as the final watermark detection result.
[0253] Optionally, the carrier object to be detected is input into a watermark detection model to obtain a plurality of preliminary watermark detection results for the carrier object to be detected, including:
[0254] Inputting the carrier object to be detected into the convolution layer of the watermark detection model to extract the feature map of the carrier object to be detected;
[0255] Inputting the feature map of the carrier object to be detected into the candidate region network of the watermark detection model to generate a recommended region containing a visible watermark;
[0256] Inputting the feature map of the carrier object to be detected and the recommended area into the interest region pooling layer of the watermark detection model to obtain a feature map of the recommended area;
[0257] The recommended region feature map is input into a classifier to obtain preliminary results of watermark detection in the plurality of carrier objects to be detected.
[0258] Optionally, the preliminary watermark detection result includes at least one of the following information:
[0259] Category information of the watermark in the carrier object to be detected;
[0260] The location information of the watermark in the carrier object to be detected.
[0261] It should be noted that for the detailed description of the electronic device provided in the eighth embodiment of the present application, reference can be made to the relevant description of the second embodiment of the present application, which will not be repeated here.
[0262] Corresponding to the watermark detection method provided in the second embodiment of the present application, the ninth embodiment of the present application further provides a storage device storing a program of the watermark detection method, the program is executed by a processor to perform the following steps:
[0263] Obtaining a carrier object to be detected;
[0264] The carrier object to be detected is input into the watermark detection model to obtain the watermark detection result for the carrier object to be detected; the watermark detection model is used to obtain the watermark detection result for the carrier object to be detected based on the watermark embedding strength information and size relationship information of the carrier object to be detected.
[0265] It should be noted that for the detailed description of the storage device provided in the ninth embodiment of the present application, reference can be made to the relevant description of the second embodiment of the present application, which will not be repeated here.
[0266] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
[0267] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0268] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0269] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory media such as modulated data signals and carrier waves.
[0270] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
Claims
1. A method for generating a watermark detection model, characterized in that: include: Obtaining multiple watermark data sets; wherein the carrier objects in the same watermark data set have the same watermark embedding strength information and the same size relationship information, the size relationship information is used to represent the relationship between the size information of the watermark template and the size information of the carrier object, the watermark template is a template used when adding watermark information to the carrier object; Generate multiple watermark detection branch modules according to the multiple watermark data sets; each watermark detection branch module is used to obtain a preliminary watermark detection result for the carrier object based on the specified watermark embedding strength information and the specified size relationship information; Generate a watermark detection model according to the multiple watermark detection branch modules; the watermark detection model is used to obtain a final watermark detection result for a carrier object according to the preliminary watermark detection results of the multiple watermark detection branch modules; The step of generating multiple watermark detection branch modules according to the multiple watermark data sets includes: Inputting the carrier object in the watermark data set into the convolution layer in the neural network model to extract the feature map of the carrier object; Inputting the feature map of the carrier object into a candidate region network in a neural network model to generate a recommended region containing a watermark; Inputting the feature map of the carrier object and the recommended region into a region of interest pooling layer in a neural network model to obtain a feature map of the recommended region; Inputting the recommended region feature map into a classifier to obtain a test value of the category of the watermark in the carrier object; A neural network model is trained according to the test value and label information to generate a watermark detection branch module, wherein the label information includes at least one of the following: category information of the watermark in the carrier object; location information of the watermark embedded in the carrier object; name information of the watermark in the carrier object.
2. The method according to claim 1, characterized in that The obtaining of multiple watermark data sets includes: Obtaining a carrier object set; wherein each carrier object in the same carrier object set has the same watermark embedding strength information and the same size relationship information; each carrier object in different carrier object sets has different watermark embedding strength information and different size relationship information; Get label information of carrier object set; A plurality of watermark data sets are generated according to the carrier object set and the label information.
3. The method according to claim 2, characterized in that Also includes: Saving the label information into a text file; Converting the text file into a non-text file in a predetermined format; The step of generating a plurality of watermark data sets according to the carrier object set and the label information includes: A plurality of watermark data sets are generated according to the carrier object set and the non-text file.
4. The method according to claim 1, characterized in that: The number of the watermark detection branches is equal to the number of the watermark data sets; one watermark data set is used to generate one watermark detection branch module.
5. A watermark detection method, characterized in that: include: Obtaining a carrier object to be detected; Inputting the carrier object to be detected into a watermark detection model to obtain a watermark detection result for the carrier object to be detected; The watermark detection model is used to obtain a watermark detection result for the carrier object to be detected according to the watermark embedding strength information and size relationship information of the carrier object to be detected; The watermark detection model is generated based on a plurality of watermark detection branch modules; the generation of the watermark detection branch modules includes: Inputting the carrier object in the watermark data set into the convolution layer in the neural network model to extract the feature map of the carrier object; Inputting the feature map of the carrier object into a candidate region network in a neural network model to generate a recommended region containing a watermark; Inputting the feature map of the carrier object and the recommended region into a region of interest pooling layer in a neural network model to obtain a feature map of the recommended region; Inputting the recommended region feature map into a classifier to obtain a test value of the category of the watermark in the carrier object; A neural network model is trained according to the test value and label information to generate a watermark detection branch module, wherein the label information includes at least one of the following: category information of the watermark in the carrier object; location information of the watermark embedded in the carrier object; name information of the watermark in the carrier object.
6. The method according to claim 5, characterized in that The step of inputting the carrier object to be detected into a watermark detection model to obtain a watermark detection result for the carrier object to be detected includes: Inputting the carrier object to be detected into a watermark detection model to obtain a plurality of preliminary watermark detection results for the carrier object to be detected; According to the multiple preliminary watermark detection results for the carrier object to be detected, a final watermark detection result for the carrier object to be detected is obtained.
7. The method according to claim 6, characterized in that Also includes: Obtaining the confidence level of each preliminary watermark detection result; The step of obtaining a final watermark detection result for the carrier object to be detected according to the multiple preliminary watermark detection results for the carrier object to be detected comprises: According to the multiple preliminary watermark detection results and the confidence level of each preliminary watermark detection result, a final watermark detection result for the carrier object to be detected is determined.
8. The method according to claim 7, characterized in that The step of determining a final watermark detection result for the carrier object to be detected according to the plurality of preliminary watermark detection results and the confidence level of each preliminary watermark detection result comprises: The preliminary watermark detection result with the highest confidence is taken as the final watermark detection result.
9. The method according to claim 5, characterized in that The preliminary watermark detection result includes at least one of the following information: Category information of the watermark in the carrier object to be detected; The location information of the watermark in the carrier object to be detected.
10. A device for generating a watermark detection model, characterized in that: include: A watermark data set obtaining unit, used to obtain multiple watermark data sets; wherein the carrier objects in the same watermark data set have the same watermark embedding strength information and the same size relationship information, the size relationship information is used to indicate the relationship between the size information of the watermark template and the size information of the carrier object, the watermark template is a template used when adding watermark information to the carrier object; A watermark detection branch generating unit, configured to generate a plurality of watermark detection branch modules according to the plurality of watermark data sets; each watermark detection branch module is configured to obtain a preliminary watermark detection result for a carrier object based on specified watermark embedding strength information and specified size relationship information; A watermark detection model generating unit, configured to generate a watermark detection model according to the plurality of watermark detection branch modules; the watermark detection model is configured to obtain a final watermark detection result for a carrier object according to the preliminary watermark detection results of the plurality of watermark detection branch modules; The step of generating multiple watermark detection branch modules according to the multiple watermark data sets includes: Inputting the carrier object in the watermark data set into the convolution layer in the neural network model to extract the feature map of the carrier object; Inputting the feature map of the carrier object into a candidate region network in a neural network model to generate a recommended region containing a watermark; Inputting the feature map of the carrier object and the recommended region into a region of interest pooling layer in a neural network model to obtain a feature map of the recommended region; Inputting the recommended region feature map into a classifier to obtain a test value of the category of the watermark in the carrier object; A neural network model is trained according to the test value and label information to generate a watermark detection branch module, wherein the label information includes at least one of the following: category information of the watermark in the carrier object; location information of the watermark embedded in the carrier object; name information of the watermark in the carrier object.
11. An electronic device, characterized in that: include: processor; The memory is used to store a program of a method for generating a watermark detection model. After the device is powered on and the program of the method for generating a watermark detection model is run by the processor, the following steps are performed: Obtaining multiple watermark data sets; wherein the carrier objects in the same watermark data set have the same watermark embedding strength information and the same size relationship information, the size relationship information is used to represent the relationship between the size information of the watermark template and the size information of the carrier object, the watermark template is a template used when adding watermark information to the carrier object; Generate multiple watermark detection branch modules according to the multiple watermark data sets; each watermark detection branch module is used to obtain a preliminary watermark detection result for the carrier object based on the specified watermark embedding strength information and the specified size relationship information; Generate a watermark detection model according to the multiple watermark detection branch modules; the watermark detection model is used to obtain a final watermark detection result for a carrier object according to the preliminary watermark detection results of the multiple watermark detection branch modules; The step of generating multiple watermark detection branch modules according to the multiple watermark data sets includes: Inputting the carrier object in the watermark data set into the convolution layer in the neural network model to extract the feature map of the carrier object; Inputting the feature map of the carrier object into a candidate region network in a neural network model to generate a recommended region containing a watermark; Inputting the feature map of the carrier object and the recommended region into a region of interest pooling layer in a neural network model to obtain a feature map of the recommended region; Inputting the recommended region feature map into a classifier to obtain a test value of the category of the watermark in the carrier object; A neural network model is trained according to the test value and label information to generate a watermark detection branch module, wherein the label information includes at least one of the following: category information of the watermark in the carrier object; location information of the watermark embedded in the carrier object; name information of the watermark in the carrier object.
12. A storage device, characterized in that: A program storing a method for generating a watermark detection model is executed by a processor to perform the following steps: Obtaining multiple watermark data sets; wherein the carrier objects in the same watermark data set have the same watermark embedding strength information and the same size relationship information, the size relationship information is used to represent the relationship between the size information of the watermark template and the size information of the carrier object, the watermark template is a template used when adding watermark information to the carrier object; Generate multiple watermark detection branch modules according to the multiple watermark data sets; each watermark detection branch module is used to obtain a preliminary watermark detection result for the carrier object based on the specified watermark embedding strength information and the specified size relationship information; Generate a watermark detection model according to the multiple watermark detection branch modules; the watermark detection model is used to obtain a final watermark detection result for a carrier object according to the preliminary watermark detection results of the multiple watermark detection branch modules; The step of generating multiple watermark detection branch modules according to the multiple watermark data sets includes: Inputting the carrier object in the watermark data set into the convolution layer in the neural network model to extract the feature map of the carrier object; Inputting the feature map of the carrier object into a candidate region network in a neural network model to generate a recommended region containing a watermark; Inputting the feature map of the carrier object and the recommended region into a region of interest pooling layer in a neural network model to obtain a feature map of the recommended region; Inputting the recommended region feature map into a classifier to obtain a test value of the category of the watermark in the carrier object; A neural network model is trained according to the test value and label information to generate a watermark detection branch module, wherein the label information includes at least one of the following: category information of the watermark in the carrier object; location information of the watermark embedded in the carrier object; name information of the watermark in the carrier object.
13. A watermark detection device, characterized in that: include: A carrier object obtaining unit to be detected, used to obtain the carrier object to be detected; A watermark detection result obtaining unit is used to input the carrier object to be detected into a watermark detection model to obtain a watermark detection result for the carrier object to be detected; the watermark detection model is used to obtain a watermark detection result for the carrier object to be detected based on the watermark embedding strength information and size relationship information of the carrier object to be detected; The watermark detection model is generated based on a plurality of watermark detection branch modules; the generation of the watermark detection branch modules includes: Inputting the carrier object in the watermark data set into the convolution layer in the neural network model to extract the feature map of the carrier object; Inputting the feature map of the carrier object into a candidate region network in a neural network model to generate a recommended region containing a watermark; Inputting the feature map of the carrier object and the recommended region into a region of interest pooling layer in a neural network model to obtain a feature map of the recommended region; Inputting the recommended region feature map into a classifier to obtain a test value of the category of the watermark in the carrier object; A neural network model is trained according to the test value and label information to generate a watermark detection branch module, wherein the label information includes at least one of the following: category information of the watermark in the carrier object; location information of the watermark embedded in the carrier object; name information of the watermark in the carrier object.
14. An electronic device, characterized in that: include: processor; The memory is used to store a program of the watermark detection method. After the device is powered on and the program of the watermark detection method is run by the processor, the following steps are performed: Obtaining a carrier object to be detected; Input the carrier object to be detected into the watermark detection model to obtain the watermark detection result for the carrier object to be detected; the watermark detection model is used to obtain the watermark detection result for the carrier object to be detected according to the watermark embedding strength information and size relationship information of the carrier object to be detected; The watermark detection model is generated based on a plurality of watermark detection branch modules; the generation of the watermark detection branch modules includes: Inputting the carrier object in the watermark data set into the convolution layer in the neural network model to extract the feature map of the carrier object; Inputting the feature map of the carrier object into a candidate region network in a neural network model to generate a recommended region containing a watermark; Inputting the feature map of the carrier object and the recommended region into a region of interest pooling layer in a neural network model to obtain a feature map of the recommended region; Inputting the recommended region feature map into a classifier to obtain a test value of the category of the watermark in the carrier object; A neural network model is trained according to the test value and label information to generate a watermark detection branch module, wherein the label information includes at least one of the following: category information of the watermark in the carrier object; location information of the watermark embedded in the carrier object; name information of the watermark in the carrier object.
15. A storage device, characterized in that: A program storing a watermark detection method is executed by a processor to perform the following steps: Obtaining a carrier object to be detected; Input the carrier object to be detected into the watermark detection model to obtain the watermark detection result for the carrier object to be detected; the watermark detection model is used to obtain the watermark detection result for the carrier object to be detected according to the watermark embedding strength information and size relationship information of the carrier object to be detected; The watermark detection model is generated based on a plurality of watermark detection branch modules; the generation of the watermark detection branch modules includes: Inputting the carrier object in the watermark data set into the convolution layer in the neural network model to extract the feature map of the carrier object; Inputting the feature map of the carrier object into a candidate region network in a neural network model to generate a recommended region containing a watermark; Inputting the feature map of the carrier object and the recommended region into a region of interest pooling layer in a neural network model to obtain a feature map of the recommended region; Inputting the recommended region feature map into a classifier to obtain a test value of the category of the watermark in the carrier object; A neural network model is trained according to the test value and label information to generate a watermark detection branch module, wherein the label information includes at least one of the following: category information of the watermark in the carrier object; location information of the watermark embedded in the carrier object; name information of the watermark in the carrier object.
Citation Information
Patent Citations
Color image watermark embedding and detection method based on quaternion PHT synchronous correction
CN105590292A
Automatic image watermark detection method
CN107808358A
Watermark detection method, apparatus, computer device, and storage medium
CN109285105A