Image infringement detection method and device and electronic equipment
The target detection model is used to detect local areas and extract feature vectors of images, which solves the problems of high copyright library maintenance cost and high false detection rate in the existing technology, and achieves more accurate image infringement detection.
Patent Information
- Application Number
- CN202310190102.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-28
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2043-02-28
AI Technical Summary
The existing technology relies on a large amount of manpower to maintain the copyright database in image infringement detection, and it is difficult to accurately detect materials containing text information and blank areas, resulting in a high false detection rate.
The target detection model is used to detect local areas of the image, and infringement elements are automatically mined through feature vector extraction and self-supervised models, reducing copyright library maintenance costs and improving detection accuracy.
It effectively reduces the labor cost of building a copyright database, improves the accuracy of infringement detection, avoids similarity errors caused by comparison of the entire image, and is suitable for multi-element detection scenarios.
Smart Images

Figure CN118570496A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an image infringement detection method, device and electronic equipment. Background Art
[0002] At present, on most software platforms, some resources uploaded by users often have the risk of infringement. For example, when users upload teaching videos or courseware resources to educational software platforms, they may violate the rules by using some elements in the textbooks (including character images, animated images, etc.). In order to avoid violations, infringement detection is usually conducted, which is usually focused on visual characters, such as infringement detection for videos and picture elements uploaded by users, to prevent users from using infringing resources to cause losses to the platform. The detection idea is generally to compare the similarity of the infringing image to be detected with all images in the copyright library to determine whether it is an infringement.
[0003] In the process of implementing the embodiments of the present application, the applicant discovered that the relevant technology relies on scenes pre-constructed in the copyright library, and the copyright library requires a large amount of manpower to maintain. In addition, for materials containing a lot of text information and blank areas, it will be difficult to distinguish some images by using the features of the entire picture for comparison. The calculated similarity between images has a large error, and there is a problem of false detection as infringement. Summary of the invention
[0004] The main technical problem solved by the implementation method of this application is how to improve the accuracy of infringement detection while reducing the manpower cost of building a copyright library.
[0005] To solve the above technical problems, a technical solution adopted in the implementation mode of the present application is: providing an image infringement detection method, including: obtaining a target detection model, which is obtained by training based on a target data set, and the target data set includes multiple images combined with pictures and texts; obtaining an image to be detected and a material image; inputting the image to be detected and the material image into the target detection model, and outputting an image including multiple local areas; obtaining feature vectors corresponding to the image to be detected and the material image based on the images of the multiple local areas and a preset image feature representation model; and detecting whether the image to be detected infringes the material image based on the feature vector.
[0006] Optionally, acquiring the target detection model includes: constructing the target data set; determining a target detection algorithm and determining a loss function; training the target detection algorithm according to the loss function and the target data set to obtain the target detection model.
[0007] Optionally, constructing the target dataset includes: setting the size of a blank image; sampling multiple pictures based on image resources; placing the multiple pictures on the blank image, and constraining the multiple pictures not to overlap and not to exceed the entire size of the blank image; setting a text placement area based on the remaining area of the blank image where the multiple pictures are placed, and filling the text placement area with corresponding text information, wherein the multiple pictures and the filled text information constitute the text-image combined image; repeating the above steps to obtain multiple text-image combined images, and the multiple text-image combined images constitute the target dataset.
[0008] Optionally, determining the loss function includes: determining the intersection-over-union loss of image area detection and the intersection-over-union loss of text area detection based on the target data set; and determining the sum of the intersection-over-union loss of the image area detection and the intersection-over-union loss of the text area detection as the loss function.
[0009] Optionally, training the target detection algorithm according to the loss function and the target data set to obtain the target detection model includes: obtaining position information of the picture area in the picture-text combined image and position information of the text area according to the target data set; inputting the target data set into a preset target detection algorithm, and setting the detection target type of the target detection algorithm to the picture area; running the target detection algorithm to output a predicted picture area; obtaining a predicted picture area that minimizes the loss function according to the position information of the picture area, the position information of the text area, and the predicted picture area, wherein the target detection algorithm corresponding to the predicted picture area that minimizes the loss function is the target detection model.
[0010] Optionally, detecting whether the image to be detected infringes the material image based on the feature vector includes: calculating the cosine distance between the regional features of the image to be detected and the regional features of the material image based on the feature vector; and determining that there are infringing elements in the image to be detected when the cosine distance is greater than a threshold.
[0011] In order to solve the above technical problems, another technical solution adopted in the implementation mode of the present application is: to provide an image infringement detection device, including: a target detection model acquisition module, used to obtain a target detection model, the target detection model is obtained by training according to a target data set, and the target data set includes multiple images combined with pictures and texts; an image acquisition module, used to obtain an image to be detected and a material image; a local area detection module, used to input the image to be detected and the material image into the target detection model, and output an image including multiple local areas; a feature vector extraction module, used to obtain the feature vectors corresponding to the image to be detected and the material image according to the images of the multiple local areas and a preset image feature representation model; an infringement detection module, used to detect whether the image to be detected infringes the material image according to the feature vector.
[0012] To solve the above technical problems, another technical solution adopted in the implementation mode of the present application is: to provide an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the image infringement detection method as described above.
[0013] In order to solve the above technical problems, another technical solution adopted in the implementation mode of the present application is: providing a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by an electronic device, the electronic device executes the image infringement detection method as described above.
[0014] In order to solve the above technical problems, another technical solution adopted in the implementation mode of the present application is: to provide a computer program product, wherein the computer program product includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by an electronic device, the electronic device executes the image infringement detection method as described above.
[0015] Different from the related art, the image infringement detection method, device, electronic device, non-volatile computer-readable storage medium and computer program product provided in the embodiments of the present application perform local area detection on the image to be detected and the material image through a target detection model, obtain the feature vector of the local area, and finally detect whether the image to be detected is infringing according to the feature vector, wherein the target detection model is obtained by training based on a target data set, and the target data set includes multiple images combined with text. The implementation method of the present application can use a self-supervised model to automatically mine the target location where infringing elements may exist in the image to be detected, reducing the manpower cost of building a copyright library; in addition, it can handle the situation where multiple local areas in the image to be detected and multiple infringing elements in the material image are detected at the same time, thereby avoiding the similarity error caused by comparing the entire image to be detected with the entire material image, and improving the accuracy of infringement detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] One or more embodiments are exemplarily described by corresponding drawings, which do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and the figures in the drawings do not constitute proportional limitations unless otherwise stated.
[0017] Figure 1 It is a flowchart of an image infringement detection method provided in an embodiment of the present application;
[0018] Figure 2 is a flowchart of a method for constructing the target data set provided in an embodiment of the present application;
[0019] Figure 3 is a structural schematic diagram of an image infringement detection device provided in an embodiment of the present application;
[0020] Figure 4 Schematic diagram of the hardware structure of an electronic device 30 for executing an image infringement detection method provided in an embodiment of the present application. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0022] It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other, all within the scope of protection of the present application. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order than the module division in the device schematic diagram or the order in the flow chart.
[0023] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used in this specification includes any and all combinations of one or more of the related listed items.
[0024] The embodiment of the present application provides an image infringement detection method and device, which automatically mines the target locations of all possible infringing elements in copyrighted images and user-uploaded resources through iterative training of a self-supervised model, and optimizes the existing target detection loss function, adding the intersection of the detection box and the text area as a penalty term, constraining the target detection model to pay more attention to the image element part in the image combined with the text, and improving the detection recall rate of the image infringing elements in the image. It can also handle the situation where multiple elements in the image resource to be detected and a material image contains multiple infringing elements for simultaneous detection. In addition, it can also avoid the similarity error caused by comparing the entire image to be detected with the entire material infringing element image, thereby improving the accuracy of infringement detection.
[0025] The image infringement detection method and device of the embodiment of the present application can be applied to the detection of infringement elements that may exist in the teaching videos or courseware resources uploaded by users on the educational software platform. It can also be applied to the infringement detection of logo images. It can also be applied to the detection of infringement elements that may exist in the works of designers on the creative platform, etc.
[0026] In one or more embodiments of this specification, Figure 1 As shown in FIG. , a flowchart of an image infringement detection method is provided. Figure 1 As shown, the image infringement detection method may include the following steps:
[0027] Step 11: Build the target dataset.
[0028] The target data set is a data set including multiple images with text and pictures constructed by the present application. The image with text and pictures refers to an image including a picture and text, and the corresponding position information of the picture and the text in the image is known. Specifically, Figure 2 As shown, constructing the target data set includes:
[0029] Step 111, setting the size of the blank image.
[0030] The blank image is the carrier of the text-and-picture combined image, and pictures and texts are added to the blank image to form the text-and-picture combined image. The size of the blank image can be determined according to the application field to which the image to be detected belongs. For example, the image to be detected is a courseware resource. Considering that most educational elements are micro-class videos, teaching materials, and textbooks, it is possible to consider setting three aspect ratios, namely 1:1, 16:9, and 9:16. The size ratio and size of the blank image can be customized according to the size ratio of the specific detection element data.
[0031] Step 112: sampling multiple pictures based on the image resource.
[0032] After determining the size of the entire blank image, randomly sample n images from the image resources, where n is greater than 0 and less than or equal to N, and N is the maximum number of image elements in the image resources. The image resources are determined according to the application field to which the image to be detected belongs. For example, if the image to be detected is a courseware resource, the image resource is a teaching material image collected by the educational software platform, including pictures, videos, and mixed pictures of pictures and texts. Optionally, the corresponding image resources can be more specifically determined according to the specific category of the image to be detected. For example, if the image to be detected is an elementary school teaching material image, the range of the image resource can be locked to the image elements related to the elementary school teaching material. Thus, the target data set can be constructed more accurately, which can improve the detection accuracy of subsequent local area images.
[0033] Step 113: placing the multiple pictures on the blank image, and constraining the multiple pictures not to overlap and not to exceed the entire size of the blank image.
[0034] The sampled multiple pictures are placed on the blank image. In order to ensure that the multiple pictures do not overlap and do not exceed the entire size of the blank image when placed, the size of the entire blank image can be dynamically adjusted when placed. Among them, the size range of the blank image can be pre-set, and the size range includes the minimum size of the blank image (including the minimum width and the minimum length) and the maximum size of the blank image (including the maximum width and the maximum length). When placing the sampled multiple pictures, the size of the blank image can be adjusted within the size range according to the number and size of the sampled pictures, so that the placed pictures do not overlap and do not exceed the size range of the blank image.
[0035] After the sampled image is placed, the position information of the image on the blank image is recorded, for example, image1: {left, right, top, bottom}, left represents the straight-line distance from the left border of image1 to the left area of the blank image, right represents the straight-line distance from the right border of image1 to the right area of the blank image, top represents the straight-line distance from the upper border of image1 to the upper area of the blank image, and bottom represents the straight-line distance from the lower border of image1 to the lower area of the blank image. For another example, a coordinate system corresponding to the blank image is established, and the coordinate information of the four vertices of the area border of the image in the coordinate system is determined.
[0036] Step 114, setting a text placement area according to the remaining area of the blank image where the multiple pictures are placed, and filling the text placement area with corresponding text information, wherein the multiple pictures and the filled text information constitute the picture-text combined image.
[0037] After the above-mentioned multiple pictures are placed on the blank image, the size of the text placement area is set for the remaining blank area, and the corresponding text content is filled into the corresponding image area. At the same time, the position information of each text area is recorded, for example, text1: {left, right, top, bottom}, left represents the straight-line distance from the left border of text text1 to the left area of the blank image, right represents the straight-line distance from the right border of text text1 to the right area of the blank image, top represents the straight-line distance from the upper border of text text1 to the upper area of the blank image, and bottom represents the straight-line distance from the lower border of text text1 to the lower area of the blank image.
[0038] Among them, the corresponding text content can be filled into the corresponding image area through the PIL (Python Imaging Library) library. PIL is a commonly used library for processing images in Python. The detailed process of text filling based on PIL can refer to the relevant technology.
[0039] Through the above steps, a picture-text combined image can be obtained. In order to construct the target data set, a large number of picture-text combined images need to be obtained. Therefore, the above steps 111 to 114 can be repeated until the number of picture-text combined images obtained is greater than a threshold, and then the following step 115 is performed. The size of the threshold can be set according to the actual application situation.
[0040] Step 115: Combine the obtained multiple pictures and texts with the image to form the target data set. The obtained target data set can be used as a training data set for the following target detection model.
[0041] Step 12: Determine the target detection algorithm and the loss function.
[0042] The target detection algorithm can specifically be a YOLO target detection algorithm, or a target detection algorithm such as FastRCNN. The target detection algorithm is a task that combines classification and regression. The core problem it solves is what objects are located in what position in the image, that is, the positioning problem (where the target appears in the image or in what region), and the classification problem (what category does the target in a certain region in the image belong to). In the embodiment of the present application, the final target detection model is determined according to the target detection algorithm and the loss function. The target detection model is the target detection algorithm with determined parameters. The following training process is used to determine the parameters of the target detection algorithm, and the parameters can minimize the loss function.
[0043] In the embodiment of the present application, the IoU (Intersection over Union) loss function is used to guide the training of the target detection algorithm. IoU refers to the intersection over union ratio of the location area detected by the model and the actual target area to be detected. The embodiment of the present application optimizes the loss function based on the existing IoU, mainly by adding the intersection over union ratio of the detection box and the text area as a penalty term, constraining the target detection model to pay more attention to the image element part in the image combined with text, thereby improving the detection recall rate of image infringement elements in the image.
[0044] Specifically, the loss function is determined by: determining the intersection-over-union loss of image region detection and the intersection-over-union loss of text region detection according to the target data set; determining the sum of the intersection-over-union loss of the image region detection and the intersection-over-union loss of the text region detection as the loss function. The intersection-over-union loss of the image region detection can be expressed by the formula: loss_image=1-(Intersection(predict_bbox,groundtruth_bbox) / Union(predict_bbox,groundtruth_bbox)), Intersection(predict_bbox,groundtruth_bbox) refers to the intersection area size of the detection box and the actual image area, predict_bbox is the detection box, groundtruth_bbox is the box corresponding to the actual image area, and Union(predict_bbox,groundtruth_bbox) refers to the total area size of the detection box and the actual image area. The intersection-over-union loss of the text area detection can be expressed by the formula: loss_text=Intersection(predict_bbox, wrong_bbox) / Union(predict_bbox, wrong_bbox), where predict_bbox refers to the predicted detection box, wrong_bbox refers to the detection box with the largest intersection with the predicted detection box, Intersection(predict_bbox, wrong_bbox) refers to the intersection area of the predicted detection box and the actual text area, and Union(predict_bbox, wrong_bbox) refers to the total area of the predicted detection box and the actual text area.
[0045] The loss function L=loss_image+loss_text, the smaller the value of the loss function, the more ideal the target detection model.
[0046] Step 13: training the target detection algorithm according to the loss function and the target data set to obtain a target detection model.
[0047] Among them, the training of the target detection algorithm according to the loss function and the target data set to obtain the target detection model includes: obtaining the position information of the picture area in the picture-text combined image and the position information of the text area according to the target data set; inputting the target data set into a preset target detection algorithm, and setting the detection target type of the target detection algorithm to the picture area; running the target detection algorithm to output the predicted picture area; according to the position information of the picture area, the position information of the text area, and the predicted picture area, obtaining the predicted picture area that minimizes the loss function, wherein the target detection algorithm corresponding to the predicted picture area that minimizes the loss function is the target detection model.
[0048] The algorithm training process is to identify the predicted detection box corresponding to the image based on the known image area and text area, as well as the target detection algorithm, and use the loss function to guide whether the output result of the target detection algorithm is the optimal solution, so that the output result with the minimum value of the loss function is the optimal solution, thereby determining the relevant parameters of the target detection algorithm based on the optimal solution, and then determining the target detection model. The target detection model is used to identify images that need to be detected to see if there are infringements, and identify the corresponding image areas. Through the target detection algorithm, all target positions in the image that may be infringing elements can be automatically mined. In the following steps, the features of the mined target positions that may be infringing elements are further identified to determine whether the object at the target position is really an infringing element.
[0049] Step 14: Obtain the image to be detected and the material image.
[0050] Step 15, input the image to be detected and the material image into the target detection model, and output an image including multiple local areas.
[0051] Step 16: Obtain feature vectors corresponding to the image to be detected and the material image according to the images of the multiple local areas and a preset image feature representation model.
[0052] Step 17: Detect whether the image to be detected infringes upon the material image based on the feature vector.
[0053] The image to be detected and the material image are detected by the target detection model to obtain multiple local area images, and the sizes of these local area images are adjusted so that the format of the adjusted local area images conforms to the input format of the image feature representation model. According to the image feature representation model, several image feature vectors are obtained, and finally the cosine similarity of these image feature vectors is calculated one by one. If the cosine similarity is higher than a threshold value, the image is determined to be infringing, otherwise the image is not infringing.
[0054] For example, input the image A to be detected and the image set B_set of the textbook: {B1, B2, ..., Bx}, set different batch sizes according to the video memory resources of the machine, input all images into the target detection model in batches, and obtain the detection frame in image A and the corresponding detection frame in the image set B_set {a1, a2, ai, b1, b2, ..., bj}. Crop all the detection frame areas to obtain a total of (i+j) local area images, resize these images to (224*224) size at the same time, and input them into the pre-trained image feature representation model (such as ResNet50, VGG-16, etc.) in batches to obtain the corresponding ((i+j), d) matrix, where d is the feature dimension of the feature representation layer of the image feature representation model. Finally, calculate the cosine distance between the target area features in the image to be detected and the element features in other textbooks, and set a threshold T. If the cosine distance exceeds the threshold T, it means that there are potentially infringing elements in the image to be detected, and return the detection result.
[0055] The image infringement detection method provided in the embodiment of the present application utilizes two self-supervised model iterative trainings to automatically mine the target locations of all possible infringing elements in copyrighted images and user-uploaded resources. This method of self-supervised infringing element target detection can reduce the labor cost of building a copyright image library. In addition, the present application optimizes the existing target detection loss function, adds the intersection and union ratio of the detection box and the text area as a penalty term, constrains the target detection model to pay more attention to the image element part in the image combined with the text, and improves the detection recall rate of the image infringing elements in the image. Furthermore, the present application proposes an infringement detection method for local multi-target area comparison. One advantage is that it can handle the situation where multiple elements in the image resources to be detected and multiple infringing elements in a picture are detected at the same time. In addition, it can also avoid the similarity error caused by comparing the entire image to be detected with the entire infringing element image, thereby improving the accuracy of infringement detection.
[0056] like Figure 3 As shown, an embodiment of the present application provides an image infringement detection device, which includes: a target detection model acquisition module 21, an image acquisition module 22, a local area detection module 23, a feature vector extraction module 24 and an infringement detection module 25.
[0057] The target detection model acquisition module 21 is used to acquire a target detection model, wherein the target detection model is obtained by training according to a target data set, wherein the target data set includes a plurality of images combined with text and pictures;
[0058] An image acquisition module 22, used to acquire the image to be detected and the material image;
[0059] A local area detection module 23, used for inputting the image to be detected and the material image into the target detection model, and outputting an image including a plurality of local areas;
[0060] A feature vector extraction module 24, used to obtain feature vectors corresponding to the image to be detected and the material image according to the images of the multiple local areas and a preset image feature representation model;
[0061] The infringement detection module 25 is used to detect whether the image to be detected infringes the material image according to the feature vector.
[0062] It should be noted that the above-mentioned image infringement detection device can execute the image infringement detection method provided in the embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method. For technical details not fully described in the embodiment of the image infringement detection device, please refer to the image infringement detection method provided in the embodiment of the present application.
[0063] like Figure 4 As shown, Figure 4 is a schematic diagram of the hardware structure of an electronic device 30 for executing an image infringement detection method provided in an embodiment of the present application, such as Figure 4 As shown, the electronic device 30 includes:
[0064] One or more processors 31 and memory 32, Figure 4 A processor 31 is taken as an example.
[0065] The processor 31 and the memory 32 may be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.
[0066] The memory 32 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as the program instructions / modules corresponding to the image infringement detection method in the embodiment of the present application (for example, the attached Figure 3 The processor 31 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 32, that is, the image infringement detection method of the above method embodiment is implemented.
[0067] The memory 32 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required by a function; the data storage area may store data created according to the use of the image infringement detection device, etc. In addition, the memory 32 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 32 may optionally include a memory remotely arranged relative to the processor 31, and these remote memories may be connected to the image infringement detection device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0068] The one or more modules are stored in the memory 32, and when executed by the one or more processors 31, perform the image infringement detection method in any of the above method embodiments, for example, perform the above described Figure 1 , Figure 2 Method steps and implementation Figure 3 The functions of the modules in .
[0069] The above-mentioned product can execute the method provided in the embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method provided in the embodiment of the present application.
[0070] The electronic devices of the embodiments of the present application exist in various forms, including but not limited to: Personal computer devices: This type of device belongs to the category of personal computers, has computing and processing functions, and generally also has mobile Internet features. Server: A device that provides computing services. The server consists of a processor, hard disk, memory, system bus, etc. The server is similar to a general computer architecture, but because it needs to provide highly reliable services, it has higher requirements in terms of processing power, stability, reliability, security, scalability, manageability, etc. And other electronic devices with data interaction functions.
[0071] The embodiment of the present application provides a non-volatile computer-readable storage medium, wherein the non-volatile computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by one or more processors, such as Figure 4 A processor 31 in the embodiment may enable the one or more processors to execute the image infringement detection method in any of the above method embodiments, for example, executing the above described Figure 1 , Figure 2 Method steps and implementation Figure 3 The functions of the modules in .
[0072] The present application provides a computer program product, wherein the computer program product includes a computer program stored on a non-volatile computer-readable storage medium, wherein the computer program includes program instructions, and when the program instructions are executed by the electronic device, the electronic device is enabled to execute the image infringement detection method in any of the above method embodiments, for example, executing the above described Figure 1 , Figure 2 Method steps and implementation Figure 3 The functions of the modules in .
[0073] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0074] Through the description of the above implementation methods, ordinary technicians in this field can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Ordinary technicians in this field can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.
[0075] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes in different aspects of the present application as described above, which are not provided in detail for the sake of simplicity. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for detecting image infringement, characterized in that: include: Obtaining a target detection model, wherein the target detection model is obtained by training according to a target data set, wherein the target data set includes a plurality of images combined with text and pictures; Acquire the image to be detected and the material image; Inputting the image to be detected and the material image into the target detection model, and outputting an image including a plurality of local areas; Obtaining feature vectors corresponding to the image to be detected and the material image according to the images of the multiple local areas and a preset image feature representation model; The image to be detected is detected according to the feature vector to determine whether it infringes upon the material image.
2. The image infringement detection method according to claim 1, characterized in that: The acquiring of the target detection model comprises: Constructing the target data set; Determine the target detection algorithm and determine the loss function; The target detection algorithm is trained according to the loss function and the target data set to obtain the target detection model.
3. The image infringement detection method according to claim 2, characterized in that: The constructing the target data set comprises: Set the size of the blank image; Sample multiple images based on image resources; Placing the multiple pictures on the blank image, and constraining the multiple pictures not to overlap and not to exceed the entire size of the blank image; According to the remaining area of the blank image where the multiple pictures are placed, a text placement area is set, and corresponding text information is filled in the text placement area, wherein the multiple pictures and the filled text information constitute the picture-text combined image; Repeat the above steps to obtain a plurality of the image-text combined images, and the plurality of image-text combined images constitute the target data set.
4. The image infringement detection method according to claim 3, characterized in that: Determining the loss function includes: According to the target data set, determining an intersection-over-union loss for image region detection and an intersection-over-union loss for text region detection; The sum of the intersection-over-union loss of the image region detection and the intersection-over-union loss of the text region detection is determined as the loss function.
5. The image infringement detection method according to claim 4, characterized in that: The step of training the target detection algorithm according to the loss function and the target data set to obtain the target detection model includes: Acquire location information of a picture area and location information of a text area in the picture-text combined image according to the target data set; Inputting the target data set into a preset target detection algorithm, and setting the detection target type of the target detection algorithm to a picture area; Running the target detection algorithm and outputting the predicted image area; According to the position information of the image area, the position information of the text area, and the predicted image area, the predicted image area that minimizes the loss function is obtained, wherein the target detection algorithm corresponding to the predicted image area that minimizes the loss function is the target detection model.
6. The image infringement detection method according to any one of claims 1 to 5, characterized in that: The detecting, according to the feature vector, whether the image to be detected infringes upon the material image comprises: Calculating the cosine distance between the regional feature of the image to be detected and the regional feature of the material image according to the feature vector; When the cosine distance is greater than a threshold, it is determined that there are infringing elements in the image to be detected.
7. An image infringement detection device, characterized in that: include: A target detection model acquisition module is used to acquire a target detection model, wherein the target detection model is obtained by training a target data set, wherein the target data set includes a plurality of images combined with text and pictures; An image acquisition module, used to acquire the image to be detected and the material image; A local area detection module, used for inputting the image to be detected and the material image into the target detection model, and outputting an image including a plurality of local areas; A feature vector extraction module, used for obtaining feature vectors corresponding to the image to be detected and the material image according to the images of the multiple local areas and a preset image feature representation model; The infringement detection module is used to detect whether the image to be detected infringes the material image according to the feature vector.
8. An electronic device, characterized in that: include: at least one processor; and a memory communicatively coupled to the at least one processor; The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the image infringement detection method described in any one of claims 1 to 6.
9. A non-volatile computer-readable storage medium, characterized in that: The non-volatile computer-readable storage medium stores computer-executable instructions. When the computer-executable instructions are executed by an electronic device, the electronic device executes the image infringement detection method according to any one of claims 1 to 6.
10. A computer program product, characterized in that The computer program product includes a computer program stored on a non-volatile computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by an electronic device, the electronic device executes the image infringement detection method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Model training method, data processing method, devices, equipment and storage medium
CN111798542A
Document layout analysis method and system based on multi-scale training and cascade detection
CN113420669A
Block chain-based infringement detection method and device, and electronic equipment
CN113763211A
Commodity infringement detection method and device, equipment, medium and product
CN115620019A
Cited By
Information processing apparatus and control method thereof
EP4793801A1
