A method and device for identifying sensitive pictures

By selecting different model recognition methods based on brightness information and area ratio, the problem of low recognition accuracy caused by small area of sensitive content is solved, and the recognition accuracy of sensitive pictures is improved.

CN114049578BActive Publication Date: 2025-07-22ZHENGZHOU APUS DIGITAL CLOUD INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111337573.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-10
Publication Date
2025-07-22
Estimated Expiration
2041-11-10

AI Technical Summary

Technical Problem

In the prior art, when identifying whether the picture is a sensitive picture, the recognition accuracy is low when the area of sensitive content is small.

Method used

By obtaining the brightness information of the target image, it is determined whether it contains pasted sensitive content. If there is, it is determined as a sensitive picture; if there is no, a binary classification model or human body classification model is selected based on the area ratio of the human body to the picture for further identification.

Benefits of technology

The accuracy of recognition of sensitive pictures is improved, especially when sensitive content is pasted or the picture itself contains small areas of sensitive content, it can effectively identify whether the picture is a sensitive picture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114049578B_ABST
    Figure CN114049578B_ABST
Patent Text Reader

Abstract

The present application discloses a method and apparatus for identifying sensitive pictures. The method includes: obtaining a target picture to be identified; determining whether the target picture contains pasted sensitive content based on the brightness information of the target picture; if so, determining that the target picture is a sensitive picture; if not, determining the area ratio of the human body in the target picture to the area of the target picture, and identifying whether the target picture is a sensitive picture based on a model corresponding to the area ratio; wherein, when the area ratio is greater than or equal to a set threshold, the model corresponding to the area ratio is a binary classification model, and when the area ratio is less than the set threshold, the model corresponding to the area ratio is a human body classification model. The embodiments of the present application can effectively identify sensitive content with a small occupied area in a picture, and then determine whether the picture is a sensitive picture, effectively improving the accuracy of identifying sensitive pictures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image recognition technology, and in particular, to a method and device for recognizing sensitive images. Background Art

[0002] Currently, in some application scenarios, it is usually necessary to identify whether an image is a sensitive image, that is, to identify whether the image contains sensitive content. For example, in a comic website, it is necessary to identify whether the comic images on the website contain sensitive content. In a third-party application, it is necessary to identify whether the images in the application contain sensitive content, and so on.

[0003] When recognizing an image, generally, a model can be trained on normal images and sensitive images, and then the trained model can be used to identify whether the image contains sensitive content, and further determine whether the image is a sensitive image. However, in practical applications, when the area of the sensitive content in the image is small, it is difficult to identify the sensitive content in the image and determine whether the image is a sensitive image using the current method, resulting in low recognition accuracy. Summary of the Invention

[0004] Embodiments of this application provide a method and device for recognizing sensitive images, which are used to solve the problem of low recognition accuracy when identifying whether an image is a sensitive image when the area of the sensitive content in the image is small.

[0005] To solve the above technical problems, the embodiments of this application are implemented as follows:

[0006] In a first aspect, a method for recognizing a sensitive image is proposed, including:

[0007] Obtain a target image to be recognized;

[0008] Based on the brightness information of the target image, determine whether the target image contains pasted sensitive content;

[0009] If so, determine that the target image is a sensitive image;

[0010] If not, determine the area ratio of the human body in the target image to the area of the target image, and based on the model corresponding to the area ratio, recognize whether the target image is a sensitive image;

[0011] Among them, when the area ratio is greater than or equal to a set threshold, the model corresponding to the area ratio is a binary classification model; when the area ratio is less than the set threshold, the model corresponding to the area ratio is a human body classification model.

[0012] In a second aspect, a device for recognizing a sensitive image is proposed, including:

[0013] An acquisition unit acquires a target image to be recognized;

[0014] A determination unit determines whether the target image contains pasted sensitive content based on the brightness information of the target image;

[0015] A first recognition unit determines that the target image is a sensitive image when the determination unit determines that the target image contains pasted sensitive content;

[0016] A second recognition unit determines the area ratio of the human body in the target image to the area of the target image when the determination unit determines that the target image does not contain pasted sensitive content, and recognizes whether the target image is a sensitive image based on a model corresponding to the area ratio;

[0017] Wherein, when the area ratio is greater than or equal to a set threshold, the model corresponding to the area ratio is a binary classification model, and when the area ratio is less than the set threshold, the model corresponding to the area ratio is a human body classification model.

[0018] In a third aspect, an electronic device is provided, which includes:

[0019] A processor; and

[0020] A memory arranged to store computer-executable instructions, which when executed cause the processor to perform the following operations:

[0021] Acquire a target image to be recognized;

[0022] Based on the brightness information of the target image, determine whether the target image contains pasted sensitive content;

[0023] If so, determine that the target image is a sensitive image;

[0024] If not, determine the area ratio of the human body in the target image to the area of the target image, and recognize whether the target image is a sensitive image based on a model corresponding to the area ratio;

[0025] Wherein, when the area ratio is greater than or equal to a set threshold, the model corresponding to the area ratio is a binary classification model, and when the area ratio is less than the set threshold, the model corresponding to the area ratio is a human body classification model.

[0026] In a fourth aspect, a computer-readable storage medium is provided, the computer-readable storage medium stores one or more programs, and when the one or more programs are executed by an electronic device including a plurality of application programs, the electronic device is caused to perform the following method:

[0027] Acquire a target image to be recognized;

[0028] Determine whether the target picture contains pasted sensitive content based on the brightness information of the target picture;

[0029] If so, determine that the target picture is a sensitive picture;

[0030] If not, determine the area ratio of the human body in the target picture to the area of the target picture, and identify whether the target picture is a sensitive picture based on the model corresponding to the area ratio;

[0031] Wherein, when the area ratio is greater than or equal to the set threshold, the model corresponding to the area ratio is a binary classification model, and when the area ratio is less than the set threshold, the model corresponding to the area ratio is a human body classification model.

[0032] The above at least one technical solution adopted in the embodiments of the present application can achieve the following beneficial effects:

[0033] Considering that when the area occupied by sensitive content in the picture is small, it may be a small area of pasted sensitive content in the picture or the picture itself contains a small area of sensitive content. Therefore, when identifying whether a picture is a sensitive picture, the picture can be identified based on the brightness information of the picture. In this way, for pictures with pasted sensitive content, the sensitive content in the picture can be effectively identified, and then it can be determined whether the picture is a sensitive picture, improving the recognition accuracy; for pictures without pasted sensitive content, different models can be selected to identify the pictures based on the area ratio of the human body in the picture to the area of the picture, and a binary classification model is selected to identify the picture when the area ratio is greater than or equal to the set threshold, and a human body classification model is selected to identify the picture when the area ratio is less than the set threshold. In this way, when the picture itself contains a large area of the human body, the binary classification model can be used to effectively identify whether the picture is a sensitive picture, and when the picture itself contains a small area of sensitive content, the human body classification model can be used to effectively identify whether the small area of the human body is a sensitive human body, and then effectively identify whether the picture is a sensitive picture, improving the recognition accuracy. Description of the Drawings

[0034] 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. Obviously, the drawings in the following description are only some embodiments recorded in the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0035] Figure 1 It is a flowchart of a method for identifying sensitive pictures according to an embodiment of the present application;

[0036] Figure 2 is a schematic flowchart of a method for identifying sensitive pictures according to an embodiment of the present application;

[0037] Figure 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application;

[0038] Figure 4 is a schematic structural diagram of a device for identifying sensitive pictures according to an embodiment of the present application. Detailed implementation manners

[0039] In order to enable those skilled in the art to better understand the technical solutions in the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.

[0040] Sensitive pictures can be understood as pictures containing sensitive content that does not conform to the specifications and is not suitable for display to the public. In a typical application scenario, sensitive pictures can be understood as pornographic pictures, and the sensitive content contained in sensitive pictures can be understood as pornographic content. This pornographic content can be sensitive parts of the human body (i.e., sensitive humans), such as exposed sensitive organs (sexual organs, etc.), or other human body parts with too large an exposed area, and so on.

[0041] Taking pornographic pictures as an example of sensitive pictures, when identifying whether a picture is a sensitive picture, the traditional method is to calculate the area of the region in the picture with a color similar to the human skin color, and determine whether the ratio of this area to the area of the entire picture is greater than a certain threshold. If it is greater, the picture is considered a sensitive picture; otherwise, the picture can be considered a normal picture. However, the recognition accuracy of this method is usually relatively low. The currently commonly used recognition method is to first perform model training on normal pictures and sensitive pictures, and then use the trained model to identify whether a picture is a sensitive picture. However, this model usually tends to identify pictures with a relatively large area of sensitive content in the picture, that is, when the area of sensitive content in the picture is relatively large, the recognition accuracy is relatively high. When the area of sensitive content in the picture is relatively small, it is not easy to identify the sensitive content, and the recognition accuracy is relatively low.

[0042] It can be seen that currently, when identifying whether a picture is a sensitive picture, the recognition accuracy is relatively low when the area of sensitive content in the picture is relatively small.

[0043] To solve the above technical problems, an embodiment of the present application provides a method and device for identifying sensitive pictures, which can identify small-area sensitive content in a picture, and then identify whether the picture is a sensitive picture, effectively improving the accuracy of identifying sensitive pictures.

[0044] Specifically, considering that when the area of sensitive content in a picture is small, it may be a small area of sensitive content pasted into the picture, or the picture itself contains a small area of sensitive content. Therefore, when identifying a picture, it is possible to first determine whether there is pasted sensitive content in the picture based on the brightness information of the picture. If so, the picture is considered a sensitive picture. If not, the picture can be further identified. Specifically, it is possible to identify the human body in the target picture and determine the area ratio of the human body to the target picture. If the area ratio is greater than or equal to a set threshold, it is possible to identify whether the picture is a sensitive picture based on a binary classification model. If the area ratio is less than the set threshold, it is possible to identify whether the picture is a sensitive picture based on a human body classification model.

[0045] In this way, when identifying whether a picture is a sensitive picture, since the picture can be identified based on the brightness information of the picture, for a picture with pasted sensitive content, the sensitive content in the picture can be effectively identified and then it can be determined whether the picture is a sensitive picture, improving the identification accuracy; for a picture without pasted sensitive content, since different models can be selected to identify the picture based on the area ratio of the human body in the picture to the picture, and a binary classification model is selected to identify the picture when the area ratio is greater than or equal to the set threshold, and a human body classification model is selected to identify the picture when the area ratio is less than the set threshold. Therefore, when the picture itself contains a large area of the human body, it is possible to effectively identify whether the picture is a sensitive picture based on the binary classification model. When the picture itself contains a small area of sensitive content, it is possible to effectively identify whether the small area of the human body is a sensitive human body based on the human body classification model, and then effectively identify whether the picture is a sensitive picture, improving the identification accuracy.

[0046] The following will describe in detail the technical solutions provided by each embodiment of the present application with reference to the accompanying drawings.

[0047] Figure 1 It is a schematic flowchart of a method for identifying sensitive pictures according to an embodiment of the present application. The method is as follows.

[0048] S102: Obtain a target picture to be identified.

[0049] When it is necessary to identify whether a certain picture is a sensitive picture, the target picture to be identified can be obtained.

[0050] S104: Based on the brightness information of the target picture, determine whether there is pasted sensitive content in the target picture.

[0051] After obtaining the target image, the brightness information of the target image can be further determined, and then based on this brightness information, it can be judged whether the image contains pasted sensitive content. Here, "paste" refers to pasting other images onto the target image through image processing means such as PS. Sensitive content can be pornographic content, such as sensitive parts of the human body (i.e., sensitive humans), etc. Such a sensitive human can be, for example, an exposed sensitive organ (sexual organ, etc.), or other human body parts with an overly large exposed area, and so on.

