Non-copywriting image detection method and device, electronic equipment and storage medium

By performing text detection and object position determination on the image to be detected, we can determine whether the text in the image coincides with the object, which solves the problem of low accuracy of manual review of uncopy images, and achieves efficient and accurate image detection.

CN120219773APending Publication Date: 2025-06-27BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510364700.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-26
Publication Date
2025-06-27

AI Technical Summary

Technical Problem

In the prior art, manual review of whether image creatives contain subjectivity and inconsistent standards for copywriting, resulting in low accuracy in determining uncopy-free images.

Method used

By performing text detection on the image to be detected, the positions of all texts in the image are determined, and the first positions of each object in the image are determined based on the object label and the semantic label, and whether the text coincides with the position of any object. If all texts are invalid text, the image is determined to be a copy-free image.

Benefits of technology

The accuracy of determining uncopy-free images is improved, the subjectivity and inconsistent standards of manual review are reduced, and objective and efficient image detection is achieved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120219773A_ABST
    Figure CN120219773A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a non-copywriting image detection method and device, electronic equipment and a storage medium, and is applied to the technical field of information, and the method comprises the steps: carrying out the text detection of a to-be-detected image, and obtaining the text positions of all texts in the to-be-detected image; determining a first position of each object in the to-be-detected image; if the texts of all the text positions in the to-be-detected image are invalid texts, the to-be-detected image is a non-copywriting image, and the invalid texts are texts of which the text positions coincide with any first position. According to the embodiment of the invention, whether an effective text exists in the to-be-detected image or not and whether the to-be-detected image is a non-copywriting image or not can be objectively determined, and the accuracy of determining the non-copywriting image is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information technology, and in particular, to a method, apparatus, electronic device, and storage medium for detecting textless images. Background Art

[0002] In the digital advertising industry, picture advertising materials usually include advertising pictures and corresponding advertising copy (text content). Since there is no audio information in picture advertising materials, the copy on the image plays a crucial role in transmitting advertising information. Therefore, picture advertising materials without copy cannot effectively transmit the required information and are often considered low-quality advertisements.

[0003] Currently, it is usually manually checked whether the picture advertising materials contain advertising copy, and the advertising materials without advertising copy are determined as low-quality advertising materials. However, manual review relies on the subjective judgment of the reviewers, and the review criteria are not unified. For example, the criteria for reviewers A and B to determine whether the same picture advertising material contains advertising copy are not unified, and even the criteria for the same reviewer to review whether different picture advertising materials contain advertising copy are inconsistent, resulting in low accuracy in determining textless images. Summary of the Invention

[0004] The purpose of the embodiments of the present application is to provide a method, apparatus, electronic device, and storage medium for detecting textless images to improve the accuracy of determining textless images. The specific technical solutions are as follows:

[0005] In the first aspect of the implementation of the present application, first, a method for detecting textless images is provided, and the method includes:

[0006] Perform text detection on the image to be detected to obtain the text positions of all texts in the image to be detected;

[0007] Determine the first positions where each object in the image to be detected is located;

[0008] If all the texts at the text positions in the image to be detected are invalid texts, then the image to be detected is a textless image, where the invalid text is the text at the text position that coincides with any first position.

[0009] In a possible implementation manner, the determining the first positions where each object in the image to be detected is located includes:

[0010] Determine the object label of each pixel point in the image to be detected, where the object label is used to indicate the foreground object to which the pixel point belongs or to indicate that the pixel point belongs to the background;

[0011] Determine each connected component according to the object label of each pixel point, and the object labels of all pixel points in each connected component are the same;

[0012] Determine the position of each connected component in the image to be detected as the first position where each object in the image to be detected is located, and each object is the foreground object represented by the object label of the pixel points in each connected component.

[0013] In a possible implementation manner, determining the object label of each pixel point in the image to be detected includes:

[0014] Use a pre-trained preset algorithm to determine the object label of each pixel point in the image to be detected; wherein, the preset algorithm is trained according to the following method:

[0015] Obtain a sample image, wherein the first object label of each pixel point is marked in the sample image, and the first object label is used to represent the category of the object to which the pixel point belongs, and the category includes countable categories and uncountable categories;

[0016] Use the preset algorithm to determine the second object label of each pixel point in the sample image, and the second object label is used to represent the category of the object to which the pixel point belongs;

[0017] Train the preset algorithm according to the difference between the first object label and the second object label of each pixel point to obtain a trained preset algorithm.

[0018] In a possible implementation manner, determining the first position where each object in the image to be detected is located includes:

[0019] Determine the object label and semantic label of each pixel point in the image to be detected, where the object label is used to represent the foreground object to which the pixel point belongs or to represent that the pixel point belongs to the background;

[0020] Determine each connected component according to the object label and semantic label of each pixel point. The object labels of all pixel points in each connected component are the same and the semantic labels are the same, and the object label represents the foreground object to which the pixel point belongs;

[0021] Determine the position of each connected component in the image to be detected as the first position where each object in the image to be detected is located, and each object is the foreground object represented by the object label of the pixel points in each connected component.

[0022] In a possible implementation manner, the text position of the text is the coordinate of the text box of the text in the image coordinate system of the image to be detected, and the invalid text is determined by the following method:

[0023] Calculate the area of the text box according to the coordinates of the text box in the image to be detected, and use it as the first area;

[0024] Calculate the second areas where each of the text boxes coincides with each of the first positions, and determine the maximum value of the ratio of each of the second areas to the first area;

[0025] If the maximum value is greater than the preset area ratio threshold, the text in the text box is invalid text.

[0026] In a possible implementation manner, the text position of the text is the coordinate of the text box of the text in the image coordinate system of the image to be detected, and the invalid text is determined by the following method:

[0027] For each text box in the image to be detected, calculate the side lengths of the text box and determine the minimum side length; if the minimum side length is less than the preset side length threshold, the text in the text box is invalid text; otherwise, use the text box as the first valid text box;

[0028] For each of the first valid text boxes, determine the number of characters in the text in the first valid text box; if the number of characters is less than the preset number of characters threshold, the text in the first valid text box is invalid text, otherwise, use the first valid text box as the second valid text box;

[0029] The case where if all the text at all text positions in the image to be detected is invalid text, then the image to be detected is an image without copywriting includes:

[0030] If all the text in all the second valid text boxes in the image to be detected is invalid text, then the image to be detected is an image without copywriting.

[0031] In a second aspect of the embodiments of the present application, there is provided an image without copywriting detection device, and the device includes:

[0032] A text detection module, configured to perform text detection on the image to be detected to obtain the text positions of all the text in the image to be detected;

[0033] A first position determination module, configured to determine the first positions where each object in the image to be detected is located;

