Target object identification method and device, equipment and medium

Through a combination of Gaussian filtering and deep learning model, human pixel segmentation, gender recognition and nudity detection are carried out, which solves the problem of inaccurate recognition of human gender and nudity in traditional methods, and achieves efficient and accurate image recognition.

CN120375415APending Publication Date: 2025-07-25WELAB INFORMATION TECH SHENZHEN LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510333737.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

Traditional image classification methods are difficult to accurately distinguish between human gender and skin nudity, especially in light changes and complex backgrounds, which leads to the flood of bad images.

Method used

Initial recognition is performed through Gaussian filtering and confidence threshold setting, human pixel segmentation, gender recognition and nudity detection are performed in combination with deep learning models, and targeted nudity judgments are performed using gender information.

Benefits of technology

It improves the accuracy and consistency of image recognition, reduces misjudgment and misjudgment, enhances the robustness and adaptability of the model, and ensures the accurate extraction and recognition efficiency of human areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120375415A_ABST
    Figure CN120375415A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of picture recognition, and discloses a target object recognition method, device and equipment and a medium, and the method comprises the steps: obtaining a to-be-recognized picture, carrying out the initial human body abnormal picture recognition of the to-be-recognized picture, and obtaining an initial recognition result; performing human body pixel segmentation on the to-be-recognized picture according to the initial recognition result to obtain a human body pixel region; performing human body gender recognition on the human body pixel region to obtain a human body gender result corresponding to the to-be-recognized picture; and performing human body exposure identification on the to-be-identified picture according to the human body gender result to obtain a target identification result. According to the invention, accurate recognition of the image target object can be effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and in particular to a method, device, equipment and medium for recognizing a target object. Background Art

[0002] With the rapid development of the Internet, image information plays an increasingly important role in people's lives. From the little bits of life shared on social media, the on-site scenes in news reports, to the dazzling product displays on e-commerce platforms, images are everywhere and have become a key carrier for people to obtain and transmit information. However, there are a large number of abnormal human body pictures with potential adverse effects on the Internet (for example, indecent or even pornographic pictures, such as vulgar photo shoots, explicit pictures wantonly spread on certain illegal forums), which have had an adverse impact on social conduct and minors.

[0003] Traditional image classification methods often have difficulty accurately distinguishing different types of pictures. Especially when dealing with human body images containing complex features such as gender and degree of skin exposure, these methods mostly rely on simple pixel comparison or basic shape recognition. In terms of gender distinction, simple pixel comparison is easily affected by light. Under strong light, the facial shadows of men increase, the pixel gray values change, and it is easy to misjudge when compared with female images; in dim light, the texture details of the delicate skin of women are lost, and the distinguishability from men drops sharply; at the same time, in some fashion show photos, models wear avant-garde and personalized clothing, and some skin is exposed. Traditional algorithms are extremely prone to misjudgment and confuse them with pornographic pictures, making it difficult to accurately distinguish, so that bad images take advantage of the situation and spread wantonly.

[0004] Therefore, how to improve the accurate recognition of image target objects has become an urgent problem to be solved. Summary of the Invention

[0005] The present invention provides a method, device, equipment and medium for recognizing a target object, and its main purpose is to solve the technical problem of inaccurate recognition of image target objects.

[0006] In a first aspect, to achieve the above object, a method for recognizing a target object provided by the present invention includes:

[0007] Obtain a picture to be recognized, and perform initial recognition of abnormal human body pictures on the picture to be recognized to obtain an initial recognition result;

[0008] Perform human pixel segmentation on the picture to be recognized according to the initial recognition result to obtain a human pixel region;

[0009] Perform human gender recognition on the human pixel region to obtain a human gender result corresponding to the picture to be recognized;

[0010] Perform human body nudity recognition on the picture to be recognized according to the human gender result, and obtain a target recognition result.

[0011] In a second aspect, the present invention further provides an object recognition device, including:

[0012] A picture recognition module, configured to obtain a picture to be recognized, perform initial human body abnormal picture recognition on the picture to be recognized, and obtain an initial recognition result;

[0013] A pixel segmentation module, configured to perform human body pixel segmentation on the picture to be recognized according to the initial recognition result, and obtain a human body pixel region;

[0014] A gender recognition module, configured to perform human body gender recognition on the human body pixel region, and obtain a human body gender result corresponding to the picture to be recognized;

[0015] A nudity recognition module, configured to perform human body nudity recognition on the picture to be recognized according to the human body gender result, and obtain a target recognition result.

[0016] In a third aspect, the present invention further provides an electronic device, where the electronic device includes:

[0017] At least one processor; and,

[0018] A memory communicatively connected to the at least one processor; wherein,

[0019] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the object recognition method described above.

[0020] In a fourth aspect, the present invention further provides a computer-readable storage medium, where at least one computer program is stored in the computer-readable storage medium, and the at least one computer program is executed by a processor in an electronic device to implement the object recognition method described above.

