Image detection method, system, device, medium and program product
Through the image classification model and image quality improvement model based on the ResNet model, the problem of artificial embedded content in the image affecting visual effects and causing legal business problems is solved, and efficient image screening and visual quality improvement are achieved.
Patent Information
- Application Number
- CN202411670755.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-04
AI Technical Summary
In the prior art, images with artificial embedded content may not only affect the visual effect of images, but may also cause a series of legal and commercial problems.
Through the image text classification model, real-life picture classification model and stitching map classification model trained based on the ResNet model, images with unmanned text, non-real-life picture and non-stitching map were obtained, and super-resolution reconstruction was carried out through image quality improvement model.
It realizes effective screening of unmanned text, non-real scene pictures and non-stitching pictures in the image, improves the visual quality and competitiveness of the image, and reduces potential commercial infringement risks and company losses.
Smart Images

Figure CN119559474A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image processing technology, and in particular to an image detection method, system, device, medium and program product. Background Art
[0002] In today's highly digital environment, images have become an important carrier in the fields of advertising, marketing, social media and e-commerce. However, with the increasing application of images, images often contain artificially added (embedded) content such as advertising logos, third-party watermarks and other copyright information. These images with artificially embedded content may not only affect the visual effect of the image, but also cause a series of legal and commercial issues.
[0003] In addition, high-quality images are equally important in business, media and other applications. Whether it is displaying products on e-commerce platforms, advertising design, or content dissemination in digital media, high-resolution, high-quality images can significantly enhance user experience and brand value. Low-resolution images may cause blurred product details and distorted colors, thereby weakening users' interest and trust in the product. Summary of the invention
[0004] The technical problem to be solved by the present disclosure is to overcome the defects in the prior art that images with artificial embedded content may not only affect the visual effects of the images, but also may cause a series of legal and commercial problems, and to provide an image detection method, system, device, medium and program product.
[0005] The present invention solves the above technical problems through the following technical solutions:
[0006] The present disclosure provides an image detection method, the image detection method comprising:
[0007] Inputting the image to be detected into the image text classification model for screening to obtain a first image without artificially added text in the image to be detected;
[0008] The image text classification model is trained based on the ResNet (Residual Neural Network) model.
[0009] Optionally, the classification types of the image text classification model include a text-free image type, a text type with objects in the image, a watermark text type, and an artificial PS text type;
[0010] The first image is an image whose classification type among the images to be detected is determined to be the image without text and the image object with text.
[0011] Optionally, the image detection method further includes:
[0012] Inputting the first image into a real scene classification model for screening to obtain a second image of a non-real scene classification type;
[0013] Among them, the real scene image classification model is obtained based on ResNet model training; the training samples and labels of the real scene image classification model are different from the training samples and labels of the image text classification model.
[0014] Optionally, the image detection method further includes:
[0015] Inputting the second image into a mosaic classification model for screening to obtain a third image of a non-mosaic classification type;
[0016] Taking one of the first image, the second image and the third image as a target image that meets the visual quality requirement;
[0017] Among them, the spliced image classification model is obtained based on ResNet model training; the training samples and labels of the spliced image classification model are different from the training samples and labels of the real scene image classification model and the image text classification model.
[0018] Optionally, the image detection method further includes:
[0019] Inputting the target image into an image quality improvement model to obtain a reconstructed image after super-resolution reconstruction;
[0020] The image quality improvement model is trained based on the Real-ESRGAN (Real-Enhanced Super-Resolution GAN) model.
[0021] Optionally, the ResNet model adopts a ResNet34 model.
[0022] The present disclosure also provides an image detection system, the image detection system comprising: an image text classification module;
[0023] The image text classification module is used to input the image to be detected into the image text classification model for screening to obtain a first image without artificially added text in the image to be detected;
[0024] Among them, the image text classification model is obtained based on ResNet model training.
[0025] Optionally, the classification types of the image text classification model include a text-free image type, a text type with objects in the image, a watermark text type, and an artificial PS text type;
[0026] The first image is an image whose classification type among the images to be detected is determined to be the image without text and the image object with text.
[0027] Optionally, the image detection system further comprises: a real scene image classification module;
[0028] The real scene image classification module is used to input the first image into the real scene image classification model for screening to obtain a second image of a non-real scene image classification type;
[0029] Among them, the real scene image classification model is obtained based on ResNet model training; the training samples and labels of the real scene image classification model are different from the training samples and labels of the image text classification model.
[0030] Optionally, the image detection system further comprises: a mosaic image classification module;
[0031] The mosaic classification module is used for inputting the second image into the mosaic classification model for screening to obtain a third image of a non-mosaic classification type;
[0032] Taking one of the first image, the second image and the third image as a target image that meets the visual quality requirement;
[0033] Among them, the spliced image classification model is obtained based on ResNet model training; the training samples and labels of the spliced image classification model are different from the training samples and labels of the real scene image classification model and the image text classification model.
[0034] Optionally, the image detection system further comprises: a resolution reconstruction module;
[0035] The resolution reconstruction module is used to input the target image into the image quality improvement model to obtain a reconstructed image after super-resolution reconstruction;
[0036] The image quality improvement model is trained based on the Real-ESRGAN model.
[0037] Optionally, the ResNet model adopts a ResNet34 model.
[0038] The present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and used to run on the processor, and the processor implements the aforementioned image detection method when executing the computer program.
[0039] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the aforementioned image detection method when executed by a processor.
[0040] The present disclosure also provides a computer program product, including a computer program, which implements the aforementioned image detection method when executed by a processor.
[0041] On the basis of being in accordance with the common sense in the art, the above-mentioned preferred conditions can be arbitrarily combined to obtain the preferred embodiments of the present disclosure.
[0042] The positive progress effect of the present disclosure is that: based on the image text classification model, the real scene classification model and the spliced image classification model independently trained by the ResNet model, by connecting these three classification models in series, the first image without artificially added text in the image to be detected, the second image of the non-real scene classification type and the third image of the non-spliced image classification type can be screened in turn, and the third image finally obtained can simultaneously meet the visual effect requirements of no artificially added text, non-real scene and non-spliced image, screen out unattractive and low-value images, and avoid images with potential commercial infringement risks, thereby reducing the company's potential losses; at the same time, the image quality improvement model can reconstruct super-resolution images, greatly improving the visual quality and competitiveness of the image, so as to maximize the image benefits. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A flowchart of an image detection method provided in Embodiment 1 of the present disclosure;
[0044] Figure 2 A flowchart of a specific implementation of an image detection method provided in Example 1 of the present disclosure;
[0045] Figure 3 A flowchart of another specific implementation of an image detection method provided in Example 1 of the present disclosure;
[0046] Figure 4 A flowchart of another specific implementation of an image detection method provided in Example 1 of the present disclosure;
[0047] Figure 5 A schematic diagram of a module of an image detection system provided in Embodiment 2 of the present disclosure;
[0048] Figure 6 A schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present disclosure. DETAILED DESCRIPTION
[0049] The present disclosure is further described below by way of examples, but the present disclosure is not limited to the scope of the examples.
[0050] Prefixes such as "first" and "second" are used in the embodiments of the present disclosure only to distinguish different description objects, and have no limiting effect on the position, order, priority, quantity or content of the described objects. The use of prefixes such as ordinal numbers to distinguish description objects in the embodiments of the present disclosure does not constitute a limitation on the described objects. For the statement of the described objects, please refer to the description in the context of the claims or embodiments, and no unnecessary limitation should be constituted due to the use of such prefixes. In addition, in the description of the present embodiment, unless otherwise specified, the meaning of "plurality" is two or more.
[0051] Example 1
[0052] Figure 1 A flowchart of an image detection method provided by an exemplary embodiment of the present disclosure, the image detection method comprising:
[0053] S11, inputting the image to be detected into an image text classification model for screening to obtain a first image without artificially added text in the image to be detected.
[0054] Among them, the image text classification model is trained based on the ResNet model.
[0055] Among them, images with artificially added text have the worst visual effects, the lowest image value, and the highest legal and commercial risks, and are the target objects that need to be screened and de-adjusted urgently. The first image can be used as the target image that meets the visual quality requirements.
[0056] The ResNet model is a milestone in the field of deep learning classification. The introduction of residual connections in the ResNet model successfully solved the common gradient vanishing and gradient exploding problems in deep neural networks. This breakthrough not only improved the convergence of the model, but also significantly improved the classification accuracy.
[0057] In this embodiment, the image text classification model, the real scene classification model and the spliced image classification model are independently trained based on the ResNet model. By connecting these three classification models in series, a first image without artificially added text in the image to be detected, a second image of the non-real scene classification type and a third image of the non-spliced image classification type can be screened in turn. The third image finally obtained can simultaneously meet the visual effect requirements of no artificially added text, non-real scene and non-spliced image, screen out unattractive and low-value images, and avoid images with potential commercial infringement risks, thereby reducing the company's potential losses; at the same time, the image quality improvement model can reconstruct super-resolution images, greatly improving the visual quality and competitiveness of the image, so as to maximize the image revenue.
[0058] In one embodiment, the classification types of the image text classification model include a text-free image type, a text type with objects in the image, a watermark text type, and an artificial PS text type.
[0059] The first image is an image whose classification type among the images to be detected is determined to be an image without text and an image of the type where the object in the image has text.
[0060] Among them, the image text classification model can filter out images with watermarks and artificially added text that may contain advertising information.
[0061] In one embodiment, referring to Figure 2 , the image detection method further includes:
[0062] S12: Input the first image into a real scene classification model for screening to obtain a second image of a non-real scene classification type.
[0063] The real-life image classification model is trained based on the ResNet model. The training samples and labels of the real-life image classification model are different from those of the image text classification model.
[0064] Among them, the real-life image classification model and the image text classification model are trained independently based on the ResNet model.
[0065] The first image or the second image may be used as a target image that meets the visual quality requirement.
[0066] The real-life picture classification model can filter out non-realistic pictures with lower value.
[0067] In one embodiment, referring to Figure 3 , the image detection method further includes:
[0068] S13: Input the second image into the mosaic classification model for screening to obtain a third image of a non-mosaic classification type.
[0069] S14. Use one of the first image, the second image, and the third image as a target image that meets visual quality requirements.
[0070] The spliced image classification model is trained based on the ResNet model. The training samples and labels of the spliced image classification model are different from those of the real scene classification model and the image text classification model.
[0071] Among them, the spliced image classification model, real scene image classification model and image text classification model are all trained independently based on the ResNet model.
[0072] The mosaic classification model can filter out mosaics of lower value or those that do not meet the design standards.
[0073] According to actual conditions, one of the first image, the second image and the third image may be used as a target image that meets the visual quality requirements.
[0074] It is understandable that parts of the image text classification model, the real scene classification model and the mosaic classification model can be selected according to actual conditions, and the series order between the classification modules can be adjusted to achieve the desired image screening effect.
[0075] In one embodiment, the ResNet model adopts the ResNet34 model.
[0076] Among them, the ResNet34 model uses the residual structure in deep learning to extract deep features of images by stacking 34 layers of convolutional networks. Compared with deeper ResNet variants, ResNet34 can perform reasoning faster without significantly sacrificing accuracy due to its lower computational complexity. Such performance advantages make ResNet34 particularly suitable for real-time or near-real-time image processing tasks.
[0077] In one embodiment, referring to Figure 4 , the image detection method further includes:
[0078] S15. Input the target image into the image quality improvement model to obtain a reconstructed image after super-resolution reconstruction.
[0079] Among them, the image quality improvement model is trained based on the Real-ESRGAN model.
[0080] Whether it is displaying products on e-commerce platforms, advertising design, or content dissemination in digital media, high-resolution, high-quality images can significantly enhance user experience and brand value. Low-resolution images may cause blurred product details and distorted colors, thereby weakening users' interest and trust in the product.
[0081] By improving the clarity and visual quality of images, the platform can more effectively showcase product features, enhance brand image, and ultimately increase market competitiveness and commercial profits.
[0082] In the field of image super-resolution reconstruction, traditional image super-resolution methods usually rely on manually designed features and interpolation techniques, which make it difficult to achieve high-quality image restoration in complex scenes and difficult to restore high-frequency details, resulting in blurred and unnatural reconstructed images. Compared with traditional methods, the Real-ESRGAN model significantly improves the image detail restoration capability based on the super-resolution algorithm of convolutional neural network (CNN) and generative adversarial network (GAN). By simulating the image generation process, it can generate clearer, more detailed and natural high-resolution images, which can not only significantly improve the image resolution, but also better preserve the image details and natural texture, improving the quality and stability of image generation.
[0083] Specifically, the Real-ESRGAN model introduces a high-order data degradation process, which is modeled by splicing multiple typical degradation processes to generate low-quality images that are closer to reality, and finally adopts a second-order degradation process to strike a balance between simplicity and effectiveness. This improvement is crucial to improving model performance. Secondly, the Real-ESRGAN model replaces the original VGG discriminator with a more powerful U-Net to enhance the ability to identify complex training outputs. The Real-ESRGAN model also introduces spectral normalization to stabilize the training instability caused by complex data sets and U-Net discriminators. This measure effectively improves the stability of the training process.
[0084] Example 2
[0085] Corresponding to the aforementioned image detection method embodiment, the present disclosure also provides an embodiment of an image detection system.
[0086] Figure 5 A module schematic diagram of an image detection system provided for an exemplary embodiment of the present disclosure, the system comprising: an image text classification module 1.
[0087] The image text classification module 1 is used to input the image to be detected into the image text classification model for screening to obtain a first image without artificially added text in the image to be detected.
[0088] Among them, the image text classification model is trained based on the ResNet model.
[0089] In this embodiment, the image text classification model, the real scene classification model and the spliced image classification model are independently trained based on the ResNet model. By connecting these three classification models in series, a first image without artificially added text in the image to be detected, a second image of the non-real scene classification type and a third image of the non-spliced image classification type can be screened in turn. The third image finally obtained can simultaneously meet the visual effect requirements of no artificially added text, non-real scene and non-spliced image, screen out unattractive and low-value images, and avoid images with potential commercial infringement risks, thereby reducing the company's potential losses; at the same time, the image quality improvement model can reconstruct super-resolution images, greatly improving the visual quality and competitiveness of the image, so as to maximize the image revenue.
[0090] In one embodiment, the classification types of the image text classification model include a text-free image type, a text type with objects in the image, a watermark text type, and an artificial PS text type.
[0091] The first image is an image whose classification type among the images to be detected is determined to be an image without text and an image of the type where the object in the image has text.
[0092] In one embodiment, the image detection system further includes: a real scene image classification module 2.
[0093] The real scene image classification module 2 is used to input the first image into the real scene image classification model for screening to obtain a second image of a non-real scene image classification type.
[0094] The real-life image classification model is trained based on the ResNet model. The training samples and labels of the real-life image classification model are different from those of the image text classification model.
[0095] In one embodiment, the image detection system further includes: a splicing image classification module 3.
[0096] The mosaic classification module 3 is used to input the second image into the mosaic classification model for screening to obtain a third image of a non-mosaic classification type.
[0097] One of the first image, the second image and the third image is used as a target image that meets the visual quality requirement.
[0098] The spliced image classification model is trained based on the ResNet model. The training samples and labels of the spliced image classification model are different from those of the real scene classification model and the image text classification model.
[0099] In one embodiment, the image detection system further includes: a resolution reconstruction module 4 .
[0100] The resolution reconstruction module 4 is used to input the target image into the image quality improvement model to obtain a reconstructed image after super-resolution reconstruction.
[0101] Among them, the image quality improvement model is trained based on the Real-ESRGAN model.
[0102] In one embodiment, the ResNet model adopts the ResNet34 model.
[0103] As for the system embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The system embodiment described above is only illustrative, wherein the units described as separate components may or may not be physically separated, and the components as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the disclosed solution.
[0104] Example 3
[0105] Figure 6 This is a structural schematic diagram of an electronic device shown in an example embodiment of the present disclosure, the electronic device includes a memory, a processor, and a computer program stored in the memory and used to run on the processor, and the processor implements the image detection method described in any of the above embodiments when executing the computer program. Figure 6 The electronic device 90 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0106] like Figure 6 As shown, the electronic device 90 may be in the form of a general-purpose computing device, for example, it may be a server device. The components of the electronic device 90 may include, but are not limited to: at least one processor 91, at least one memory 92, and a bus 93 connecting different system components (including the memory 92 and the processor 91).
[0107] The bus 93 includes a data bus, an address bus, and a control bus.
[0108] The memory 92 may include a volatile memory, such as a random access memory (RAM) 921 and / or a cache memory 922 , and may further include a read only memory (ROM) 923 .
[0109] The memory 92 may also include a program tool 925 (or utility) having a set (at least one) of program modules 924, such program modules 924 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0110] The processor 91 executes various functional applications and data processing by running the computer program stored in the memory 92, such as the image detection method provided in any of the above embodiments.
[0111] The electronic device 90 may also communicate with one or more external devices 94 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 95. Furthermore, the electronic device 90 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 96. As shown, the network adapter 96 communicates with other modules of the electronic device 90 via a bus 93. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 90, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
[0112] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.
[0113] Example 4
[0114] The embodiments of the present disclosure further provide a computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the image detection method provided by any of the above embodiments is implemented.
[0115] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.
[0116] Example 5
[0117] The present disclosure also provides a computer program product, including a computer program, which implements any of the above-mentioned image detection methods when executed by a processor.
[0118] Among them, the program code for executing the computer program product of the present disclosure can be written in any combination of one or more programming languages, and the program code can be executed completely on the user device, partially on the user device, as an independent software package, partially on the user device and partially on a remote device, or completely on the remote device.
[0119] Although the specific embodiments of the present disclosure are described above, those skilled in the art should understand that this is only an example, and the protection scope of the present disclosure is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present disclosure, but these changes and modifications all fall within the protection scope of the present disclosure.
Claims
1. An image detection method, characterized in that: The image detection method comprises: Inputting the image to be detected into the image text classification model for screening to obtain a first image without artificially added text in the image to be detected; Among them, the image text classification model is obtained based on ResNet model training.
2. The image detection method according to claim 1, characterized in that: The classification types of the image text classification model include image types without text, types with texts in the objects in the image, types with watermark texts, and types with artificial PS texts; The first image is an image whose classification type among the images to be detected is determined to be the image without text and the image object with text.
3. The image detection method according to claim 1, characterized in that: The image detection method further comprises: Inputting the first image into a real scene classification model for screening to obtain a second image of a non-real scene classification type; Among them, the real scene image classification model is obtained based on ResNet model training; the training samples and labels of the real scene image classification model are different from the training samples and labels of the image text classification model.
4. The image detection method according to claim 3, characterized in that: The image detection method further comprises: Inputting the second image into a mosaic classification model for screening to obtain a third image of a non-mosaic classification type; Taking one of the first image, the second image and the third image as a target image that meets the visual quality requirement; Among them, the spliced image classification model is obtained based on ResNet model training; the training samples and labels of the spliced image classification model are different from the training samples and labels of the real scene image classification model and the image text classification model.
5. The image detection method according to claim 4, characterized in that: The image detection method further comprises: Inputting the target image into an image quality improvement model to obtain a reconstructed image after super-resolution reconstruction; The image quality improvement model is trained based on the Real-ESRGAN model.
6. The image detection method according to claim 4, characterized in that: The ResNet model adopts the ResNet34 model.
7. An image detection system, characterized in that: The image detection system comprises: an image text classification module; The image text classification module is used to input the image to be detected into the image text classification model for screening to obtain a first image without artificially added text in the image to be detected; Among them, the image text classification model is obtained based on ResNet model training.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and used to run on the processor, characterized in that: When the processor executes the computer program, the image detection method according to any one of claims 1 to 6 is implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the image detection method according to any one of claims 1 to 6 is implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the image detection method according to any one of claims 1 to 6 is implemented.