[0034] A copywriting-free image determination module, configured to determine that if all the text at all text positions in the image to be detected is invalid text, then the image to be detected is an image without copywriting, where the invalid text is the text at the text position that coincides with any first position.

[0035] In a possible implementation manner, the first position determination module includes:

[0036] A label determination sub-module, configured to determine an object label for each pixel point in the image to be detected, where the object label is used to represent the foreground object to which the pixel point belongs or to represent that the pixel point belongs to the background;

[0037] A connected component determination sub-module, configured to determine each connected component according to the object labels of the pixel points, where the object labels of all pixel points in each connected component are the same;

[0038] A position determination sub-module, configured to determine the position of each connected component in the image to be detected as the first position where each object in the image to be detected is located, and each object is the foreground object represented by the object label of the pixel points in each connected component.

[0039] In a possible implementation manner, the label determination sub-module is specifically configured to:

[0040] Use a pre-trained preset algorithm to determine the object label for each pixel point in the image to be detected; wherein, the preset algorithm is trained according to the following method:

[0041] Obtain a sample image, where the sample image is marked with a first object label for each pixel point, and the first object label is used to represent the category of the object to which the pixel point belongs, and the category includes countable categories and uncountable categories;

[0042] Use the preset algorithm to determine a second object label for each pixel point in the sample image, where the second object label is used to represent the category of the object to which the pixel point belongs;

[0043] Train the preset algorithm according to the difference between the first object label and the second object label of each pixel point to obtain a trained preset algorithm.

[0044] In a possible implementation manner, the first position determination module is specifically configured to:

[0045] Determine the object label and semantic label for each pixel point in the image to be detected, where the object label is used to represent the foreground object to which the pixel point belongs or to represent that the pixel point belongs to the background;

[0046] Determine each connected component according to the object label and semantic label of each pixel point, where the object labels and semantic labels of all pixel points in each connected component are the same, and the object label represents the foreground object to which the pixel point belongs;

[0047] Determine the position of each connected component in the image to be detected as the first position where each object in the image to be detected is located, and each object is the foreground object represented by the object label of the pixel points in each connected component.

[0048] In a possible implementation, the text position of the text is the coordinate of the text box of the text in the image coordinate system of the image to be detected, and the invalid text is determined in the following manner:

[0049] According to the coordinate of the text box in the image to be detected, calculate the area of the text box as the first area;

[0050] Calculate the second areas where each of the text boxes coincides with each of the first positions, and determine the maximum value of the ratio of each of the second areas to the first area;

[0051] If the maximum value is greater than the preset area ratio threshold, the text in the text box is invalid text.

[0052] In a possible implementation, the text position of the text is the coordinate of the text box of the text in the image coordinate system of the image to be detected, and the invalid text is determined in the following manner:

[0053] For each of the text boxes in the image to be detected, calculate each side length of the text box and determine the minimum side length; if the minimum side length is less than the preset side length threshold, the text in the text box is invalid text; otherwise, use the text box as the first valid text box;

[0054] For each of the first valid text boxes, determine the number of characters in the text in the first valid text box; if the number of characters is less than the preset number of characters threshold, the text in the first valid text box is invalid text, otherwise, use the first valid text box as the second valid text box;

[0055] If all the text at all the text positions in the image to be detected is invalid text, then the image to be detected is an image without copywriting, including:

[0056] If all the text in all the second valid text boxes in the image to be detected is invalid text, then the image to be detected is an image without copywriting.

[0057] In another aspect of the implementation of the present application, an electronic device is further provided, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;

[0058] The memory is used to store a computer program;

[0059] The processor is used to implement the method for detecting an image without copywriting as described in any one of the above when executing the program stored in the memory.

[0060] In yet another aspect of the implementation of the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned textless image detection method is implemented.

[0061] In yet another aspect of the implementation of the present application, there is also provided a computer program product containing instructions, which when run on a computer, causes the computer to execute the above-mentioned textless image detection method.

[0062] A textless image detection method, device, electronic device and storage medium provided by an embodiment of the present application include: performing text detection on a to-be-detected image to obtain the text positions of all texts in the to-be-detected image; determining the first positions of each object in the to-be-detected image; if the texts at all text positions in the to-be-detected image are invalid texts, then the to-be-detected image is a textless image, where an invalid text is a text at a text position that coincides with any first position.

[0063] By adopting the embodiment of the present application, after performing text detection on the to-be-detected image to determine the text positions of all texts in the to-be-detected image and determining the first positions of each object in the to-be-detected image, for the text at each text position in the to-be-detected image, by determining whether there is an overlapping area between the text position of the text and the first positions of each object, it is determined whether the text at the text position is inside the object in the to-be-detected image. If there is an overlapping area between the text position of the text and the first position of any object, it is considered that the text is inside the object in the to-be-detected image, and further the text is considered as the text of the object itself, the text is an invalid text, and the text cannot be used as a copywriting. If the texts at all text positions in the to-be-detected image are invalid texts, then the to-be-detected image is a textless image. Compared with manual review, the embodiment of the present application can objectively determine whether there is valid text in the to-be-detected image and whether the to-be-detected image is a textless image, improving the accuracy of determining a textless image. BRIEF DESCRIPTION OF THE DRAWINGS

[0064] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art.

[0065] Figure 1 It is the first schematic diagram of the textless image detection method provided by the embodiment of the present application;

[0066] Figure 2 It is an example diagram of the first positions of each object in the to-be-detected image provided by the embodiment of the present application;

[0067] Figure 3The second schematic diagram of the textless image detection method provided by the embodiments of the present application;

[0068] Figure 4 The third schematic diagram of the textless image detection method provided by the embodiments of the present application;

[0069] Figure 5 The schematic diagram of the training process of the preset algorithm provided by the embodiments of the present application;

[0070] Figure 6 The schematic diagram of the first method for determining invalid text provided by the embodiments of the present application;

[0071] Figure 7 The schematic diagram of the second method for determining invalid text provided by the embodiments of the present application;

[0072] Figure 8 The structural schematic diagram of the advertisement material review system;

[0073] Figure 9 The flowchart of the textless image detection method provided by the embodiments of the present application;

[0074] Figure 10 The structural schematic diagram of the textless image detection device provided by the embodiments of the present application;

[0075] Figure 11 A structural schematic diagram of an electronic device in the embodiments of the present application. Detailed implementation manners

[0076] Next, the technical solutions in the embodiments of the present application will be described with reference to the accompanying drawings in the embodiments of the present application.