[0021] In the embodiments of the present invention, by performing Gaussian filtering on the picture to be recognized, the high quality and accuracy of the picture to be recognized are ensured. By setting a confidence threshold and performing secondary recognition processing, pornographic pictures and non-pornographic pictures can be recognized more accurately, reducing the situations of misjudgment and missed judgment, and at the same time enhancing the robustness and adaptability of the model; according to the initial recognition result, human pixel segmentation is performed on the picture to be recognized, ensuring the accurate extraction of the human body area, reducing the need for manual intervention, improving the efficiency and accuracy of image processing, and providing a reliable data basis for subsequent image recognition; by combining machine learning and image processing technologies, the gender information of the human body can be quickly and accurately recognized from the picture, improving the accuracy and consistency of recognition, and at the same time improving the efficiency of gender recognition; by combining the human gender information, the degree of nudity of the human body in the picture to be recognized can be judged more accurately. There are differences in the nudity standards for human bodies of different genders, and there are differences in the acceptance of nudity between men and women. Targeted nudity recognition based on gender can avoid misjudgment and missed judgment and improve the accuracy and reliability of recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention, and those of ordinary skill in the art can also obtain other drawings without creative efforts based on these drawings.

[0023] Figure 1 It is a schematic flowchart of a method for recognizing a target object provided by an embodiment of the present invention;

[0024] Figure 2 It is a schematic block diagram of a device for recognizing a target object provided by an embodiment of the present invention;

[0025] Figure 3 It is a schematic structural diagram of an electronic device for implementing a method for recognizing a target object provided by an embodiment of the present invention;

[0026] Figure 4 It is another schematic structural diagram of an electronic device for implementing a method for recognizing a target object provided by an embodiment of the present invention.

[0027] The realization, functional features and advantages of the objectives of the present invention will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0028] In order to enable those skilled in the art to better understand the technical solutions of the present disclosure, and to fully understand and implement the process of how the present disclosure uses technical means to solve technical problems and achieve corresponding technical effects, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only a part of the embodiments of the present disclosure, rather than all the embodiments. The embodiments of the present disclosure and each feature in the embodiments can be combined with each other on the premise of not conflicting, and the formed technical solutions are all within the protection scope of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present disclosure.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present disclosure described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, device, product or equipment that includes a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or equipment.

[0030] The embodiments of the present application provide a method for identifying a target object. The execution subject of the method for identifying a target object includes, but is not limited to, at least one of electronic devices such as a server, a terminal, etc. that can be configured to execute the device provided in the embodiments of the present application. In other words, the method for identifying a target object can be executed by software or hardware installed on a terminal device or a server device. The server includes, but is not limited to: a single server, a server cluster, a cloud server, or a cloud server cluster, etc. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms.

[0031] Refer to Figure 1 As shown, it is a schematic flowchart of a method for identifying a target object provided by an embodiment of the present invention. In this embodiment, the method for identifying a target object includes:

[0032] S1. Obtain the image to be recognized, perform initial human abnormal image recognition on the image to be recognized, and obtain an initial recognition result.

[0033] In the embodiments of the present invention, the image to be recognized can be obtained through a preset image database or a related website, and initial human abnormal image recognition is performed on the image to be recognized, including image preprocessing, deep learning technology, etc., so as to obtain an initial recognition result.

[0034] In the embodiments of the present invention, programming languages such as Python and Java can be used to connect to the preset image database through the HTTP protocol, send an HTTP request to obtain the image to be recognized within the reference time period, so as to obtain the image to be recognized.

[0035] In addition, the uniform resource locator of the image database can be opened through a preset crawler tool to capture the image to be recognized.

[0036] In the embodiments of the present invention, the performing initial human abnormal image recognition on the image to be recognized and obtaining an initial recognition result includes:

[0037] Perform Gaussian filtering on the image to be recognized to obtain a target image to be recognized;

[0038] Perform image recognition on the target image to be recognized according to a preset pornographic image recognition model to obtain the image confidence corresponding to the target image to be recognized;

[0039] Use a preset pornographic image confidence and a preset normal image confidence to compare with the image confidence to obtain the initial recognition result of the image to be recognized.

[0040] Specifically, perform Gaussian filtering on the image to be recognized to smooth the image, reduce noise, and improve the accuracy and stability of subsequent recognition. Use a pre-trained pornographic image recognition model to recognize the target image to be recognized. The pornographic image recognition model is usually constructed based on deep learning technology, such as a convolutional neural network (CNN), extract features from the image to be recognized, and judge whether the image contains pornographic content according to these features. The pornographic image recognition model outputs the image confidence, and judge the probability that the image to be recognized belongs to the pornographic category or the normal category according to the image confidence, so as to obtain the initial recognition result.

[0041] In the embodiments of the present invention, the performing Gaussian filtering on the image to be recognized to obtain a target image to be recognized includes:

[0042] Obtain the size and standard deviation of a preset Gaussian kernel;

[0043] Generate a Gaussian kernel matrix according to the size of the Gaussian kernel and the standard deviation;

[0044] Fill the edge pixels of the picture to be recognized according to the Gaussian kernel matrix to obtain a filled picture to be recognized;

[0045] Perform convolution using the Gaussian kernel and the filled picture to be recognized to obtain a number of pixel values;

[0046] Pool the number of pixel values into a target picture to be recognized.

[0047] Specifically, denoise the picture to be recognized using Gaussian filtering. Among them, the size of the Gaussian kernel depends on the required smoothness of the picture to be recognized after denoising and the size of the picture to be recognized. The standard deviation of the Gaussian kernel affects the smoothness of the picture to be recognized after denoising. The larger the standard deviation of the Gaussian kernel, the better the smoothing effect. Before performing Gaussian filtering on the picture to be recognized, it is necessary to fill the edge pixels of the picture to be recognized to ensure that the picture to be recognized has complete edge pixels, so that the Gaussian kernel can accurately cover all parts of the picture to be recognized.

[0048] Furthermore, the convolution operation is to traverse the filled picture to be recognized with the Gaussian kernel. Each time, the kernel is covered on a local area of the picture to be recognized. The central element of the Gaussian kernel matrix corresponds to the central pixel of the filled picture to be recognized. Then, the Gaussian kernel matrix and the corresponding pixels in the filled picture to be recognized are weighted and averaged. Finally, the weighted average results are added to obtain a number of pixel values, that is, the convolution result. Pool the number of pixel values to obtain the target picture to be recognized.

[0049] In the embodiment of the present invention, the comparing the picture confidence with the preset pornographic picture confidence and the preset normal picture confidence to obtain the initial recognition result of the picture to be recognized includes:

[0050] If the picture confidence is greater than the preset pornographic picture confidence, it is determined that the picture to be recognized is a pornographic picture;

[0051] If the picture confidence is less than the preset normal picture confidence, it is determined that the picture to be recognized is a normal picture;

[0052] If the picture confidence is within the range of the preset pornographic picture confidence and the preset normal picture confidence, it is determined that the picture to be recognized is a picture for secondary recognition.

[0053] Among them, the picture for secondary recognition refers to the picture to be recognized for subsequent human gender recognition and human nudity recognition.

[0054] Specifically, the image confidence represents the probability or confidence level that the pornographic recognition model believes the image to be recognized belongs to the pornographic category. The image confidence is compared with two preset thresholds: one is the preset pornographic image confidence threshold for identifying images that clearly contain pornographic content, and the other is the preset normal image confidence threshold for identifying images that clearly do not contain pornographic content.

[0055] For example, the preset pornographic image confidence threshold is 0.12, and the preset normal image confidence threshold is 0.06. If the image confidence of the image to be recognized is 0.04, it is determined that the image to be recognized is a normal image; if the image confidence of the image to be recognized is 0.20, it is determined that the image to be recognized is a pornographic image; if the image confidence of the image to be recognized is 0.10, subsequent secondary recognition is performed on the image to be recognized.

[0056] In the embodiment of the present invention, by performing Gaussian filtering on the image to be recognized to ensure the high quality and accuracy of the image to be recognized, and by setting confidence thresholds and performing secondary recognition processing, pornographic images and non-pornographic images can be recognized more accurately, reducing the situations of misjudgment and missed judgment, and at the same time enhancing the robustness and adaptability of the model.

[0057] S2. Perform human pixel segmentation on the image to be recognized according to the initial recognition result to obtain a human pixel region.

[0058] In the embodiment of the present invention, based on the initial recognition result, precise human pixel segmentation is performed on the image to be recognized. If it cannot be initially determined whether the image to be recognized contains pornographic content, that is, the image to be recognized is a secondary recognition image, human pixel segmentation is started. The human pixel segmentation uses edge detection technology to quickly lock the preliminary region suspected of being a human in the image to be recognized and perform appropriate pixel expansion to obtain a human pixel region, ensuring the accuracy and reliability of subsequent recognition.

[0059] In the embodiment of the present invention, the performing human pixel segmentation on the image to be recognized according to the initial recognition result to obtain a human pixel region includes:

[0060] Perform edge scanning on the image to be recognized according to the initial recognition result to obtain the first column edge and the first row edge of the human pixel region;

[0061] Expand the pixel points of the first column edge and the first row edge respectively to obtain the second column edge and the second row edge of the human pixel region;

[0062] Based on the preset standard width of the human pixel region, correct the second column edge and the second row edge respectively to obtain the column segmentation position and the row segmentation position;

[0063] Perform human pixel segmentation on the image to be recognized according to the column segmentation position and the row segmentation position, and obtain the human pixel region.