[0052] If the judgment result is that the target image contains pasted sensitive content, then S106 can be executed, that is, determining that the target image is a sensitive image. If the judgment result is that the target image does not contain pasted sensitive content, then in order to further determine whether the target image is a sensitive image, that is, to determine whether the target image contains non-pasted sensitive content, S108 can be executed.

[0053] S106: Determine that the target image is a sensitive image.

[0054] S108: Determine the area ratio of the human body in the target image to the target image, and based on the model corresponding to the area ratio, identify whether the target image is a sensitive image; among them, when the area ratio is greater than or equal to the set threshold, the model corresponding to the area ratio is a binary classification model, and when the area ratio is less than the set threshold, the model corresponding to the area ratio is a human body classification model.

[0055] In S108, in order to further determine whether the target image is a sensitive image, the area ratio between each human body in the target image and the target image can be determined. For any human body, if the area ratio of the human body to the target image is greater than or equal to the set threshold, it can be indicated that the area occupied by the human body in the target image is relatively large. At this time, based on the binary classification model, it can be identified whether the image containing the human body is a sensitive image. If the area ratio of the human body to the target image is less than the set threshold, it can be indicated that the area occupied by the human body in the target image is relatively small. At this time, based on the human body classification model, it can be identified whether the human body is a sensitive human body, and then it can be determined whether the target image is a sensitive image.

[0056] In this way, when identifying whether a picture is a sensitive picture, since the picture can be identified based on the brightness information of the picture, therefore, for a picture with sensitive content pasted on it, the sensitive content in the picture can be effectively identified, and then it can be determined whether the picture is a sensitive picture, improving the identification accuracy; for a picture without sensitive content pasted on it, since different models can be selected to identify the picture based on the area ratio of the human body in the picture to the area of the picture, and when the area ratio is greater than or equal to the set threshold, a binary classification model is selected to identify the picture, and when the area ratio is less than the set threshold, a human body classification model is selected to identify the picture. Therefore, when the picture itself contains a large area of the human body, based on the binary classification model, it can be effectively identified whether the picture is a sensitive picture. When the picture itself contains a small area of sensitive content, based on the human body classification model, it can be effectively identified whether the small area of the human body is a sensitive human body, and then it can be effectively identified whether the picture is a sensitive picture, improving the identification accuracy.

[0057] In one implementation, in S104 above, based on the brightness information of the target picture, determining whether the target picture contains pasted sensitive content may specifically include the following steps:

[0058] S41: Based on the brightness information of the target picture, determine the brightness abnormal area in the target picture.

[0059] S42: Based on the pre-trained human body classification model, identify whether the brightness abnormal area contains sensitive human bodies.

[0060] S43: According to the recognition result, determine whether the target picture contains pasted sensitive content.

[0061] Considering that when the target picture contains a pasted picture, the brightness of the area where the pasted picture is located is uneven and there is a large difference from the brightness of other areas in the target picture. Therefore, when identifying the target picture based on the brightness information, the brightness abnormal area in the target picture can be determined first based on the brightness information of the target picture. This brightness abnormal area is probably the area where the pasted picture is located. Then, the human body in the brightness abnormal area can be focused on for identification to determine whether it contains sensitive human bodies, and then whether sensitive content is pasted in the target picture can be effectively identified according to the judgment result.

[0062] When determining the brightness abnormal area in the target picture based on the brightness information of the target picture, specifically:

[0063] First, the target picture can be converted into a grayscale picture. The pixel values in this grayscale picture can represent the brightness of the target picture, that is, this grayscale picture can represent the brightness information of the target picture. Based on the grayscale picture, the brightness distribution of the target picture can be determined.

[0064] Secondly, based on the picture brightness characterized by the grayscale image of the target picture, the area where the brightness within the set interval in the target picture is located can be further determined. Here, for the convenience of distinction, the area where the brightness within the set interval in the target picture can be represented as the first area. The brightness within the set interval represents the brightness within a certain interval range, which can be specifically determined according to the actual situation and is not specifically limited here. For example, an interval can be set with a brightness difference of 60. In this case, the first area where the brightness within the set interval is located is the area where the pixels in the grayscale image (with brightness values between 0 and 255) have brightness values within the interval [x, x + 60], and the value of x can be from 0 to 195. Of course, in other implementation manners, the set interval can also be other brightness intervals, and no further examples will be given here.

[0065] It should be noted that the number of the first areas determined in this embodiment can be zero, one, or more. When the number of the first areas is zero, it can be considered that there is no brightness abnormal area in the target picture. Further, it can also be determined that the target picture does not contain pasted content or sensitive content. At this time, in order to further identify whether the target picture is a sensitive picture, the above S108 can be executed. When the number of the first areas is multiple, it can be further determined whether there are connected areas among the multiple first areas. If so, the multiple connected first areas can be regarded as a whole and regarded as one first area, and thus one or more first areas can be obtained. For example, if the number of the first areas is 5 and 2 of the first areas are connected, these 2 first areas can be regarded as one first area, and finally 4 first areas can be obtained.

[0066] Finally, after obtaining the first area, for each first area, it can be determined whether the area ratio of the first area to the target picture is less than or equal to the set ratio. The set ratio can be determined according to the actual situation and is not specifically limited here. Optionally, the set ratio can be set to 10%. After the judgment, if the judgment result is that the area ratio of the first area to the target picture is less than or equal to the set ratio, it can be explained that this first area is probably the area where the pasted picture is located. At this time, the first area can be determined as the brightness abnormal area. On the contrary, if the area ratio of the first area to the target picture is greater than the set ratio, it can be explained that this first area is probably not the area where the pasted picture is located. At this time, it can be determined that the first area is not the brightness abnormal area. In this embodiment, when it is determined that the target picture contains a brightness abnormal area, the number of the brightness abnormal areas can be one or more.