[0077] Adding text artificially in an image is a way of information transmission. These artificially added texts can be used to express the theme, content or background information of the image, helping the audience of the image quickly understand the information conveyed by the image. Therefore, when users select images to be shown to the audience, they usually tend to choose images with artificially added texts, that is, the texted images in the following. In this article, the artificially added texts are called copywriting, and the images without artificially added texts are called textless images. Textless images are usually considered unable to effectively convey information. Therefore, showing textless images to the audience cannot effectively convey information and instead requires a certain amount of bandwidth resources. Therefore, to avoid wasting bandwidth resources caused by showing textless images, in the related art, users can manually review the images to be shown to screen out textless images.

[0078] Taking the application scenario of picture advertisement display as an example, in the related art, it is the staff who review whether there is text in the picture advertisement material, regard the picture advertisement material without text as a low-quality advertisement, and display the picture advertisement material with text. However, manual review relies on the subjective judgment of the reviewers, the review criteria are not unified, and misjudgment is likely to occur. Moreover, manual review mainly relies on visual judgment and lacks the multi-dimensional comprehensive judgment ability based on image analysis technology, so it is easy to overlook details.

[0079] Taking slide production as an example, when users usually hope to intuitively display some data through slides, they need to use images with text in the slides. However, in the related art, it is often the user who selects the images with text from a large number of images in the material library according to their own needs, which takes a long time.

[0080] To solve the above problems, the embodiments of the present application provide a method, device, electronic device and storage medium for detecting images without text. The method for detecting images without text provided by the present application will be described in detail below through specific embodiments.

[0081] In the first aspect of the embodiments of the present application, a method for detecting images without text is first provided, which can be applied to an electronic device. In a specific application, the electronic device can be a server or a terminal device, and the present application does not limit this. In practical applications, the terminal device can be: a smart phone, a tablet computer, a desktop computer, and so on.

[0082] As Figure 1 shown in the first schematic diagram of the method for detecting images without text provided by the embodiments of the present application, the method includes the following steps:

[0083] Step S10: Perform text detection on the image to be detected to obtain the text positions of all texts in the image to be detected;

[0084] Step S20: Determine the first positions where each object in the image to be detected is located;

[0085] Step S30: If all the texts at the text positions in the image to be detected are invalid texts, the image to be detected is an image without text;

[0086] In the above step S10, text detection of the image refers to detecting the text regions in the image. Specifically, a text detection model trained by a deep learning method can be used to perform text detection on the image to be detected, or a preset OCR (Optical Character Recognition) model can be used to perform text detection on the image to be detected. Additionally, methods such as connected component analysis can be used to perform text detection on the image to be detected. The embodiments of the present application do not limit this. It can be understood that if a text detection model trained by a deep learning method is used to perform text detection on the image to be detected, before performing text detection on the image to be detected, preprocessing such as resizing and normalizing the image to be detected is required to make the image to be detected meet the input requirements of the text detection model.

[0087] Obtaining the text positions of all texts can be achieved by, after detecting the texts in the image to be detected, extracting the pixel points of the region where the text is located and determining the text positions based on the coordinates of the pixel points of the region where the text is located. Alternatively, the image to be detected can be input into a pre-trained model to obtain the text positions of each text output by the model.

[0088] The text positions can be represented by the coordinate positions of the pixel points of the detected text region in the image coordinate system of the image to be detected, or by the coordinates of the rectangular box (hereinafter referred to as the text box) surrounding the text, such as the coordinates of the diagonal vertices of the text box or the coordinates of one vertex of the text box and the width and height of the text box. It can also be represented by the position of the mask of the text in the image to be detected. The embodiments of the present application do not limit this.

[0089] In the above step S20, each object refers to any physical entity that can be recognized or distinguished in the image to be detected, such as a person, an animal, a plant, a building, a vehicle, etc. It can also refer to a background region that may carry text itself, such as a road.

[0090] The first positions where each object is located can be determined by any recognition and positioning method, such as object detection technology. Alternatively, a model can be pre-trained based on traditional machine learning or deep learning. The input of the model is the image to be detected, and the output is the first positions of each object in the image.

[0091] The first positions where each object is located can be represented by the coordinate positions of the pixel points of the detected object region in the image coordinate system of the image to be detected, or by the diagonal vertex coordinates of the smallest rectangular box (hereinafter referred to as the bounding box) surrounding the object, or by the coordinates of one vertex of the bounding box and the width and height of the bounding box. It can also be represented by the mask of the object. The embodiments of the present application do not limit this.

[0092] In the above step S30, the invalid text is the text at the text position that overlaps with any first position. The invalid text is the text that originally exists on the object. For example, the image to be detected is an advertising image material of a bicycle. When photographing a bicycle parked on the grass, due to the lens, a box beside the bicycle is also photographed into the picture, obtaining the advertising image material of the bicycle. There is text "xxxx" printed on the box. This text is usually used to represent the relevant information of the box itself and is often irrelevant to the bicycle and cannot convey information related to the bicycle. Then the text "xxxx" is invalid text.

[0093] It can be understood that there may be multiple objects and multiple texts in the image to be detected. For each text, if the position where the text is located overlaps with the first position of any object in the image to be detected, it means that the text may be the text included in the object itself and is not the text added artificially for conveying information, that is, the text is invalid text. Further, if all the texts in the image to be detected are invalid texts, it means that the image is a textless image. On the contrary, if not all the texts in the image are invalid texts, the image is an image with text.

[0094] By adopting the embodiment of the present application, after determining the text positions of all the texts in the image to be detected and the first positions of each object in the image to be detected when performing text detection on the image to be detected, for the text at each text position in the image to be detected, by determining whether there is an overlapping area between the text position of the text and the first positions of each object, to determine whether the text at the text position is inside the object in the image to be detected. If there is an overlapping area between the text position of the text and the first position of any object, it is considered that the text is inside the object in the image to be detected. Further, it is considered that the text is the text included in the object itself, and the text is invalid text. This text cannot be used as a copywriting. If all the texts in the image to be detected are invalid texts, the image to be detected is a textless image. Compared with manual review, the embodiment of the present application can objectively determine whether there is valid text in the image to be detected and whether the image to be detected is a textless image, improving the accuracy of determining a textless image.

[0095] Exemplarily, still taking the display of picture advertisements as an example, by using the text-free image detection method provided in the embodiments of the present application, based on the text positions of all texts in the image to be detected and the first positions of each object, it can be determined whether the text is the text included in the object itself, that is, invalid text. By judging whether all texts in the image to be detected are invalid texts, it can be determined whether the image to be detected is a text-free image. Compared with the manual review method, this can objectively determine whether there is valid text in the image to be detected and whether the image to be detected is a text-free image, thereby eliminating the inaccuracy caused by the subjectivity of manual review, and further accurately determining whether there is valid text in the image to be detected and whether the image to be detected is a text-free image.