[0064] Specifically, perform boundary scanning on the image to be recognized according to the initial recognition result to initially locate the region in the image to be recognized that may contain a human body, and identify the starting boundaries of the pixel set that conforms to the human body characteristics, that is, the first column boundary and the first row boundary. Expand the pixel points of the first column boundary and the first row boundary to ensure that the human body region can be completely included and avoid pixel loss caused by inaccurate boundary positioning. For example, one pixel point can be expanded to obtain the second column boundary and the second row boundary of the human pixel region, and then based on the preset standard width of the human pixel region, correct the second column boundary and the second row boundary respectively, so as to obtain the column segmentation position and the row segmentation position of the human pixel region, and thus obtain the human pixel region.

[0065] In the embodiment of the present invention, performing human pixel segmentation on the image to be recognized according to the initial recognition result ensures the accurate extraction of the human body region, reduces the need for manual intervention, improves the efficiency and accuracy of image processing, and provides a reliable data basis for subsequent image recognition.

[0066] S3. Perform human gender recognition on the human pixel region to obtain the human gender result corresponding to the image to be recognized.

[0067] In the embodiment of the present invention, use a deep learning algorithm to perform convolutional pooling processing on the human pixel region to capture subtle difference features related to gender, and perform dimensional compression on the relevant features to obtain gender feature values of different genders. Normalize according to the gender feature values and a preset gender classification function, so as to obtain the human gender result of the image to be recognized.

[0068] In the embodiment of the present invention, the performing human gender recognition on the human pixel region to obtain the human gender result corresponding to the image to be recognized includes:

[0069] Convert the human pixel region into a matrix form to obtain a portrait image matrix;

[0070] Use the feature extraction network in a preset gender recognition model to perform convolutional pooling on the portrait image matrix to obtain a convolutional pooling matrix;

[0071] Perform self-attention weighting on the convolutional pooling matrix to obtain a weighted feature matrix;

[0072] Perform dimensional compression on the weighted feature matrix to obtain gender feature values of different genders;

[0073] Normalize the gender feature values of each gender according to all the said gender feature values and a preset classification function to obtain the gender recognition probability corresponding to the gender.

[0074] Determine the human gender result corresponding to the picture to be recognized according to the gender recognition probability.

[0075] Among them, the gender recognition model may include an image preprocessing module, a convolutional pooling module, and a classification and recognition module. The image preprocessing module refers to preprocessing the picture to be recognized, such as denoising, enhancing contrast, adjusting the size, etc., to improve the accuracy and efficiency of subsequent processing; the convolutional pooling module refers to using deep learning algorithms such as convolutional neural network (CNN) to perform convolutional pooling on the picture to be recognized, and performing self-attention weighting, dimension compression and other operations to obtain the gender feature values of different genders; the classification and recognition module refers to normalizing the gender feature values of each gender according to all the gender feature values and a preset classification function such as support vector machine to obtain the gender recognition probability corresponding to the gender, so as to obtain the human gender result corresponding to the picture to be recognized.

[0076] Specifically, convert the human pixel region into a two-dimensional matrix form, that is, a portrait picture matrix, and each element in the matrix represents a pixel value in the picture; use the feature extraction network (such as convolutional neural network CNN) in the preset gender recognition model to perform convolution and pooling operations on the portrait picture matrix, extract local features in the portrait picture matrix through convolution operations, and then reduce the dimension of the feature map through pooling operations to obtain a convolutional pooling matrix. Use the self-attention mechanism to assign different weights to each feature of the convolutional pooling matrix to emphasize the features more important for gender recognition. Through self-attention weighting, obtain a weighted feature matrix, and perform dimension compression on the weighted feature matrix to reduce the amount of calculation and extract key information, that is, obtain the gender feature values representing different genders. The gender feature values reflect the feature intensities related to different genders in the human pixel region.

[0077] Further, normalize the gender feature values of each gender according to all the gender feature values and a preset classification function such as support vector machine to obtain the gender recognition probability corresponding to the gender. Determine the human gender result corresponding to the picture to be recognized according to the gender recognition probability and a preset gender recognition threshold.

[0078] For example, a gender recognition threshold can be preset to 0.5 to determine whether the gender recognition probability is high enough to determine the gender. When there is a gender recognition probability greater than the gender recognition threshold, the gender corresponding to the gender recognition probability is determined as the gender recognition result. If the gender recognition probabilities of all genders are not greater than the gender recognition threshold, it means that the gender characteristics of the human body in the picture to be recognized are not obvious. At this time, all genders can be summarized as the gender recognition result such as "gender cannot be determined" or list all genders and their probabilities.

[0079] In the embodiments of the present invention, by combining machine learning and image processing technologies, the gender information of the human body can be quickly and accurately recognized from pictures without manual intervention, improving the accuracy and consistency of recognition, and at the same time improving the efficiency of gender recognition.

[0080] S4. Perform human body nudity recognition on the picture to be recognized according to the human body gender result to obtain a target recognition result.