[0067] After obtaining one or more abnormally bright regions, it is possible to identify whether a sensitive human body is included in the abnormally bright region based on a human body classification model. The human body classification model can be pre-trained. Specifically, pictures of different human bodies can be obtained from multiple channels. The different human bodies can be non-sensitive human bodies such as arms, calves, fingers, etc., as well as sensitive human bodies such as sexual organs and chests. The number of pictures of different human bodies is basically the same to ensure the balance of the samples. In addition, the data volume of the samples can be expanded by processing the sample pictures such as scaling, splicing, and rotating, so that the network has stronger generalization ability. After obtaining the pictures of different human bodies, these pictures can be used as sample pictures and combined with the corresponding human body categories for model training (the trained model can be a neural network model or other models, which are not specifically limited here). Finally, a human body classification model can be obtained. This human body classification model can identify the category to which a certain human body belongs, such as identifying whether a certain human body is an arm, a calf, a sexual organ, a chest, etc.

[0068] When identifying whether a sensitive human body is included in the abnormally bright region based on the human body classification model, the abnormally bright region in the target picture can be extracted, and then the abnormally bright region can be processed such as filling in white edges to make its size meet the requirements of the human body classification model for the input picture size. Finally, the picture obtained after the filling process is input into the human body classification model, and it can be determined whether a sensitive human body is included in the abnormally bright region according to the output result of the model.

[0069] In a possible implementation manner, the output result of the human body classification model can be a multi-dimensional vector. This multi-dimensional vector includes the probabilities that the content in the abnormally bright region belongs to different categories of human bodies. When determining whether a sensitive human body is included in the abnormally bright region based on the output result, the maximum probability in the multi-dimensional vector can be determined, and the category corresponding to this maximum probability is the human body included in the abnormally bright region. For example, if the human body classification model is used to classify sexual organs, arms, calves, buttocks, and human faces, the output result of the human body classification model can be a 5-dimensional vector. Suppose the output result obtained after identifying the abnormally bright region is [0.1, 0.1, 0.2, 0.6, 0.1]. The categories corresponding to these 5 probabilities are sexual organs, arms, calves, buttocks, and human faces respectively. Then it can be determined that the buttocks are included in the abnormally bright region. Assuming that the buttocks are sensitive human bodies, it can be determined that a sensitive human body is included in the abnormally bright region. If the categories corresponding to these 5 probabilities are sexual organs, thighs, calves, arms, and human faces respectively, then it can be determined that the arms are included in the abnormally bright region. Given that the arms are non-sensitive human bodies, it can be determined that no sensitive human body is included in the abnormally bright region.

[0070] In this embodiment, if a sensitive human body is included in the abnormal brightness area, it can be determined that the target picture contains pasted sensitive content. On the contrary, if the abnormal brightness area does not contain a sensitive human body, it can be determined that the target picture does not contain pasted sensitive content. If it is determined that the target picture includes sensitive content, it can be determined that the target picture is a sensitive picture. If it is determined that the target picture includes insensitive content, it can be further determined whether the target picture is a sensitive picture based on the above S108.

[0071] In a possible implementation manner, when determining whether the target picture is a sensitive picture based on the above S108, it can first be determined whether the target picture contains a human body. Specifically, an existing human parsing model can be used to detect the human body in the target picture. The human parsing model can identify each human body contained in the target picture and split the identified human bodies. By using the human parsing model to detect the target picture, all the human bodies contained in the target picture can be obtained. It should be noted that after detecting the target picture based on the human parsing model in this embodiment, the number of detected human bodies can be zero, one, or more. If the number of detected human bodies is zero, it can be explained that the target picture does not contain a human body, and at this time, it can be determined that the target picture is a normal picture. If the number of detected human bodies is one or more, it can be further determined whether the target picture is a sensitive picture based on the above S108. This embodiment will be described by taking the number of detected human bodies being one or more as an example.

[0072] After detecting that the target picture contains one or more human bodies, in the above S108, determine the area ratio of the human body in the target picture to the target picture, and identify whether the target picture is a sensitive picture based on the model corresponding to the area ratio. Specifically, it can be to determine the area ratio of each human body in the target picture to the target picture, and for the area ratio corresponding to any first human body, identify whether the target picture is a sensitive picture based on the model corresponding to the area ratio.

[0073] When identifying whether the target picture is a sensitive picture based on the model corresponding to the area ratio, specifically, it can be determined whether the area ratio is greater than or equal to a set threshold. If so, it can be considered that the area of the first human body in the picture is relatively large, and at this time, a binary classification model can be used to identify whether the picture containing the first human body is a sensitive picture. If not, it can be considered that the area of the first human body in the picture is relatively small. At this time, if the binary classification model is still used for picture recognition, the first human body cannot be recognized and an accurate recognition result cannot be obtained. Therefore, a human body classification model can be used to identify whether the first human body is a sensitive human body, and determine whether the target picture is a sensitive picture according to whether the first human body is a sensitive human body.

[0074] The above set threshold for comparison with the area ratio can be obtained through model training or set based on the actual application scenario, and no specific limitation is made here. If the set threshold is determined through model training, the set threshold can be obtained through the following training method:

[0075] First, obtain pictures containing large-area human bodies and pictures containing small-area human bodies in the online scenario. The human bodies in these pictures can be pasted human bodies or human bodies included in the pictures themselves.

[0076] Secondly, use the human parsing model to parse the obtained pictures, and calculate the area ratio between the human bodies (pasted and non-pasted) in the pictures and the pictures.

[0077] Finally, perform threshold traversal on the area ratios obtained in the previous step to obtain the optimal threshold and use this optimal threshold as the set threshold. Among them, this optimal threshold can better judge the area size of the human body in the picture. Specifically, when the area ratio of a certain human body to the picture is less than this threshold, it can be determined that the area of the human body in the picture is small; when the area ratio of a certain human body to the picture is greater than or equal to this threshold, it can be determined that the area of the human body in the picture is large.

[0078] The above binary classification model can be pre-trained, and the model recognition effect can be the same as that of the model used to identify whether a picture is a sensitive picture in the prior art, that is, the binary classification model tends to identify pictures in which the area occupied by sensitive content in the picture is large, and the recognition accuracy is high. Therefore, in this embodiment, when it is determined that the area ratio between the human body in the target picture and the target picture is greater than or equal to the set threshold, picture recognition can be performed based on the binary classification model.