[0096] It can be understood that Figure 1 The figure shown is only a possible flowchart of the text-free image detection method provided by the present application. Although in Figure 1 the example shown, step S20 is executed after step S10, but in other possible embodiments, it is also possible to respectively determine the text positions of all texts in the image to be detected and the first positions of each object through the above-mentioned step S10 and step S20 at the same time, and then execute the above-mentioned step S30 to determine whether the image to be detected is a text-free image. It is also possible to first determine the first positions of each object in the image to be detected through the above-mentioned step S20, then perform text recognition on the image to be detected through the above-mentioned step S10 to determine the text positions of all texts in the image to be detected, and finally execute the above-mentioned step S30. All of these are possible. The embodiments of the present application do not limit the execution order of step S10 and step S20.

[0097] If the first positions of each object are determined by using object detection in the above step S20, the obtained first positions are the positions of the bounding boxes surrounding each object. For example Figure 2 The figure shown is an example diagram of the first positions of each object in the image to be detected provided by the embodiments of the present application. Each dotted box in the figure is a bounding box, and each object detected is surrounded by the dotted box. In this case, the first positions of each object in the image to be detected are represented by the positions of each dotted box in the image to be detected.

[0098] Since the computational complexity of object detection is relatively small, therefore, by using object detection to determine the first positions of each object in the image to be detected and taking the positions of the bounding boxes as the first positions of the objects, the detection speed is relatively fast. However, if the position of the text is very close to the position of the object but there is no overlap, due to the relatively low detection accuracy of object detection, only the rectangular area where the object is located will be determined, and the background and the object within the rectangular area will not be further distinguished. This results in the situation that although the text and the object itself do not overlap, if the text overlaps with the background within the rectangular area, it will also be determined to overlap, resulting in misjudgment.

[0099] To make the first positions of the determined objects more accurate, in a possible implementation, the features of each pixel point in the image can be identified, and the position, shape, size, etc. of each object can be determined based on the features of the pixel points. Based on this, as Figure 3 shown in the second schematic diagram of the textless image detection method provided by the embodiments of the present application, the above step S20 may include the following steps:

[0100] Step S21, determining the object label of each pixel point in the image to be detected, where the object label is used to indicate the foreground object to which the pixel point belongs or to indicate that the pixel point belongs to the background;

[0101] Step S22, determining each connected component according to the object labels of each pixel point, where the object labels of all pixel points in each connected component are the same;

[0102] Step S23, determining the position of each connected component in the image to be detected as the first position of each object in the image to be detected, where each object is the foreground object indicated by the object label of the pixel points in each connected component.

[0103] In the above step S21, the object label of each pixel point in the image to be detected is determined by using a preset algorithm obtained by pre-training. The preset algorithm can be trained by traditional machine learning methods or based on deep learning. The training process of the preset algorithm is described in detail below and will not be elaborated here.

[0104] After determining the object label of each pixel point in the image to be detected through the above step S21, each pixel point has a unique object label, and the object label of the pixel point is used to identify which foreground object the pixel point belongs to or to identify that the pixel point belongs to the background area.

[0105] In the above step S22, a connected component refers to a set of pixels composed of adjacent pixel points with the same object label. The object labels of all pixel points in the same connected component are the same, and the object labels of pixel points in different connected components are different. For example, connected component 1 includes 100 pixel points, connected component 2 includes 300 pixel points. The 100 pixel points in connected component 1 are adjacent to each other and the pixel labels of these 100 pixel points are all object label 1, and the 300 pixel points in connected component 2 are adjacent to each other and the pixel labels of these 300 pixel points are all object label 2.

[0106] In step S23, the position of the connected component in the image to be detected can be represented by the set of pixel coordinates of the pixel points in the connected component, or by the coordinates of the connected component in the image coordinate system of the image to be detected, or by the coordinates of the mask of the object represented by the connected component in the image to be detected. The embodiments of the present application do not limit this.

[0107] It can be understood that in this embodiment, each object in the image to be detected is a foreground object. When the position of the mask is used to represent the first position where the object is located, the mask of each object is an instance mask.

[0108] By using the method of the embodiment of the present application, connected components are determined according to the pixel labels of each pixel point in the image to be detected, and the first position of each object in the image to be detected is represented by the position of each connected component in the image to be detected. Since only pixel points with the same object label are included in the connected component, the foreground object and the background can be accurately distinguished, the possibility of misjudging invalid text can be reduced, and thus the accuracy of detecting images without text can be improved.

[0109] However, in some cases, there may originally be text in the background. For example, the speed limit signs on the road include text, and these texts are obviously not copywriting. However, in the above embodiment, the object label of the pixel point is used to indicate which foreground object the pixel point belongs to or to indicate that the pixel point belongs to the background, and it cannot specifically distinguish whether the pixel point belongs to the road, the sky or the grassland. The text on the road is very likely to be recognized as copywriting, resulting in misjudgment.

[0110] Based on this, in a possible implementation manner, the features of each pixel point in the image can also be recognized, and the position, shape, size, category and other information of each object can be determined according to the features of the pixel point. Based on this, as Figure 4 shown in the third schematic diagram of the method for detecting images without text provided by the embodiment of the present application, the above step S20 may include the following steps:

[0111] Step S201: Determine the object label and semantic label of each pixel point in the image to be detected. The object label is used to indicate the foreground object to which the pixel point belongs or to indicate that the pixel point belongs to the background;

[0112] Step S202: Determine each connected component according to the object label and semantic label of each pixel point. All pixel points in each connected component have the same object label and the same semantic label, and the object label indicates the foreground object to which the pixel point belongs;

[0113] Step S203: Determine the position of each connected component in the image to be detected as the first position where each object in the image to be detected is located. Each object is the foreground object indicated by the object label of the pixel points in each connected component.

[0114] Among them, the semantic label is used to represent the type of the object or area to which the pixel point belongs, such as a person, an animal, a box, the sky, etc. The semantic label can be determined by using a pre-trained algorithm model, which can be trained by traditional machine learning methods or based on deep learning. The training process of this algorithm model is similar to the training process of the preset algorithm described below, except that the labels marked in the sample images are different. The training process of this algorithm model will not be elaborated in this application.

[0115] Step S201 is similar to the foregoing step S21, except that in step S201, the semantic label of each pixel point in the image to be detected is also determined; step S202 is similar to the foregoing step S22, except that in the above step S202, when determining the connected component, it is also necessary to be based on the semantic labels of each pixel point, and in the above step S202, the connected component refers to a pixel set composed of adjacent pixel points with the same object label, and the object labels and semantic labels of all pixel points in the same connected component are the same; step S202 is the same as the foregoing step S23 and will not be elaborated here.