[0081] In the embodiments of the present invention, according to the gender recognition result, the picture to be recognized is further analyzed using a preset nude skin degree detection model. The nude skin degree detection model can calculate a nude score to quantify the nude degree of the human body in the picture to be recognized, and then determine the target recognition result of the picture to be recognized according to the preset nude threshold and the calculated nude score.

[0082] In the embodiments of the present invention, the performing human body nudity recognition on the picture to be recognized according to the human body gender result to obtain a target recognition result includes:

[0083] Determine the nude score of the picture to be recognized using a preset nude skin degree detection model;

[0084] Based on the human body gender result, determine the target recognition result of the picture to be recognized according to the preset nude threshold and the nude score.

[0085] Among them, the nude skin degree detection model can include an image preprocessing module, a feature extraction module, and a classification and recognition module. The image preprocessing module refers to preprocessing the picture to be recognized, such as denoising, enhancing contrast, adjusting the size, etc., to improve the accuracy and efficiency of subsequent processing; the feature extraction module refers to using deep learning algorithms such as convolutional neural network (CNN) to extract skin-related features from the preprocessed picture to be recognized, such as color, texture, shape, etc. According to the extracted features, a classification algorithm such as support vector machine is used to calculate the nude score of the nude skin degree of the human body in the picture to be recognized.

[0086] Specifically, the exposed skin degree detection model is used to perform human body exposure recognition on the picture to be recognized, obtain the area of the exposed skin in the picture to be recognized, that is, the exposure degree, and give an exposure score. The exposure score is a quantitative index used to represent the exposure degree of the human body in the picture to be recognized. Based on the recognized gender result and the calculated exposure score, the target recognition result of the picture to be recognized is determined according to a preset exposure threshold.

[0087] In an embodiment of the present invention, when the human body gender result is male, determining the target recognition result of the picture to be recognized according to the preset exposure threshold and the exposure score includes:

[0088] Judge whether the exposure score is greater than a preset first exposure threshold;

[0089] If the exposure score is greater than or equal to the first exposure threshold, it is determined that the picture to be recognized is a pornographic picture;

[0090] If the exposure score is less than the first exposure threshold, it is determined that the picture to be recognized is a normal picture.

[0091] In an embodiment of the present invention, when the human body gender result is female, determining the target recognition result of the picture to be recognized according to the preset exposure threshold and the exposure score includes:

[0092] When the exposure score is greater than or equal to the second exposure threshold, it is determined that the picture to be recognized is a pornographic picture;

[0093] When the exposure score is less than the second exposure threshold and greater than the third exposure threshold, it is determined that the picture to be recognized is an indecent picture;

[0094] If the exposure score is less than or equal to the third exposure threshold, it is determined that the picture to be recognized is a normal picture.

[0095] For example, it is preset that the value ranges of the second exposure threshold and the third exposure threshold are both [0, 1]. The second exposure threshold can be 0.60, and the third exposure threshold can be 0.40. If the exposure score of the picture to be recognized is 0.80, it is determined that the picture to be recognized is a pornographic picture; if the exposure score of the picture to be recognized is 0.20, it is determined that the picture to be recognized is a normal picture; if the exposure score of the picture to be recognized is 0.50, the picture to be recognized is an indecent picture.

[0096] In the embodiments of the present invention, by combining human gender information, the degree of nudity of the human body in the picture to be recognized can be judged more accurately. There are differences in the nudity standards for human bodies of different genders, and there are differences in the acceptance of nudity between men and women. Conducting targeted nudity recognition according to gender can avoid misjudgment and missed judgment and improve the accuracy of recognition.

[0097] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.

[0098] As Figure 2 shown, it is a functional module diagram of an object recognition device provided by an embodiment of the present invention.

[0099] In the embodiments of the present disclosure, an object recognition device is provided. This object recognition device corresponds one-to-one with the object recognition method in the above embodiment. As Figure 2 shown, this object recognition device 100 can be installed in an electronic device. According to the functions realized, the object recognition device 100 includes a picture recognition module 101, a pixel segmentation module 102, a gender recognition module 103, and a nudity recognition module 104. The detailed description of each functional module is as follows:

[0100] The picture recognition module 101 is used to obtain the picture to be recognized and perform initial human abnormal picture recognition on the picture to be recognized to obtain an initial recognition result;

[0101] The pixel segmentation module 102 is used to perform human pixel segmentation on the picture to be recognized according to the initial recognition result to obtain a human pixel region;

[0102] The gender recognition module 103 is used to perform human gender recognition on the human pixel region to obtain the human gender result corresponding to the picture to be recognized;

[0103] The nudity recognition module 104 is used to perform human nudity recognition on the picture to be recognized according to the human gender result to obtain a target recognition result.

[0104] In one embodiment, when the picture recognition module 101 performs initial human abnormal picture recognition on the picture to be recognized to obtain an initial recognition result, it is used to:

[0105] Perform Gaussian filtering on the picture to be recognized to obtain a target picture to be recognized;