[0079] In one implementation, the above binary classification model can be pre-trained through the following method:

[0080] First, obtain normal pictures and sensitive pictures from various channels through technologies such as web crawlers. Among them, the quantity ratio between normal pictures and sensitive pictures can be 1:1 to ensure the balance of samples. If the quantity of sensitive pictures is small, the data volume can be expanded by means of scaling, splicing, and rotating sensitive pictures. In addition, as many sensitive pictures as possible should be pictures applicable to the online scenario (for example, sensitive pictures in the online scenario account for two-fifths of the total sample pictures), so as to ensure that the binary classification model obtained by training can be more applicable to the online scenario.

[0081] Secondly, perform model training on normal pictures and sensitive pictures to obtain a binary classification model. This binary classification model can be a neural network model or other models, and no specific limitation is made here.

[0082] After training the binary classification model, when identifying the target picture based on the binary classification model, the specific implementation method is as follows:

[0083] First, input the picture of the first human body into the binary classification model to obtain the model output result.

[0084] The picture of the first human body here can be understood as the picture obtained after splitting the first human body from the target picture. Optionally, before inputting the picture of the first human body into the binary classification model, processing such as filling white edges can be performed on the picture of the first human body so that the size of the processed picture of the first human body meets the requirements of the binary classification model for the input picture size.

[0085] The model output result of the binary classification model can be a two-dimensional vector, which includes the first probability that the picture of the first human body belongs to a sensitive picture and the second probability that the picture of the first human body belongs to a normal picture, and the sum of the first probability and the second probability is 1.

[0086] Secondly, based on the two-dimensional vector in the model output result, determine whether the target picture is a sensitive picture.

[0087] In a possible implementation, it can be determined whether the first probability that the picture of the first human body belongs to a sensitive picture is greater than or equal to the first threshold. If so, it can be determined that the picture of the first human body is a sensitive picture, and the first human body is a sensitive human body. Further, it can be determined that the target picture is a sensitive picture. If not, it can be determined that the picture of the first human body is a normal picture, and the first human body is a non-sensitive human body. The first threshold can be set after verifying the accuracy of the binary classification model. Specifically, after training the binary classification model, pictures can be used to test the recognition accuracy of the binary classification model. When testing, a suitable threshold can be selected and it can be judged how accurate the recognition result is based on this threshold. By continuously adjusting this threshold, the threshold with the maximum recognition accuracy can be obtained, and this threshold can be used as the first threshold. Of course, the first threshold can also be set according to the actual application scenario, and no specific limitation is made here.

[0088] In another possible implementation, it can also be determined whether the first probability that the picture of the first human body belongs to a sensitive picture is greater than the probability that it belongs to a normal picture. If so, it can be determined that the picture of the first human body is a sensitive picture, and the first human body is a sensitive human body. Further, it can be determined that the target picture is a sensitive picture. If not, it can be determined that the picture of the first human body is a normal picture, and the first human body is a non-sensitive human body.

[0089] After determining that the picture of the first human body is a normal picture by any of the above methods, if the target picture contains only this one first human body, it can be further determined that the target picture is a normal picture. If the target picture also contains other first human bodies, it is necessary to combine the judgment results of other first human bodies to determine whether the target picture is a sensitive picture. Specifically, if all other first human bodies are non-sensitive human bodies / the pictures of the first human bodies are all normal pictures, it can be determined that the target picture is a normal picture. If there is at least one first human body among other first human bodies that is a sensitive human body or the pictures of at least one first human body are all sensitive pictures, it can be determined that the target picture is a sensitive picture.

[0090] The human body classification model for identifying whether the target picture is a sensitive picture can be the human body classification model for identifying whether the abnormally bright area contains sensitive human bodies. The training process of this human body classification model can refer to the corresponding content described above and will not be repeated here.

[0091] When determining whether the target picture is a sensitive picture based on the human body classification model, the specific implementation method is as follows:

[0092] First, input the picture of the first human body into the human body classification model to obtain the model output result.

[0093] The picture of the first human body here can be understood as the picture obtained by splitting the first human body from the target picture. Optionally, before inputting the picture of the first human body into the human body classification model, the picture of the first human body can also be processed such as filling in the white edges to make the size of the processed picture of the first human body meet the requirements of the input picture size of the human body classification model.

[0094] The model output result of the human body classification model can be a multi-dimensional vector. The multi-dimensional vector includes the probabilities of the first human body belonging to different types of human bodies. These different types of human bodies include sensitive human bodies and non-sensitive human bodies, and the sum of the multiple probabilities included in the multi-dimensional vector is 1. For example, if the human body classification model is used to identify 5 types of human bodies (including sensitive human bodies and non-sensitive human bodies), its model output result is a 5-dimensional vector. The 5-dimensional vector includes the probabilities of the first human body belonging to these 5 types of human bodies, that is, the 5-dimensional vector includes 5 probabilities, and each probability represents the probability of the first human body belonging to a certain type of human body.

[0095] Second, based on the multi-dimensional vector in the model output result, determine whether the target picture is a sensitive picture.

[0096] Specifically, it can be determined whether the human body category corresponding to the maximum probability in the multi-dimensional vector is a sensitive human body (i.e., to determine whether the probability that the first human body belongs to a sensitive human body is the maximum probability in the multi-dimensional vector). If so, it can be determined that the first human body is a sensitive human body. Further, it can be determined that the target picture is a sensitive picture. For example, if the multi-dimensional vector is [0.1, 0.2, 0.1, 0.6, 0.1], and the human body categories corresponding to each probability are arm, calf, face, sexual organ, and thigh, it can be determined that the human body corresponding to the maximum probability of 0.6 is a sexual organ. Since the sexual organ is a sensitive organ, it can be determined that the first human body is a sensitive human body, and further it can be determined that the target picture is a sensitive picture.