[0116] By adopting the embodiment of the present application, by determining the semantic label of each pixel point, the type of each object and the type of the background in the image to be detected can be accurately segmented, so that it can be determined whether the background is a background that originally had text according to the type of the background, and the position of the background in the image can be obtained, which is convenient for determining whether the text is the text that originally existed in the background according to the position of the text in the image and the position of the background in the image, and the accuracy of determining the image without copywriting can be improved.

[0117] The training process of the preset algorithm will be described below. As Figure 5 shown in the schematic diagram of the training process of the preset algorithm provided by the embodiment of the present application, the training process includes the following steps:

[0118] Step S501, obtain a sample image;

[0119] Step S502, use the preset algorithm to determine the second object label of each pixel point in the sample image, and the second object label is used to represent the category of the object to which the pixel point belongs;

[0120] Step S503, train the preset algorithm according to the difference between the first object label and the second object label of each pixel point to obtain a trained preset algorithm.

[0121] In the above step S501, the first object label of each pixel point is marked in the sample image. The first object label is used to represent the category of the object to which the pixel point belongs. The categories include countable categories (i.e., things categories) and uncountable categories (i.e., stuff categories). Categories with countable quantities are countable categories, and categories with uncountable quantities are uncountable categories. Countable categories include people, animals, plants, buildings, vehicles, etc., and uncountable categories include sky, grassland, woods, etc.

[0122] It can be understood that if the category of the object to which the pixel point belongs is a countable category, the object to which the pixel point belongs is considered a foreground object. If the category of the object to which the pixel point belongs is an uncountable category, the object to which the pixel point belongs is considered a background.

[0123] In the sample image, the first object labels of objects of the same type can be the same or different. The types include people, animals, plants, vehicles, etc.

[0124] Exemplarily, if the sample image includes a grassland with three cats on it, the first object label of the pixel points in the area where the grassland is located in the sample image is "label 1", indicating that the pixel point belongs to the grassland and is an uncountable category. In the case where the first object labels of objects of the same type are the same, the first object label of the pixel points in the area where the cats are located in the sample image is "label 2", indicating that the pixel point belongs to the cat and is a countable category. In the case where the first object labels of objects of the same type are different, the first object label of the pixel points in the area where cat 1 is located in the sample image is "label 3", indicating that the pixel point belongs to cat 1, the first object label of the pixel points in the area where cat 2 is located is "label 4", indicating that the pixel point belongs to cat 2, and the first object label of the pixel points in the area where cat 3 is located is "label 5", indicating that the pixel point belongs to cat 3.

[0125] Using the method of the embodiment of the present application, a preset algorithm trained according to the sample image marked with the first object label of each pixel point can accurately determine the object label of each pixel point in the image to be detected.

[0126] The processes of determining the first position and the text position have been described in detail above. Taking the coordinates of the text box in the image coordinate system of the image to be detected as an example of the text position, how to determine whether the text is invalid text based on the first position and the text position will be described below.

[0127] As Figure 6 shown in the schematic diagram of the first method for determining invalid text provided by the embodiment of the present application, it includes the following steps:

[0128] Step S601, calculate the area of the text box according to the coordinates of the text box in the image to be detected as the first area;

[0129] Step S602: Calculate the second areas where each text box coincides with each first position, and determine the maximum value of the ratio of each second area to the first area.

[0130] Step S603: If the maximum value is greater than the preset area ratio threshold, the text in the text box is invalid text.

[0131] In the above step S601, the coordinates of the text box in the image to be detected can be the coordinates of the diagonal vertices of the text box in the image to be detected, or the coordinates of any one vertex of the text box and the width and height of the text box.

[0132] When calculating the first area of each text box, if the coordinates of the text box in the image to be detected are the physical coordinates of the vertices of the text box in the image to be detected, the width and height of the text box can be first calculated according to the coordinates of the diagonal vertices, and then the first area of the text box can be calculated according to the width and height of the text box. For example, assuming that the diagonal vertices of the text box are A(x1, y1) and B(x2, y2) respectively, the width of the text box can be calculated as |x2 - x1|, the height can be calculated as |y2 - y1|, and the area of the text box can be calculated as |y2 - y1| × |x2 - x1|.

[0133] If the coordinates of the text box in the image to be detected are the pixel coordinates of the vertices of the text box in the image to be detected, the number of pixel points in the text box can be counted as the first area of the text border according to the vertices of the text box, or the number of pixel points in the text box can be calculated according to the vertex coordinates of the text box as the first area of the text box, or the actual area of the text box can be calculated according to the number of pixel points in the text box as the first area of the text box. This is all acceptable, and the embodiments of the present application do not limit this.

[0134] After calculating the first area of the text box, determine the second area where each text box coincides with each first position. In the above step S602, the number of pixel points where the text box coincides with the first position where the object is located can be counted as the second area, or the second area where the text box coincides with the first position of each object can be determined according to the existing image processing technology. This is all acceptable, and the embodiments of the present application do not limit this.

[0135] If the maximum value of the second areas where the text box coincides with each first position is greater than the preset area ratio threshold, it can be considered that the text box is included in the object corresponding to the maximum value of the second area, that is, the text in the text box is invalid text.

[0136] Exemplarily, assume that the first area of text box 1 is m1, the preset area ratio threshold is 60%, the second area where text box 1 coincides with the first position of object 1 is m2, the second area where it coincides with the first position of object 2 is m3, and the second area where it coincides with the first position of object 3 is m4. If m2 > m3 > m4 and m2 / m1 = 72%, it can be considered that the text in text box 1 is the text originally included in object 1, that is, the text in text box 1 is invalid text.

[0137] By adopting the embodiments of the present application, the first area of the text box is calculated according to the coordinates of the text box, and the second area where the text box coincides with the first position of each object is determined. By determining whether the ratio of the maximum second area to the first area is greater than the preset area ratio threshold, it is possible to quickly and accurately determine whether the text in the text box is invalid text, thereby improving the accuracy of determining the image without text.

[0138] For the sake of convenience of description, hereinafter, the method of determining invalid text according to the second area where the text box coincides with the first position of each object in the foregoing text is referred to as method 1. However, only using method 1 to determine whether the text is invalid text may still result in misjudgment. Exemplarily, still taking the advertisement display scenario as an example, for all texts in a certain advertisement image material, even if the text position of any text does not coincide with any first position, if the font sizes of all texts in the image to be detected are too small to be seen clearly, or the number of characters in the text at each text position in the image to be detected is 1, then these texts obviously cannot effectively convey information. Therefore, these texts can be regarded as invalid texts. In this case, the advertisement image is still an image without text.