[0106] Perform picture recognition on the target picture to be recognized according to a preset pornographic picture recognition model to obtain the picture confidence corresponding to the target picture to be recognized;

[0107] Compare the preset pornographic picture confidence level and the preset normal picture confidence level with the picture confidence level to obtain the initial recognition result of the picture to be recognized.

[0108] In one embodiment, when the picture recognition module 101 performs Gaussian filtering on the picture to be recognized to obtain the target picture to be recognized, it is used for:

[0109] Obtain the size and standard deviation of the preset Gaussian kernel;

[0110] Generate a Gaussian kernel matrix according to the size of the Gaussian kernel and the standard deviation;

[0111] Fill the edge pixels of the picture to be recognized according to the Gaussian kernel matrix to obtain the filled picture to be recognized;

[0112] Perform convolution on the filled picture to be recognized using the Gaussian kernel to obtain a number of pixel values;

[0113] Pool the number of pixel values into the target picture to be recognized.

[0114] In one embodiment, when the picture recognition module 101 performs comparison according to the picture confidence level with the preset pornographic picture confidence level and the preset normal picture confidence level to obtain the initial recognition result of the picture to be recognized, it is used for:

[0115] If the picture confidence level is greater than the preset pornographic picture confidence level, determine that the picture to be recognized is a pornographic picture;

[0116] If the picture confidence level is less than the preset normal picture confidence level, determine that the picture to be recognized is a normal picture;

[0117] If the picture confidence level is within the range of the preset pornographic picture confidence level and the preset normal picture confidence level, determine that the picture to be recognized is a picture for secondary recognition.

[0118] In one embodiment, when the pixel segmentation module 102 performs human pixel segmentation on the picture to be recognized according to the initial recognition result to obtain the human pixel region, it is used for:

[0119] Perform boundary scanning on the picture to be recognized according to the initial recognition result to obtain the first column boundary and the first row boundary of the human pixel region;

[0120] Expand the pixel points of the first column boundary and the first row boundary respectively to obtain the second column boundary and the second row boundary of the human pixel region;

[0121] Based on the preset standard width of the human pixel region, correct the second column boundary and the second row boundary respectively to obtain the column segmentation position and the row segmentation position;

[0122] Perform human pixel segmentation on the picture to be recognized according to the column segmentation position and the row segmentation position to obtain the human pixel region.

[0123] In one embodiment, when the gender recognition module 103 performs human gender recognition on the human pixel region to obtain the human gender result corresponding to the picture to be recognized, it is used for:

[0124] Convert the human pixel region into a matrix form to obtain a portrait picture matrix;

[0125] Perform convolutional pooling on the portrait picture matrix by using the feature extraction network in the preset gender recognition model to obtain a convolutional pooling matrix;

[0126] Perform self-attention weighting on the convolutional pooling matrix to obtain a weighted feature matrix;

[0127] Perform dimensionality compression on the weighted feature matrix to obtain gender feature values of different genders;

[0128] Normalize the gender feature values of each gender according to all the gender feature values and a preset classification function to obtain the gender recognition probability of the corresponding gender;

[0129] Determine the human gender result corresponding to the picture to be recognized according to the gender recognition probability.

[0130] In one embodiment, when the nudity recognition module 104 performs human nudity recognition on the picture to be recognized according to the human gender result to obtain the target recognition result, it is used for:

[0131] Use the preset nude skin degree detection model to determine the nude score of the picture to be recognized;

[0132] Based on the human gender result, determine the target recognition result of the picture to be recognized according to a preset nude threshold and the nude score.

[0133] In one embodiment, when the nudity recognition module 104 performs determining the target recognition result of the picture to be recognized according to the preset nude threshold and the nude score, it is used for:

[0134] Judge whether the nude score is greater than a preset first nude threshold;

[0135] If the nude score is greater than or equal to the first nude threshold, then determine that the picture to be recognized is a pornographic picture;

[0136] If the nude fraction is less than the first nude threshold, it is determined that the picture to be recognized is a normal picture.

[0137] In one embodiment, when the nude recognition module 104 executes to determine the target recognition result of the picture to be recognized according to the preset nude threshold and the nude fraction, it is used for:

[0138] When the nude fraction is greater than or equal to the second nude threshold, it is determined that the picture to be recognized is a pornographic picture;

[0139] When the nude fraction is less than the second nude threshold and greater than the third nude threshold, it is determined that the picture to be recognized is an indecent picture;

[0140] If the nude fraction is less than or equal to the third nude threshold, it is determined that the picture to be recognized is a normal picture.