[0097] Optionally, if the human body category corresponding to the maximum probability in the multi-dimensional vector is not a sensitive human body, in this case, if the target picture only contains this one first human body, it can be further determined that the target picture is a normal picture. If the target picture also contains other first human bodies, it is necessary to combine the judgment results of other first human bodies to determine whether the target picture is a sensitive picture. Specifically, if all other first human bodies are non-sensitive human bodies / the pictures of the first human bodies are all normal pictures, it can be determined that the target picture is a normal picture. If there is at least one first human body among other first human bodies that is a sensitive human body or the pictures of at least one first human body are all sensitive pictures, it can be determined that the target picture is a sensitive picture.

[0098] The embodiments of the present application can effectively identify sensitive content with a small occupied area in a picture. Especially for pictures pasted with small-area sensitive content and pictures that themselves contain small-area sensitive content, the embodiments of the present application can effectively identify the small-area sensitive content in the picture, and then determine whether the picture is a sensitive picture, improving the recognition accuracy.

[0099] To facilitate understanding of the technical solutions provided by the embodiments of the present application, in a possible implementation manner, the method for identifying sensitive pictures provided by the embodiments of the present application can be as Figure 2 shown. Figure 2 The embodiments shown may include the following steps:

[0100] S201: Obtain a target picture to be recognized.

[0101] S202: Convert the target picture into a grayscale picture, and determine the brightness abnormal area in the target picture based on the grayscale picture.

[0102] S203: Based on a pre-trained human body classification model, identify whether the brightness abnormal area contains a sensitive human body.

[0103] If it contains, execute S211. If it does not contain, S204 can be executed.

[0104] S204: Determine the human bodies included in the target picture based on the human body parsing model.

[0105] Optionally, the target picture may include at least one human body or may not include any human body. If no human body is included, it can be determined that the target picture is a normal picture. If one or more human bodies are included, S205 can be executed. In this embodiment, it is illustrated by taking the target picture including at least one human body as an example.

[0106] S205: Determine the area ratio of each human body in the target picture to the target picture.

[0107] S206: For the area ratio corresponding to any first human body, determine whether the area ratio is greater than or equal to a set threshold.

[0108] If so, execute S207; if not, execute S209.

[0109] S207: Input the picture of the first human body into the binary classification model to obtain the model output result. The model output result is a two-dimensional vector, and the two-dimensional vector includes the first probability that the picture of the first human body belongs to a sensitive picture and the second probability that it belongs to a normal picture.

[0110] S208: Determine whether the first probability is greater than or equal to the first threshold.

[0111] Optionally, it can also be determined whether the first probability is greater than the second probability. Here, it is only illustrated by taking the determination of whether the first probability is greater than or equal to the first threshold as an example.

[0112] If the determination result is yes, execute S211; if the determination result is no, execute S212.

[0113] S209: Input the picture of the first human body into the human body classification model to obtain the model output result. The model output result is a multi-dimensional vector, and the multi-dimensional vector includes the probabilities that the first human body belongs to different types of human bodies. Different types of human bodies include sensitive human bodies and non-sensitive human bodies.

[0114] S210: Determine whether the human body type corresponding to the maximum probability in the multi-dimensional vector is a sensitive human body.

[0115] If the determination result is yes, execute S211; if the determination result is no, execute S212.

[0116] S211: Determine that the target picture is a sensitive picture.

[0117] S212: If the recognition result for each first human body is that the first human body is a non-sensitive human body, determine that the target picture is a normal picture.

[0118] In the technical solution provided by the embodiment of the present application, considering that when the area occupied by sensitive content in the picture is small, it may be a small piece of sensitive content pasted into the picture or the picture itself contains a small area of sensitive content. Therefore, when identifying whether a picture is a sensitive picture, the picture can be identified based on the brightness information of the picture. In this way, for a picture pasted with sensitive content, the sensitive content in the picture can be effectively identified, and then it can be determined whether the picture is a sensitive picture, improving the recognition accuracy; for a picture without pasted sensitive content, different models can be selected to identify the picture based on the area ratio of the human body in the picture to the area of the picture. And when the area ratio is greater than or equal to the set threshold, a binary classification model is selected to identify the picture, and when the area ratio is less than the set threshold, a human body classification model is selected to identify the picture. In this way, when the picture itself contains a large area of the human body, it can be effectively identified whether the picture is a sensitive picture based on the binary classification model. When the picture itself contains a small area of sensitive content, it can be effectively identified whether the small area of the human body is a sensitive human body based on the human body classification model, and then it can be effectively identified whether the picture is a sensitive picture, improving the recognition accuracy.

[0119] The specific embodiments of the present application are described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve the desired results. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0120] Figure 3 It is a schematic structural diagram of an electronic device according to an embodiment of the present application. Please refer to Figure 3 , at the hardware level, the electronic device includes a processor, and optionally also includes an internal bus, a network interface, and a memory. Among them, the memory may include internal memory, such as high-speed random access memory (Random-Access Memory, RAM), and may also include non-volatile memory, such as at least one disk memory, etc. Of course, the electronic device may also include other hardware required for other services.

[0121] The processor, network interface, and memory can be interconnected through an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 3 only a bidirectional arrow is used in

[0122] Memory, used to store programs. Specifically, the program can include program code, and the program code includes computer operation instructions. The memory can include a memory and a non-volatile memory, and provide instructions and data to the processor.

[0123] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a recognition device for sensitive pictures at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations:

[0124] Obtain the target picture to be recognized;

[0125] Based on the brightness information of the target picture, determine whether the target picture contains pasted sensitive content;

[0126] If so, determine that the target picture is a sensitive picture;

[0127] If not, determine the area ratio of the human body in the target picture to the area of the target picture, and based on the model corresponding to the area ratio, identify whether the target picture is a sensitive picture;

[0128] Among them, when the area ratio is greater than or equal to the set threshold, the model corresponding to the area ratio is a binary classification model, and when the area ratio is less than the set threshold, the model corresponding to the area ratio is a human body classification model.