[0139] To improve the accuracy of determining the image without text, the size of each text box and the number of characters in the text box can also be detected. If the size of the text box or the number of text characters does not meet the preset requirements, the text is determined to be invalid text. Based on this, in a possible implementation manner, the invalid text can also be determined by at least one of the following methods:

[0140] Method 2: For each text box, calculate the side lengths of each text box and determine the minimum side length of the text box; if the minimum side length is less than the preset side length threshold, the text in the text box is invalid text;

[0141] Method 3: For each text box, determine the number of characters in the text box; if the number of characters is less than the preset number of characters threshold, the text in the text box is invalid text.

[0142] Among them, the preset side length threshold and the preset number of characters threshold are set by the user according to needs and actual experience, and the present application does not limit this.

[0143] When determining whether the image to be detected is a text-free image by using Method 1 to Method 3, for each text box in the image to be detected, Method 1, Method 2, and Method 3 described above can be used to respectively confirm whether it is an invalid text. For any text box, as long as the text box is determined to be an invalid text by any one of Method 1 to Method 3, the text in the text box is an invalid text. If all the texts in the image to be detected are invalid texts, then the image to be detected is a text-free image. It can also be that for all the text boxes in the image to be detected, first use any one of Method 1 to Method 3 to determine whether all the texts are invalid texts. After determining a part of the invalid texts, for the remaining texts, use any one of the two methods not yet selected from Method 1 to Method 3 to determine whether the remaining texts are invalid texts. After determining another part of the invalid texts, for the texts remaining for the second time, finally use the method not yet selected to determine whether the texts remaining for the second time are invalid texts. If the texts remaining for the second time are all invalid texts, then the image to be detected is a text-free image.

[0144] When using Method 1 to Method 3 to determine whether the image to be detected is a text-free image, the order of using Method 1, Method 2, and Method 3 described above can be any one of the following orders: Method 1, Method 2, Method 3; Method 1, Method 3, Method 2; Method 2, Method 1, Method 3; Method 2, Method 3, Method 1; Method 3, Method 2, Method 1; Method 3, Method 1, Method 2.

[0145] However, since the calculation amount of Method 1 is usually large, and the calculation amounts of Method 2 and Method 3 are relatively small, in order to reduce the calculation amount of determining the text-free image, in a possible implementation manner, for all the text boxes in the image to be detected, first use Method 2 and Method 3 described above to determine whether the texts in each text box are invalid texts, and then use Method 1 to determine whether the remaining texts are invalid texts. It can be understood that when using Method 2 and Method 3 described above to determine whether the texts in each text box are invalid texts, Method 2 can be used first and then Method 3, or Method 3 can be used first and then Method 2. The embodiments of the present application do not limit the order of using Method 2 and Method 3.

[0146] Taking the order of use as: Method 2, Method 3, Method 1 as an example, the process of determining the invalid text will be described below. See Figure 7 , the invalid text is determined through the following steps:

[0147] Step S701, for each text box in the image to be detected, calculate the side lengths of the text box and determine the minimum side length of the text box; if the minimum side length is less than the preset side length threshold, the text in the text box is an invalid text; otherwise, the text box is used as the first valid text box;

[0148] Step S702: For each first valid text box, determine the number of characters in the text of the first valid text box; if the number of characters is less than the preset character number threshold, the text in the first valid text box is invalid text, otherwise, take the first valid text box as the second valid text box;

[0149] Step S703: For each second valid text box, determine whether there is a first position that coincides with the position of the second valid text box; if so, the text in the second valid text box is invalid text.

[0150] In this case, if all the text at all text positions in the to-be-detected image in the foregoing step S30 is invalid text, the to-be-detected image is a textless image, including:

[0151] If all the text in all the second valid text boxes in the to-be-detected image is invalid text, the to-be-detected image is a textless image.

[0152] Exemplarily, assume that 10 text boxes are obtained after the to-be-detected image 1 undergoes text detection in the foregoing step S10, the preset side length threshold is 4, and the preset character number threshold is 5. The text boxes are text box 1 to text box 10. For each of the text boxes 1 to 10, calculate the side lengths l of the text box and determine the minimum side length l of the text box min , according to the minimum side lengths l min1 ~l min10 of the text boxes 1 to 10, determine the minimum side length l min1 of the text box 1, the minimum side length l min2 of the text box 2, and the minimum side length l min5 of the text box 5 are all less than 4, then the text in the text boxes 1, 2, and 5 is invalid text.

[0153] Then, for the text boxes 3, 4, and 6 to 10, determine the number of characters in each text box. It is determined that the number of characters in the text boxes 3 and 4 is less than 5, so the text in the text boxes 3 and 4 is invalid text.

[0154] Finally, for the text boxes 6 to 10, determine whether the text boxes 6 to 10 coincide with the first positions of the respective objects in the to-be-detected image. If the text boxes 6 to 10 all coincide with the first positions of the respective objects in the to-be-detected image, the to-be-detected image 1 is a textless image. If there is a text box among the text boxes 6 to 10 that does not coincide with the first positions of the respective objects in the to-be-detected image, the to-be-detected image 1 is a text-containing image.

[0155] By adopting the embodiments of the present application, since the computational amount of calculating the side length of the text box and the number of characters in the text box is relatively small compared to the relative position determination, the invalid text to be detected is first determined according to the size of the text box and the number of characters in the text box, and then whether the remaining text is invalid text is determined according to the relative position relationship between the position of the text box and the first position of each object, which can reduce the computational amount of determining the invalid text and improve the efficiency.

[0156] To illustrate the method of the embodiments of the present application, the following takes the scenario of detecting images without copywriting for picture advertisement materials as an example, and is described in combination with specific embodiments. In this scenario, the image to be detected is a picture advertisement material, and the method for detecting images without copywriting provided by the embodiments of the present application is applied to an advertisement material review system. Refer to Figure 8 , Figure 8 As shown in the structural schematic diagram of the advertisement material review system, it includes an image preprocessing module, a text detection and recognition module, a segmentation module, a multi-dimensional judgment module, and a review result output module. The image preprocessing module adjusts the size of the image and normalizes the image. The text detection and recognition module includes a text detection model and an OCR recognition model, which are respectively used to detect and recognize text in the image. The segmentation module is used to segment the image to determine countable object classes and uncountable object classes in the image. The multi-dimensional judgment module is used to judge the minimum side of the text box, judge the text length, and judge the text of the object itself. The review result module judges the result output by the multi-dimensional judgment module and outputs the review result.