[0141] In the present invention, for an object recognition device, by performing Gaussian filtering on the picture to be recognized to ensure the high quality and accuracy of the picture to be recognized, by setting a confidence threshold and performing secondary recognition processing, pornographic pictures and non-pornographic pictures can be recognized more accurately, reducing the situations of misjudgment and missed judgment, and at the same time enhancing the robustness and adaptability of the model; performing human pixel segmentation on the picture to be recognized according to the initial recognition result ensures the accurate extraction of the human body area, reduces the need for manual intervention, improves the efficiency and accuracy of image processing, and provides a reliable data basis for subsequent image recognition; by combining machine learning and image processing technologies, the gender information of the human body can be quickly and accurately recognized from the picture, improving the accuracy and consistency of recognition, and at the same time improving the efficiency of gender recognition; by combining the human gender information, the nude degree of the human body in the picture to be recognized can be judged more accurately. There are differences in the nude standards for human bodies of different genders, and there are differences in the acceptance of nudity between men and women. Performing targeted nude recognition according to gender can avoid misjudgment and missed judgment and improve the accuracy and reliability of recognition. The specific limitations on an object recognition device can refer to the limitations on an object recognition method in the above text, which will not be elaborated here. Each module in the above object recognition device can be implemented in whole or in part by software, hardware and their combination. The above modules can be embedded in the processor of the computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.

[0142] In one embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 3As shown in the figure. The computer device includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the server side of an object recognition method.

[0143] In one embodiment, a computer device is provided. The computer device can be a client, and its internal structure diagram can be as Figure 4 As shown in the figure. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server through a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the client side of an object recognition method.

[0144] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented:

[0145] Obtain an image to be recognized, perform initial human abnormal image recognition on the image to be recognized, and obtain an initial recognition result;

[0146] Perform human pixel segmentation on the image to be recognized according to the initial recognition result to obtain a human pixel region;

[0147] Perform human gender recognition on the human pixel region to obtain a human gender result corresponding to the image to be recognized;

[0148] Perform human nudity recognition on the image to be recognized according to the human gender result to obtain a target recognition result.

[0149] In several embodiments provided by the present invention, it should be understood that the disclosed devices and apparatuses can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division, and there can be other division methods in actual implementation.

[0150] In addition, in each embodiment of the present invention, each functional module can be integrated into a processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware, or in the form of a combination of hardware and software functional modules.

[0151] Therefore, from any perspective, the embodiments should be regarded as exemplary and non-restrictive. The scope of the present invention is defined by the appended claims rather than the above description. Therefore, all changes falling within the meaning and scope of the equivalent elements of the claims are intended to be embraced within the present invention. Any reference signs in the claims should not be construed as limiting the claimed rights.

[0152] For those skilled in the art, it is obvious that the present invention is not limited to the details of the above-mentioned exemplary embodiments, and can be implemented in other specific forms without departing from the spirit or basic characteristics of the present invention.

[0153] In some embodiments of this embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and characterized in that when the computer program is executed by a processor, the steps of the method described in the above embodiment are implemented.

[0154] The readable storage medium described in the present invention stores a computer program, and when the computer program is executed by a processor of an electronic device, it can implement:

[0155] Obtain a picture to be recognized, perform initial human abnormal picture recognition on the picture to be recognized, and obtain an initial recognition result;

[0156] Perform human pixel segmentation on the picture to be recognized according to the initial recognition result to obtain a human pixel region;

[0157] Perform human gender recognition on the human pixel region to obtain a human gender result corresponding to the picture to be recognized;

[0158] Perform human nudity recognition on the picture to be recognized according to the human gender result to obtain a target recognition result.

[0159] It should be noted that for the functions or steps that the above-mentioned computer-readable storage medium or computer device can achieve, reference can be made to the relevant descriptions on the server side and the client side in the foregoing method embodiments. To avoid repetition, they will not be described in detail here.

[0160] The computer-readable storage medium may also store at least one computer-executable program / instructions, such as computer-readable instructions. The computer-readable storage medium includes, but is not limited to, for example, volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory, etc. The computer-readable storage medium may include, for example, read-only memory (ROM), hard disk, flash memory, etc. For example, the non-transitory computer-readable storage medium may be connected to a computing device such as a computer. Then, when the computing device runs the computer-readable instructions stored on the computer-readable storage medium, the various methods described above may be performed.

[0161] In addition, the computer device may also include (but is not limited to) a data bus, an input / output (I / O) bus, a display, and input / output devices (such as a keyboard, a mouse, a speaker, etc.).

[0162] The processor may communicate with external devices via the I / O bus through a wired or wireless network.

[0163] In one embodiment, the at least one computer-executable instruction may also be compiled into or constitute a software product / computer program product, where when one or more computer-executable instructions are run by a processor, the steps of various functions and / or methods in the embodiments described in the present technology are performed.

[0164] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided in the present application can include non-volatile and / or volatile memories. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and Rambus dynamic RAM (RDRAM), etc.

[0165] Those skilled in the art can clearly understand that for the convenience and brevity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the system is divided into different functional units or modules to complete all or part of the functions described above.