[0129] The above is as in this application Figure 3The method executed by the recognition device for sensitive pictures disclosed in the illustrated embodiments can be applied to or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit in the hardware of the processor or the instructions in the form of software. 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. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of the hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method.

[0130] The electronic device can also execute Figure 1 and Figure 2 the method, and implement the functions of the recognition device for sensitive pictures in Figure 1 and Figure 2 the illustrated embodiments. The embodiments of the present application will not be elaborated herein.

[0131] Of course, in addition to the software implementation, the electronic device of the present application does not exclude other implementation manners, such as a logic device or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, and may also be hardware or a logic device.

[0132] The embodiments of the present application also propose a computer-readable storage medium. The computer-readable storage medium stores one or more programs. The one or more programs include instructions. When the instructions are executed by a portable electronic device including multiple application programs, the portable electronic device can execute Figure 1 and Figure 2 the methods of the illustrated embodiments, and are specifically used to perform the following operations:

[0133] Obtain a target image to be recognized;

[0134] Based on the brightness information of the target image, determine whether the target image contains pasted sensitive content;

[0135] If so, determine that the target image is a sensitive image;

[0136] If not, determine the area ratio of the human body in the target image to the target image, and based on the model corresponding to the area ratio, identify whether the target image is a sensitive image;

[0137] Wherein, when the area ratio is greater than or equal to a set threshold, the model corresponding to the area ratio is a binary classification model, and when the area ratio is less than the set threshold, the model corresponding to the area ratio is a human body classification model.

[0138] Figure 4 It is a schematic structural diagram of an identification device 40 for sensitive images in an embodiment of the present application. Please refer to Figure 4 , in a software implementation manner, the sensitive image identification device 40 may include: an acquisition unit 41, a determination unit 42, a first identification unit 43, and a second identification unit 44, wherein:

[0139] The acquisition unit 41 acquires a target image to be recognized;

[0140] The determination unit 42 determines whether the target image contains pasted sensitive content based on the brightness information of the target image;

[0141] The first identification unit 43 determines that the target image is a sensitive image when the determination unit 42 determines that the target image contains pasted sensitive content;

[0142] The second identification unit 44 determines the area ratio of the human body in the target image to the target image when the determination unit 42 determines that the target image does not contain pasted sensitive content, and based on the model corresponding to the area ratio, identifies whether the target image is a sensitive image;

[0143] Wherein, when the area ratio is greater than or equal to a set threshold, the model corresponding to the area ratio is a binary classification model, and when the area ratio is less than the set threshold, the model corresponding to the area ratio is a human body classification model.

[0144] Optionally, the determination unit 42 determines whether the target image contains pasted sensitive content based on the brightness information of the target image, including:

[0145] Determine the brightness abnormal area in the target picture based on the brightness information of the target picture;

[0146] Based on the human body classification model, identify whether the brightness abnormal area contains sensitive human bodies;

[0147] If so, determine that the target picture contains pasted sensitive content;

[0148] If not, determine that the target picture does not contain pasted sensitive content.

[0149] Optionally, the determining unit 42 determines the brightness abnormal area in the target picture based on the brightness information of the target picture, including:

[0150] Convert the target picture into a grayscale picture, and the pixel value in the grayscale picture represents the brightness of the target picture;

[0151] Based on the grayscale picture, determine the first area where the brightness in the set interval in the target picture is located;

[0152] Judge whether the area ratio of the first area to the target picture is less than or equal to a set ratio;

[0153] If so, determine the first area as the brightness abnormal area.

[0154] Optionally, the human body in the target picture is obtained by performing human body detection on the target picture using a human body parsing model, and the number of human bodies in the target picture is one or more;

[0155] Among them, the second recognition unit 44 determines the area ratio of the human body in the target picture to the target picture, and based on the model corresponding to the area ratio, identifies whether the target picture is a sensitive picture, including:

[0156] Determine the area ratio of each human body in the target picture to the target picture;

[0157] For the area ratio corresponding to any first human body, based on the model corresponding to the area ratio, identify whether the target picture is a sensitive picture.

[0158] Optionally, when the model corresponding to the area ratio is a binary classification model, the second recognition unit 44 identifies whether the target picture is a sensitive picture based on the model corresponding to the area ratio, including:

[0159] Input the picture of the first human body into the binary classification model to obtain a model output result, where the model output result is a two-dimensional vector, and the two-dimensional vector includes the first probability that the picture of the first human body belongs to a sensitive picture and the second probability that it belongs to a normal picture;

[0160] If the first probability is greater than or equal to the first threshold, or the first probability is greater than the second probability, then determine that the target picture is a sensitive picture.

[0161] Optionally, when the model corresponding to the area ratio is a human body classification model, the second recognition unit 44 identifies whether the target picture is a sensitive picture based on the model corresponding to the area ratio, including:

[0162] Input the picture of the first human body into the human body classification model to obtain a model output result. The model output result is a multi-dimensional vector, and the multi-dimensional vector includes the probabilities of the first human body belonging to different types of human bodies. The different types of human bodies include sensitive human bodies and non-sensitive human bodies;

[0163] If the human body category corresponding to the maximum probability in the multi-dimensional vector is a sensitive human body, then determine that the target picture is a sensitive picture.

[0164] Optionally, after the second recognition unit 44 identifies whether the target picture is a sensitive picture based on the model corresponding to the area ratio for any area ratio corresponding to the first human body, the method further includes:

[0165] If the recognition result for each first human body is that the first human body is a non-sensitive human body, then determine that the target picture is a normal picture.

[0166] The sensitive picture recognition device 40 provided in the embodiments of the present application can also execute Figure 1 and Figure 2 the methods, and implement the functions of the sensitive picture recognition device in Figure 1 and Figure 2 the illustrated embodiments. The embodiments of the present application will not be elaborated herein.

[0167] In summary, the above are only the preferred embodiments of the present application, and are not used 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 shall be included in the protection scope of the present application.