[0157] For the specific process of the method for detecting images without copywriting, refer to Figure 9 , Figure 9 which is the flowchart of the method for detecting images without copywriting provided by the embodiments of the present application. First, perform image preprocessing on the picture advertisement material (corresponding to the aforementioned image to be detected): adjust the image size and normalize it, and perform text detection and recognition on the preprocessed image (corresponding to the aforementioned step S10) to obtain all text detection frames in the image to be detected (corresponding to the text boxes in the previous text, hereinafter referred to as detection frames); secondly, use a preset algorithm to obtain the masks of all objects in the image to be detected and distinguish object classes (i.e., countable classes) and background classes (uncountable classes); then, determine whether there are still text detection frames to be processed in the image to be detected.

[0158] If there are still text detection frames to be processed in the image to be detected, then for each detection frame B, calculate the minimum side length B of the detection frame size , and determine whether the minimum side length B size is less than the preset threshold T size (corresponding to the aforementioned preset side length threshold ) . If the minimum side length B of the detection frame B size is less than the preset threshold T size, the text in the detection box is invalid copy (corresponding to the invalid text in the previous text), and it is determined whether there are still text detection boxes to be processed; if the minimum side length B of detection box B size is not less than the preset threshold T size , calculate the length of the text in detection box B, and determine the length C of the text C in detection box B length .

[0159] If the length C of text C length is less than the preset threshold T num (preset word count threshold), the text in detection box B is invalid copy, and it is determined whether there are still text detection boxes to be processed; if the length C of text C length is not less than the preset threshold T num , then according to the positional relationship between the coordinates of detection box B and the masks of each object, find all the masks that overlap with detection box B, and calculate the overlapping area ratio between detection box B and the overlapping masks (corresponding to the aforementioned steps S601 to step S602), and determine whether the maximum overlapping area ratio is greater than the preset threshold T mask (corresponding to the aforementioned preset area ratio threshold) and whether the corresponding mask is a countable class, and determine the text in the text box where the maximum overlapping area is greater than the preset threshold T mask and the corresponding mask is a countable class as invalid copy, and determine the text in the text box where the maximum overlapping area is not greater than the preset threshold T mask or the corresponding mask is not a countable class as valid copy, and return to determine whether there are still text detection boxes to be processed.

[0160] If there are no text detection boxes to be processed in the image to be detected, determine whether all the text in the image to be detected is invalid copy. If so, the image to be detected is an advertisement material without copy, otherwise it is considered that the image to be detected contains valid copy.

[0161] Finally, output the review result of the image to be detected, that is, the image to be detected is an image without copy or an image with copy.

[0162] Corresponding to the first aspect above, in the second aspect of the embodiments of the present application, a device for detecting an image without copy is provided. Refer to Figure 10 , Figure 10 is a schematic structural diagram of the device for detecting an image without copy provided by the embodiments of the present application. The device includes:

[0163] A text detection module 1001, configured to perform text detection on the image to be detected to obtain the text positions of all the text in the image to be detected;

[0164] A first position determination module 1002, configured to determine the first positions where each object is located in the image to be detected;

[0165] The no-copywriting image determination module 1003 is configured to determine that the to-be-detected image is a no-copywriting image if all the texts at the text positions in the to-be-detected image are invalid texts, where the invalid text is the text at the text position that coincides with any first position.

[0166] By adopting the embodiment of the present application, after performing text detection on the to-be-detected image to determine the text positions of all the texts in the to-be-detected image and determining the first positions where each object in the to-be-detected image is located, for the text at each text position in the to-be-detected image, by determining whether there is an overlapping area between the text position of the text and the first positions where each object is located, it is determined whether the text at the text position is inside the object in the to-be-detected image. If there is an overlapping area between the text position of the text and the first position of any object, it is considered that the text is determined to be inside the object in the to-be-detected image, and further, the text is considered to be the text of the object itself. This text is an invalid text and cannot be used as copywriting. If all the texts at the text positions in the to-be-detected image are invalid texts, then the to-be-detected image is a no-copywriting image. Compared with manual review, the embodiment of the present application can objectively determine whether there is valid text in the to-be-detected image and whether the to-be-detected image is a no-copywriting image, improving the accuracy of determining the no-copywriting image.

[0167] In a possible implementation manner, the first position determination module includes:

[0168] The label determination sub-module is configured to determine the object label of each pixel point in the to-be-detected image, where the object label is used to indicate the foreground object to which the pixel point belongs or to indicate that the pixel point belongs to the background;

[0169] The connected component determination sub-module is configured to determine each connected component according to the object labels of the pixel points, and the object labels of all the pixel points in each connected component are the same;

[0170] The position determination sub-module is configured to determine the positions of the connected components in the to-be-detected image as the first positions where each object in the to-be-detected image is located, and each object is the foreground object indicated by the object label of the pixel points in each connected component.

[0171] In a possible implementation manner, the label determination sub-module is specifically configured to:

[0172] Use a pre-trained preset algorithm to determine the object label of each pixel point in the to-be-detected image; where the preset algorithm is trained according to the following method:

[0173] Obtain a sample image, wherein a first object label of each pixel point is marked in the sample image, and the first object label is used to represent the category of the object to which the pixel point belongs, and the category includes countable categories and uncountable categories;

[0174] Use a preset algorithm to determine a second object label of each pixel point in the sample image, and the second object label is used to represent the category of the object to which the pixel point belongs;

[0175] Train the preset algorithm according to the difference between the first object label and the second object label of each pixel point to obtain a trained preset algorithm.

[0176] In a possible implementation manner, the first position determination module is specifically configured to:

[0177] Determine an object label and a semantic label of each pixel point in the image to be detected, where the object label is used to represent the foreground object to which the pixel point belongs or to represent that the pixel point belongs to the background;

[0178] Determine each connected component according to the object label and the semantic label of each pixel point. All pixel points in each connected component have the same object label and the same semantic label, and the object label represents the foreground object to which the pixel point belongs;

[0179] Determine the position of each connected component in the image to be detected as the first position where each object in the image to be detected is located, and each object is the foreground object represented by the object label of the pixel points in each connected component.

[0180] In a possible implementation manner, the text position of the text is the coordinate of the text box of the text in the image coordinate system of the image to be detected, and the invalid text is determined by the following method:

[0181] Calculate the area of the text box according to the coordinate of the text box in the image to be detected as the first area;

[0182] Calculate each second area where each text box coincides with each first position, and determine the maximum value of the ratio of each second area to the first area;

[0183] If the maximum value is greater than a preset area ratio threshold, the text in the text box is invalid text.

[0184] In a possible implementation manner, the text position of the text is the coordinate of the text box of the text in the image coordinate system of the image to be detected, and the invalid text is determined by the following method:

[0185] For each of the text boxes in the image to be detected, calculate the lengths of all sides of the text box and determine the minimum side length of the text box; if the minimum side length is less than a preset side length threshold, the text in the text box is invalid text; otherwise, use the text box as a first valid text box;

[0186] For each of the first valid text boxes, determine the number of characters in the text in the first valid text box; if the number of characters is less than a preset number of characters threshold, the text in the first valid text box is invalid text, otherwise, use the first valid text box as a second valid text box;

[0187] If the text at all text positions in the image to be detected is invalid text, then the image to be detected is an image without copywriting, including:

[0188] If the text in all second valid text boxes in the image to be detected is invalid text, then the image to be detected is an image without copywriting.

[0189] The embodiment of the present application also provides an electronic device, as Figure 11 shown, including a processor 1101, a communication interface 1102, a memory 1103, and a communication bus 1104, where the processor 1101, the communication interface 1102, and the memory 1103 communicate with each other through the communication bus 1104,

[0190] The memory 1103 is used to store a computer program;

[0191] When the processor 1101 is used to execute the program stored on the memory 1103, the following steps are implemented:

[0192] Perform text detection on the image to be detected to obtain the text positions of all texts in the image to be detected;

[0193] Determine the first position where each object in the image to be detected is located;

[0194] If the text at all text positions in the image to be detected is invalid text, then the image to be detected is an image without copywriting, where the invalid text is the text at the text position that coincides with any first position.

[0195] The communication bus mentioned in the above terminal may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0196] The communication interface is used for communication between the above terminal and other devices.

[0197] The memory may include a Random Access Memory (RAM), or may also include a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.

[0198] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0199] In another embodiment provided by the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the textless image detection method described in any one of the above embodiments is implemented.

[0200] In another embodiment provided by the present application, there is also provided a computer program product containing instructions, which when running on a computer, causes the computer to execute the textless image detection method described in any one of the above embodiments.

[0201] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, computer, server, or data center to another website, computer, server, or data center in a wired manner (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wirelessly (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)).

[0202] It should be noted that in this document, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including", or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or device including a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article, or device including the element.

[0203] Each embodiment in this specification is described in a related manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the device, electronic device, storage medium, and computer program product, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiments.

[0204] The above are only the preferred embodiments of the present application and are not intended to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application are all included in the protection scope of the present application.

Claims

1. A method for detecting images without text, characterized in that: The method comprises: Perform text detection on the image to be detected to obtain the text positions of all texts in the image to be detected; Determining a first position of each object in the image to be detected; If the texts at all text positions in the image to be detected are invalid texts, then the image to be detected is a text-free image, wherein the invalid texts are texts at text positions that overlap with any first position.

2. The method according to claim 1, characterized in that The step of determining a first position of each object in the image to be detected includes: Determine an object label for each pixel in the image to be detected, wherein the object label is used to indicate that the pixel belongs to a foreground object or to indicate that the pixel belongs to the background; Determine each connected domain according to the object label of each pixel point, wherein all pixels points in each connected domain have the same object label; The position of each of the connected domains in the image to be detected is determined as the first position of each object in the image to be detected, and each of the objects is a foreground object represented by an object label of a pixel point in each of the connected domains.

3. The method according to claim 2, characterized in that Determining the object label of each pixel in the image to be detected includes: The object label of each pixel in the image to be detected is determined by using a pre-trained preset algorithm; wherein the preset algorithm is trained according to the following method: Acquire a sample image, wherein the sample image is annotated with a first object label of each pixel, the first object label is used to indicate the category of the object to which the pixel belongs, and the category includes a countable category and an uncountable category; Determine a second object label for each pixel in the sample image by using a preset algorithm, where the second object label is used to indicate the category of the object to which the pixel belongs; The preset algorithm is trained according to the difference between the first object label and the second object label of each pixel to obtain a trained preset algorithm.

4. The method according to claim 1, characterized in that The step of determining a first position of each object in the image to be detected includes: Determine an object label and a semantic label for each pixel in the image to be detected, wherein the object label is used to indicate that the pixel belongs to a foreground object or to indicate that the pixel belongs to the background; Determine each connected domain according to the object label and the semantic label of each pixel point, wherein all pixels in each connected domain have the same object label and the same semantic label, and the object label indicates the foreground object to which the pixel point belongs; The position of each of the connected domains in the image to be detected is determined as the first position of each object in the image to be detected, and each of the objects is a foreground object represented by an object label of a pixel point in each of the connected domains.

5. The method according to claim 1, characterized in that The text position of the text is the coordinates of the text box of the text in the image coordinate system of the image to be detected, and the invalid text is determined in the following manner: Calculate the area of ​​the text box according to the coordinates of the text box in the image to be detected as a first area; Calculating each second area where each of the text boxes overlaps with each of the first positions, and determining the maximum value of the ratio of each of the second areas to the first area; If the maximum value is greater than a preset area ratio threshold, the text in the text box is invalid text.

6. The method according to claim 1, characterized in that The text position of the text is the coordinates of the text box of the text in the image coordinate system of the image to be detected, and the invalid text is determined in the following manner: For each of the text boxes in the image to be detected, the side lengths of the text boxes are calculated and the minimum side length of the text boxes is determined; if the minimum side length is less than a preset side length threshold, the text in the text box is invalid text; otherwise, the text box is taken as the first valid text box; For each of the first valid text boxes, determine the number of characters in the first valid text box; if the number of characters is less than a preset character count threshold, the text in the first valid text box is invalid text; otherwise, the first valid text box is used as a second valid text box; If the texts at all text positions in the image to be detected are invalid texts, then the image to be detected is a text-free image, including: If the texts in all the second valid text boxes in the image to be detected are invalid texts, the image to be detected is an image without text.

7. A device for detecting images without text, characterized in that: The device comprises: A text detection module, used to perform text detection on the image to be detected, and obtain the text position of all texts in the image to be detected; A first position determination module, used to determine a first position of each object in the image to be detected; The module for determining an image without text is used to determine that if the texts at all text positions in the image to be detected are invalid texts, the image to be detected is an image without text, wherein the invalid texts are texts at text positions that overlap with any first position.

8. The device according to claim 7, characterized in that The first position determination module includes: A label determination submodule, used to determine an object label for each pixel in the image to be detected, wherein the object label is used to indicate that the pixel belongs to a foreground object or to indicate that the pixel belongs to the background; A connected domain determination submodule, used to determine each connected domain according to the object label of each pixel point, wherein the object labels of all pixels in each connected domain are the same; The position determination submodule is used to determine the position of each connected domain in the image to be detected as the first position of each object in the image to be detected, and each object is a foreground object represented by the object label of the pixel point in each connected domain.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 6 when executing a program stored in a memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 6 are implemented.