[0166] In the embodiments provided in the present disclosure, it should be understood that the disclosed apparatus and method can also be implemented in other ways. The system embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of apparatuses, methods, and computer program products according to multiple embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the above-mentioned module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0167] It should be noted that in the present disclosure, the term "comprising", "including", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article, or device. Without further limitation, the elements defined by the statement "comprising one..." do not exclude the existence of additional identical elements in the process, method, article, or device comprising the elements.

[0168] Although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.

[0169] It should be noted that the above-described embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; if non-company software tools or components appear in the embodiments of the present application, they are only used for example introduction and do not represent actual use.

Claims

1. A method for identifying a target object, characterized in that, The method includes: Obtain the picture to be recognized, perform initial human abnormal picture recognition on the picture to be recognized, and obtain an initial recognition result; Perform human pixel segmentation on the picture to be recognized according to the initial recognition result to obtain a human pixel region; Perform human gender recognition on the human pixel region to obtain the human gender result corresponding to the picture to be recognized; Perform human nudity recognition on the picture to be recognized according to the human gender result to obtain a target recognition result.

2. The object recognition method according to claim 1, characterized in that The performing initial human abnormal picture recognition on the picture to be recognized and obtaining an initial recognition result includes: Perform Gaussian filtering on the picture to be recognized to obtain a target picture to be recognized; Perform picture recognition on the target picture to be recognized according to a preset pornographic picture recognition model to obtain the picture confidence corresponding to the target picture to be recognized; Compare the picture confidence with a preset pornographic picture confidence and a preset normal picture confidence to obtain the initial recognition result of the picture to be recognized.

3. The object recognition method according to claim 2, characterized in that, The comparing the picture confidence with a preset pornographic picture confidence and a preset normal picture confidence to obtain the initial recognition result of the picture to be recognized includes: If the picture confidence is greater than the preset pornographic picture confidence, determine that the picture to be recognized is a pornographic picture; If the picture confidence is less than the preset normal picture confidence, determine that the picture to be recognized is a normal picture; If the picture confidence is within the range of the preset pornographic picture confidence and the preset normal picture confidence, determine that the picture to be recognized is a picture for secondary recognition.

4. The object recognition method according to claim 1, wherein The performing human pixel segmentation on the picture to be recognized according to the initial recognition result to obtain a human pixel region includes: Perform boundary scanning on the picture to be recognized according to the initial recognition result to obtain the first column boundary and the first row boundary of the human pixel region; Expand the pixel points of the first column boundary and the first row boundary respectively to obtain the second column boundary and the second row boundary of the human pixel region; Based on the preset standard width of the human pixel region, correct the second column boundary and the second row boundary respectively to obtain the column segmentation position and the row segmentation position; Perform human pixel segmentation on the picture to be recognized according to the column segmentation position and the row segmentation position to obtain a human pixel region.

5. The object recognition method according to claim 1, characterized in that, The performing human gender recognition on the human pixel region to obtain the human gender result corresponding to the picture to be recognized includes: Convert the human pixel region into a matrix form to obtain a portrait picture matrix; Perform convolutional pooling on the portrait picture matrix by using a feature extraction network in a preset gender recognition model to obtain a convolutional pooling matrix; Perform self-attention weighting on the convolutional pooling matrix to obtain a weighted feature matrix; Perform dimension compression on the weighted feature matrix to obtain gender feature values of different genders; Normalize the gender feature values of each gender according to all the gender feature values and a preset classification function to obtain the gender recognition probabilities corresponding to the genders; Determine the human gender result corresponding to the picture to be recognized according to the gender recognition probabilities.

6. The object recognition method according to claim 1, characterized in that Performing human body nudity recognition on the to-be-recognized picture according to the human gender result to obtain a target recognition result, including: Determining the nudity score of the to-be-recognized picture by using a preset nudity skin degree detection model; Based on the human gender result, determining the target recognition result of the to-be-recognized picture according to a preset nudity threshold and the nudity score.

7. The object recognition method according to claim 6, characterized in that, The determining the target recognition result of the to-be-recognized picture according to the preset nudity threshold and the nudity score includes: Judging whether the nudity score is greater than a preset first nudity threshold; If the nudity score is greater than or equal to the first nudity threshold, determining that the to-be-recognized picture is a pornographic picture; If the nudity score is less than the first nudity threshold, determining that the to-be-recognized picture is a normal picture.

8. An object recognition device, characterized in that, The device includes: A picture recognition module, configured to obtain a to-be-recognized picture and perform initial human body abnormal picture recognition on the to-be-recognized picture to obtain an initial recognition result; A pixel segmentation module, configured to perform human body pixel segmentation on the to-be-recognized picture according to the initial recognition result to obtain a human body pixel region; A gender recognition module, configured to perform human body gender recognition on the human body pixel region to obtain the human gender result corresponding to the to-be-recognized picture; A nudity recognition module, configured to perform human body nudity recognition on the to-be-recognized picture according to the human gender result to obtain a target recognition result.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the target object recognition method according to any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the target object recognition method according to any one of claims 1 to 7.