[0168] The systems, devices, modules, or units illustrated in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.

[0169] A computer-readable medium includes both permanent and non-permanent, removable and non-removable media and can implement information storage by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transitory medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer-readable medium does not include transitory computer-readable media, such as modulated data signals and carrier waves.

[0170] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or apparatus comprising 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 apparatus. Without further limitation, an element defined by the statement "comprising an..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising the element.

[0171] Each embodiment in this application is described in a progressive 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 system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the description of the method embodiment.

Claims

1. A method for identifying sensitive pictures, characterized in that, Including: Obtain a target picture to be recognized; Based on the brightness information of the target picture, determine whether the target picture contains pasted sensitive content; If so, determine that the target picture is a sensitive picture; If not, determine the area ratio of the human body in the target picture to the target picture, and based on the model corresponding to the area ratio, identify whether the target picture is a sensitive picture; Wherein, when the area ratio is greater than or equal to a set threshold, the model corresponding to the area ratio is a binary classification model, and when the area ratio is less than the set threshold, the model corresponding to the area ratio is a human body classification model.

2. The method according to claim 1, characterized in that, Based on the brightness information of the target picture, determining whether the target picture contains pasted sensitive content includes: Based on the brightness information of the target picture, determine the brightness abnormal area in the target picture; Based on the human body classification model, identify whether the brightness abnormal area contains a sensitive human body; If so, determine that the target picture contains pasted sensitive content; If not, determine that the target picture does not contain pasted sensitive content.

3. The method according to claim 2, characterized in that Based on the brightness information of the target picture, determining the brightness abnormal area in the target picture includes: Convert the target picture into a grayscale picture, and the pixel value in the grayscale picture represents the brightness of the target picture; Based on the grayscale picture, determine the first area where the brightness in the set interval in the target picture is located; Judge whether the area ratio of the first area to the target picture is less than or equal to a set ratio; If so, determine the first area as the brightness abnormal area.

4. The method according to claim 1, wherein The human body in the target picture is obtained by performing human body detection on the target picture using a human body parsing model, and the number of human bodies in the target picture is one or more; Wherein, determining the area ratio of the human body in the target picture to the target picture, and based on the model corresponding to the area ratio, identifying whether the target picture is a sensitive picture includes: Determine the area ratio of each human body in the target picture to the target picture; For the area ratio corresponding to any first human body, based on the model corresponding to the area ratio, identify whether the target picture is a sensitive picture.

5. The method according to claim 4, characterized in that In the case where the model corresponding to the area ratio is a binary classification model, based on the model corresponding to the area ratio, identifying whether the target picture is a sensitive picture includes: Input the picture of the first human body into the binary classification model to obtain a model output result, the model output result is a two-dimensional vector, and the two-dimensional vector includes the first probability that the picture of the first human body belongs to a sensitive picture and the second probability that it belongs to a normal picture; If the first probability is greater than or equal to a first threshold, or, the first probability is greater than the second probability, determine that the target picture is a sensitive picture.

6. The method according to claim 4, wherein In the case where the model corresponding to the area ratio is a human body classification model, based on the model corresponding to the area ratio, identifying whether the target picture is a sensitive picture includes: Input the picture of the first human body into the human body classification model to obtain a model output result, where the model output result is a multi-dimensional vector, and the multi-dimensional vector includes the probabilities of the first human body belonging to different types of human bodies, and the different types of human bodies include sensitive human bodies and non-sensitive human bodies; If the human body category corresponding to the maximum probability in the multi-dimensional vector is a sensitive human body, determine that the target picture is a sensitive picture.

7. The method according to claim 4, characterized in that, After identifying whether the target picture is a sensitive picture based on the model corresponding to the area ratio for any first human body, the method further includes: If the recognition result for each first human body is that the first human body is a non-sensitive human body, determine that the target picture is a normal picture.

8. An identification device for sensitive pictures, characterized in that, Includes: An acquisition unit that acquires a target picture to be recognized; A determination unit that determines whether the target picture contains pasted sensitive content based on the brightness information of the target picture; A first recognition unit that determines that the target picture is a sensitive picture when the determination unit determines that the target picture contains pasted sensitive content; A second recognition unit that determines the area ratio of the human body in the target picture to the target picture and recognizes whether the target picture is a sensitive picture based on the model corresponding to the area ratio when the determination unit determines that the target picture does not contain pasted sensitive content; Wherein, when the area ratio is greater than or equal to a set threshold, the model corresponding to the area ratio is a binary classification model, and when the area ratio is less than the set threshold, the model corresponding to the area ratio is a human body classification model.

9. An electronic device, characterized in that, Includes: A processor; And A memory arranged to store computer-executable instructions that, when executed, cause the processor to perform the following operations: Acquire a target picture to be recognized; Determine whether the target picture contains pasted sensitive content based on the brightness information of the target picture; If so, determine that the target picture is a sensitive picture; If not, determine the area ratio of the human body in the target picture to the target picture and recognize whether the target picture is a sensitive picture based on the model corresponding to the area ratio; Wherein, when the area ratio is greater than or equal to a set threshold, the model corresponding to the area ratio is a binary classification model, and when the area ratio is less than the set threshold, the model corresponding to the area ratio is a human body classification model.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores one or more programs that, when executed by an electronic device including a plurality of application programs, cause the electronic device to perform the following method: Acquire a target picture to be recognized; Determine whether the target picture contains pasted sensitive content based on the brightness information of the target picture; If so, determine that the target picture is a sensitive picture; If not, determine the area ratio of the human body in the target picture to the target picture and recognize whether the target picture is a sensitive picture based on the model corresponding to the area ratio; Among them, when the area ratio is greater than or equal to the set threshold, the model corresponding to the area ratio is a binary classification model, and when the area ratio is less than the set threshold, the model corresponding to the area ratio is a human body classification model.

Citation Information

Patent Citations

  • Method and system for sensitive image filtering

    CN105740752A

  • Image auditing processing method and device, electronic equipment and storage medium

    CN109829069A