Push icon generation method, device, electronic device and storage medium

By detecting the face and upper body of the pictures in the message push, and determining the icon with high correlation as push icons, the problem of insufficient correlation between icons and content in the prior art is solved, and the push effect is significantly improved.

CN114491240BActive Publication Date: 2025-01-10SO-YOUNG INT INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111678884.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-31
Publication Date
2025-01-10
Estimated Expiration
2041-12-31

AI Technical Summary

Technical Problem

The icons in existing messages push are less relevant to the content, resulting in limited push effect and it is difficult to attract users' attention.

Method used

By obtaining all the pictures in the information to be pushed, face detection and upper body detection are performed, and push icons are determined based on the detection results to ensure that the icons are highly correlated with the content. The specific steps include detecting the integrity of facial features on the face containing the face, detecting the upper body skin area of ​​the face without the face, and selecting an icon with high confidence and relevance as the push icon.

Benefits of technology

Improve the relevance of push icons and content, enhance the attractiveness of user clicks, and thus improve the push effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114491240B_ABST
    Figure CN114491240B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, electronic device and storage medium for generating a push icon. The method includes: obtaining all pictures in the information to be pushed; performing face detection on each of the pictures; wherein the detection result includes that all pictures contain at least one face or that all pictures do not contain faces; and determining a push icon for the information to be pushed based on the detection result. Through the present application, different icons can be configured for different push contents, and the icons and contents have a strong correlation, which is easier to attract user clicks, thereby improving the push effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of mobile push technology, and in particular to a push icon generation method, device, electronic device and storage medium. Background Art

[0002] Mobile push is a mobile message push service provided to mobile developers. By integrating the push function in the App (application), efficient, accurate and real-time App message push is carried out, so that the business can reach users in time and improve user stickiness.

[0003] Most push notifications are short, general texts, with an intriguing title, or a question, or a discount offer, etc., to attract users to click. Some push notifications insert a small square screenshot on the basis of text push notifications to make the push notifications more perfect and icing on the cake. The choice of this small icon is more challenging. The simplest way is to use a uniform fixed picture as this icon. As you can imagine, the push notification effect is very limited and it is difficult to attract users' attention. Summary of the invention

[0004] The present application proposes a push icon generation method, device, electronic device and storage medium to configure different icons for different push contents to improve the push effect.

[0005] The first aspect of the present application provides a push icon generation method, comprising:

[0006] Get all the pictures in the information to be pushed;

[0007] Performing face detection on each of the images; wherein the detection result includes that all images contain at least one face or that all images do not contain any face;

[0008] A push icon for the information to be pushed is determined according to the detection result.

[0009] In a possible implementation, in the above-mentioned push icon generation method of the present application, determining the push icon of the information to be pushed according to the detection result includes:

[0010] If all the pictures contain at least one face, the integrity of the facial features in the pictures containing the faces is determined to obtain a first detection result, and a push icon for the information to be pushed is determined according to the first detection result;

[0011] If all the pictures do not contain human faces, upper body detection is performed on all the pictures to obtain a second detection result, and a push icon for the information to be pushed is determined according to the second detection result.

[0012] In a possible implementation, in the above-mentioned push icon generation method of the present application, the determining of the integrity of the facial features region in the picture containing the face includes:

[0013] Perform facial key point detection and image puzzle line detection on pictures containing faces to determine the integrity of the facial features.

[0014] In a possible implementation, in the above-mentioned push icon generation method of the present application, determining the push icon of the information to be pushed according to the first detection result includes:

[0015] If there is at least one complete facial feature region in the picture containing a face, the face region is extracted from the picture with the complete facial feature region, and the extracted face region is predicted based on the face attribute prediction model to obtain the corresponding face attributes; wherein the face attributes include face angle and face gender;

[0016] Obtaining a face confidence level corresponding to the face region, wherein the face confidence level is obtained based on the face key point detection;

[0017] Determining a push icon for the information to be pushed from the face area corresponding to the picture with complete facial features according to the face confidence and the face attribute;

[0018] If there is no complete facial features area in the picture containing the face, the step of upper body detection is performed on all pictures.

[0019] In a possible implementation, in the above-mentioned push icon generation method of the present application, determining the push icon for the information to be pushed from the face area corresponding to the picture with complete facial features of each face area according to the face confidence and the face attribute, includes:

[0020] Calculating the score corresponding to each face region according to the face angle, the face gender and the face confidence;

[0021] The face area with the smallest score is determined as the push icon for the information to be pushed.

[0022] In a possible implementation, in the above-mentioned push icon generation method of the present application, determining the push icon of the information to be pushed according to the second detection result includes:

[0023] If there is at least one upper body region in all the images, the upper body region is cropped for the images with the upper body region, and skin region detection is performed on the cropped upper body region;

[0024] Calculating the area ratio of the detected skin area in the entire upper body area, and retaining the upper body area whose area ratio is not greater than a preset threshold;

[0025] Based on the predicted scores of the cropping boxes of the upper body regions, determining the upper body regions with the highest score as the push icon for the information to be pushed; the predicted score of the cropping boxes is obtained based on the upper body detection;

[0026] If there is no upper body area in all the pictures, the preset icon is determined as the push icon for the information to be pushed.

[0027] In a possible implementation, in the above push icon generation method of the present application, the step of performing skin area detection on the cropped upper body area includes:

[0028] Convert the upper body region from RGB color space to YCrCb color space;

[0029] Pixel points whose Cr values ​​are within the first range and whose Cb values ​​are within the second range are determined as skin color points to obtain the skin area in the upper body area.

[0030] In a possible implementation, in the above push icon generation method of the present application, the acquiring of all images in the information to be pushed includes:

[0031] Get the cover images of all images and / or videos to be inserted into the information to be pushed.

[0032] A second aspect of the present application provides a push icon generation device, including:

[0033] The acquisition module is used to obtain all the pictures in the information to be pushed;

[0034] A face detection module, used to perform face detection on each of the pictures; wherein the detection result includes that all pictures contain at least one face or that all pictures do not contain any face;

[0035] The determination module is used to determine the push icon of the information to be pushed according to the detection result.

[0036] In a possible implementation, in the above-mentioned push icon generation device of the present application, the determination module is specifically used to:

[0037] If all the pictures contain at least one face, the integrity of the facial features in the pictures containing the faces is determined to obtain a first detection result, and a push icon for the information to be pushed is determined according to the first detection result;

[0038] If all the pictures do not contain human faces, upper body detection is performed on all the pictures to obtain a second detection result, and a push icon for the information to be pushed is determined according to the second detection result.

[0039] In a possible implementation, in the above-mentioned push icon generation device of the present application, the determination module is specifically used to:

[0040] Perform facial key point detection and image puzzle line detection on pictures containing faces to determine the integrity of the facial features.

[0041] In a possible implementation, in the above-mentioned push icon generation device of the present application, the determination module is specifically used to:

[0042] If there is at least one complete facial feature region in the picture containing a face, the face region is extracted from the picture with the complete facial feature region, and the extracted face region is predicted based on the face attribute prediction model to obtain the corresponding face attributes; wherein the face attributes include face angle and face gender;

[0043] Obtaining a face confidence level corresponding to the face region, wherein the face confidence level is obtained based on the face key point detection;

[0044] Determining a push icon for the information to be pushed from the face area corresponding to the picture with complete facial features according to the face confidence and the face attribute;

[0045] If there is no complete facial features area in the picture containing the face, the step of upper body detection is performed on all pictures.

[0046] In a possible implementation, in the above-mentioned push icon generation device of the present application, the determination module is specifically used to:

[0047] Calculating the score corresponding to each face region according to the face angle, the face gender and the face confidence;

[0048] The face area with the smallest score is determined as the push icon for the information to be pushed.

[0049] In a possible implementation, in the above-mentioned push icon generation device of the present application, the determination module is specifically used to:

[0050] If there is at least one upper body region in all the images, the upper body region is cropped for the images with the upper body region, and skin region detection is performed on the cropped upper body region;

[0051] Calculating the area ratio of the detected skin area in the entire upper body area, and retaining the upper body area whose area ratio is not greater than a preset threshold;

[0052] Based on the predicted scores of the cropping boxes of the upper body regions, determining the upper body regions with the highest score as the push icon for the information to be pushed; the predicted score of the cropping boxes is obtained based on the upper body detection;

[0053] If there is no upper body area in all the pictures, the preset icon is determined as the push icon for the information to be pushed.

[0054] In a possible implementation, in the above-mentioned push icon generation device of the present application, the determination module is specifically used to:

[0055] Convert the upper body region from RGB color space to YCrCb color space;

[0056] Pixel points whose Cr values ​​are within the first range and whose Cb values ​​are within the second range are determined as skin color points to obtain the skin area in the upper body area.

[0057] In a possible implementation, in the above-mentioned push icon generation device of the present application, the acquisition module is specifically used to:

[0058] Get the cover images of all images and / or videos to be inserted into the information to be pushed.

[0059] The third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect of the present application.

[0060] A fourth aspect of the present application provides a computer-readable storage medium having computer-readable instructions stored thereon, wherein the computer-readable instructions can be executed by a processor to implement the method described in the first aspect of the present application.

[0061] Compared with the prior art, the push icon generation method, device, electronic device and storage medium provided in the embodiments of the present application obtain all pictures in the information to be pushed; perform face detection on each of the pictures; wherein the detection result includes that all pictures contain at least one face or that all pictures do not contain faces; and determine the push icon for the information to be pushed based on the detection result. Through the present application, different icons can be configured for different push contents, and the icons and contents have a strong correlation, which is easier to attract user clicks, thereby improving the push effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0062] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present application. Also, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:

[0063] Figure 1 A flowchart of a method for generating a push icon provided by the present application is shown;

[0064] Figure 2 A flowchart of another method for processing a standard face provided by the present application is shown;

[0065] Figure 3 A schematic diagram of performing face detection on a picture is shown;

[0066] Figure 4 A schematic diagram of face key point detection and jigsaw line detection is shown;

[0067] Figure 5 A schematic diagram showing the angles of a human face;

[0068] Figure 6 A schematic diagram of upper body detection is shown;

[0069] Figure 7 A schematic diagram of a preset icon is shown;

[0070] Figure 8 A complete flow chart of a method for generating a push icon provided by the present application is shown;

[0071] Fig. 9 A schematic diagram of a push icon generating device provided by the present application is shown;

[0072] Fig.10 A schematic diagram of an electronic device provided by the present application is shown;

[0073] Fig.11 A schematic diagram of a computer-readable storage medium provided by the present application is shown. DETAILED DESCRIPTION

[0074] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0075] It should be noted that, unless otherwise specified, the technical terms or scientific terms used in this application should have the common meanings understood by technicians in the field to which this application belongs.

[0076] In addition, the terms "first" and "second" etc. are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

[0077] In existing message push notifications, there is little correlation between push icons and push content. Such push notification effects are very limited and it is difficult to attract users' attention.

[0078] In view of this, the embodiment of the present application will provide a push icon generation method, and a device, electronic device, and storage medium based on the method. In the embodiment of the present application, firstly, all pictures in the information to be pushed are obtained, and then face detection is performed on each picture, and the detection results include that all pictures contain at least one face or that all pictures do not contain faces; select a face area picture with complete facial features from the pictures containing faces as the push icon of the information to be pushed, or select an upper body area picture with a smaller skin area from the pictures containing upper body areas as the push icon of the information to be pushed, or if there are no face areas and upper body areas that meet the requirements in all pictures, the preset icon is used as the push icon of the information to be pushed. Compared with the existing push icon generation method, different icons are configured for different push contents in this method, and the icons and contents have a strong correlation, which is easier to attract users' clicks, thereby improving the push effect.

[0079] To further illustrate the solution of the embodiment of the present application, the following description will be made in conjunction with the accompanying drawings. It is understandable that in the following embodiments, the same or corresponding contents can be referenced to each other, and for the sake of simplicity of description, no further description will be given later.

[0080] Please refer to Figure 1 , which shows a flow chart of a method for generating a push icon provided by an embodiment of the present application. The execution subject of the method can be a push server, or an electronic device such as a mobile phone or a computer. Figure 1 As shown, the above push icon generation method may include the following steps S101 to S103:

[0081] S101, obtaining all pictures in the information to be pushed;

[0082] The information to be pushed may be related posts, diaries, articles, etc. For example, a post may contain text evaluation information, multiple pictures or videos. The final message pushed is a piece of text and an icon. This application solves the problem of how to generate a push icon.

[0083] Among them, all pictures may include all pictures and cover pictures of videos inserted in the information to be pushed, or only include all pictures inserted in the information to be pushed, or only include cover pictures of videos in the information to be pushed.

[0084] For example, for post pictures, each picture will correspond to a download link, and each video will correspond to the video download link and the video cover picture download link. Based on these download links, you can get all the picture collections of any post.

[0085] S102, performing face detection on each of the pictures; wherein the detection result includes that all pictures contain at least one face or that all pictures do not contain any face;

[0086] Specifically, all images can be subjected to face detection through a face detection model to determine whether there is a face in each image.

[0087] S103: Determine a push icon for the information to be pushed according to the detection result.

[0088] For example, when there are no faces in all the pictures of a post, the logic of the no-face branch is performed to determine the push icon corresponding to the no-face; conversely, as long as there are faces, the logic of the face branch is performed to determine the push icon corresponding to the face.

[0089] In a possible implementation, in the above push icon generation method of the present application, as Figure 2 As shown, step S103 can be implemented as follows:

[0090] S201. If all the pictures contain at least one face, determine the integrity of the facial features in the pictures containing the faces, obtain a first detection result, and determine a push icon for the information to be pushed based on the first detection result.

[0091] S202: If all the pictures do not contain human faces, upper body detection is performed on all the pictures to obtain a second detection result, and a push icon for the information to be pushed is determined according to the second detection result.

[0092] In step S201, the integrity of the facial features region in the picture containing the face is determined, specifically, face key point detection and picture puzzle line detection are performed on the picture containing the face to determine the integrity of the facial features region.

[0093] Specifically, for pictures with human faces, 106 key facial point detections and picture puzzle line detections are synchronously performed. Then, based on the coordinates of the 106 key points and the coordinates of the puzzle lines, the integrity of the facial feature regions is judged. When detecting key facial points, a face frame and its confidence level can be obtained.

[0094] The complete facial feature regions need to meet the following conditions:

[0095] (1) The coordinates of the 106 key facial points are all on the picture, and the coordinates satisfy 0 < x < width and 0 < y < height. Here, width refers to the width of the picture, and height refers to the height of the picture.

[0096] (2) The puzzle line does not pass through the closure region formed by the 106 key points.

[0097] For example, for the Figure 3 shown picture, face detection is performed to determine that there is a human face. Then, key facial point detection is performed on the face picture, and 106 key facial points as shown in Figure 4 4a are obtained. As shown in Figure 4 4b, the closure region formed by the outer contour points among the 106 key points is shown. Puzzle line detection is performed on the face picture. As shown in Figure 4 4c, the puzzle line just passes through Figure 4 the closure region shown in 4b, which is an incomplete facial feature region. As shown in Figure 4 4d, the puzzle line does not pass through Figure 4 the closure region shown in 4b, which is a complete facial feature region. Figure 4 The white lines in 4c and 4d are the puzzle lines.

[0098] In step S201, the first detection result includes: there is at least one complete facial feature region in the picture with a human face or there is no complete facial feature region in the picture with a human face. Determining the push icon of the information to be pushed according to the first detection result specifically includes:

[0099] If there is at least one complete facial feature region in the picture with a human face, the face region of the picture with a complete facial feature region is cropped. Specifically, the face can be cropped based on the minimum bounding rectangle of the key facial points. The cropped face region is predicted based on the face attribute prediction model to obtain the corresponding face attributes; among them, the face attributes include the face angle and the face gender; as Figure 5 shown, the face angle includes the yaw angle yaw_angle, the roll angle roll_angle, and the pitch angle pitch_angle. The value ranges of these three angle values are -90 to 90 degrees. The smaller the value, the more frontal the face is.

[0100] Obtaining a face confidence level corresponding to the face region, wherein the face confidence level is obtained based on the face key point detection, that is, the confidence level of the face frame;

[0101] Determining a push icon for the information to be pushed from the face area corresponding to the picture with complete facial features according to the face confidence and the face attribute;

[0102] If there is no complete facial features area in the picture containing the face, the step of upper body detection is performed on all pictures.

[0103] In a possible implementation, in the push icon generation method of the present application, the step of determining the push icon for the information to be pushed from the face area corresponding to the picture with complete facial features of each face area according to the face confidence and the face attribute specifically includes:

[0104] The scores corresponding to the face regions are calculated according to the face angle, the face gender and the face confidence; and the face region with the smallest score is determined as the push icon for the information to be pushed.

[0105] Specifically, the value of face_rectangle_confidence is between 0 and 1.

[0106] Define the gender of the face: {"Female":5,"Male":10}, that is, the value of female is 5 and the value of male is 10.

[0107] The score corresponding to the face area is calculated based on the following formula:

[0108] score=yaw_angle+roll_angle+pitch_angle+(1-face_rectangle_confidence)*50+gender;

[0109] Finally, a face region with complete facial features will correspond to a score, and all scores can be sorted from small to large. The face region picture with the smallest score is the most suitable one, and the face region picture with the smallest score is determined as the push icon for the information to be pushed.

[0110] In step S202, upper body detection can be performed using the yolov5 image algorithm. The effect of yolov5 detection is as follows: Figure 6As shown, an upper body frame (i.e., a cropping frame) and its predicted score (0.79 as shown in the figure) are obtained, and then the upper body area can be cropped out based on the upper body frame. The second detection result corresponding to the upper body detection includes: there is at least one upper body area in all pictures or there is no upper body area in all pictures. Determining the push icon for the information to be pushed based on the second detection result specifically includes:

[0111] If there is at least one upper body region in all the images, the upper body region is cropped for the images with the upper body region, and skin region detection is performed on the cropped upper body region;

[0112] Calculating the area ratio of the detected skin area in the entire upper body area, and retaining the upper body area whose area ratio is not greater than a preset threshold;

[0113] Based on the predicted scores of the cropping boxes of the upper body regions, the upper body regions with the highest score are determined as the push icon for the information to be pushed; the predicted score of the cropping box is obtained based on the upper body detection.

[0114] Specifically, in the step of performing skin area detection on the cropped upper body area, the upper body area can be converted from the RGB color space to the YCrCb color space, and the pixel points with Cr values ​​within the first range and Cb values ​​within the second range are determined as skin color points to obtain the skin area in the upper body area.

[0115] In RGB space, the skin color of the face is greatly affected by brightness, so it is difficult to separate skin color points from non-skin color points. That is to say, after processing in this space, the skin color points are discrete points with many non-skin color points embedded in the middle. If RGB is converted to YCrCb space, the influence of Y (brightness) can be ignored, because this space is little affected by brightness, and skin color will produce good clustering. In this way, the three-dimensional space is reduced to two-dimensional CrCb, and the skin color points will form a certain shape, such as: for a face, you will see the area of ​​a face, and for an arm, you will see the shape of an arm, which is very beneficial for processing pattern recognition.

[0116] The specific detection ideas are as follows:

[0117] First range: 133≤Cr≤173;

[0118] Second range: 77≤Cb≤127.

[0119] If the color of a pixel point satisfies the first range and the second range, then the pixel point is considered to be a skin color point, and the others are non-skin color points.

[0120] Then the ratio of the skin area to the entire cropped upper body area is calculated. If it is greater than the preset threshold, then the cropped image is likely to be a sensitive image with a lot of nudity, and the cropped image is directly discarded. For cropped images that are less than the preset threshold, they are sorted from high to low based on the predicted scores of the cropped boxes, and the one with the highest score is used as the push icon for the information to be pushed.

[0121] If there is no upper body area in all the pictures, the preset icon is determined as the push icon for the information to be pushed.

[0122] Among them, the preset icon is the default base image, such as Figure 7 7a is a schematic diagram of the preset icon of the picture post, such as Figure 7 Figure 7b shows a schematic diagram of the preset icon for a video post.

[0123] For ease of understanding, Figure 8 Shown is a complete flow chart of a push icon generation method provided by this application.

[0124] Compared with the prior art, the embodiment of the present application obtains all pictures in the information to be pushed; performs face detection on each of the pictures; wherein the detection result includes that all pictures contain at least one face or that all pictures do not contain faces; and determines the push icon of the information to be pushed according to the detection result. Through the present application, different icons can be configured for different push contents, and the icons and contents have a strong correlation, which is easier to attract user clicks, thereby improving the push effect.

[0125] In the above embodiment, a push icon generation method is provided. Correspondingly, the present application also provides a push icon generation device. Fig. 9 , which shows a schematic diagram of another push icon generation device provided by some embodiments of the present application. Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described below is only illustrative.

[0126] like Fig. 9 As shown, the push icon generating device 10 may include:

[0127] Acquisition module 101, used to acquire all pictures in the information to be pushed;

[0128] A face detection module 102 is used to perform face detection on each of the pictures; wherein the detection result includes that all pictures contain at least one face or that all pictures do not contain any face;

[0129] The determination module 103 is used to determine a push icon for the information to be pushed according to the detection result.

[0130] In a possible implementation, in the above-mentioned push icon generation device of the present application, the determination module is specifically used to:

[0131] If all the pictures contain at least one face, the integrity of the facial features in the pictures containing the faces is determined to obtain a first detection result, and a push icon for the information to be pushed is determined according to the first detection result;

[0132] If all the pictures do not contain human faces, upper body detection is performed on all the pictures to obtain a second detection result, and a push icon for the information to be pushed is determined according to the second detection result.

[0133] In a possible implementation, in the above push icon generation device of the present application, the determination module 103 is specifically used to:

[0134] Perform facial key point detection and image puzzle line detection on pictures containing faces to determine the integrity of the facial features.

[0135] In a possible implementation, in the above push icon generation device of the present application, the determination module 103 is specifically used to:

[0136] If there is at least one complete facial feature region in the picture containing a face, the face region is extracted from the picture with the complete facial feature region, and the extracted face region is predicted based on the face attribute prediction model to obtain the corresponding face attributes; wherein the face attributes include face angle and face gender;

[0137] Obtaining a face confidence level corresponding to the face region, wherein the face confidence level is obtained based on the face key point detection;

[0138] Determining a push icon for the information to be pushed from the face area corresponding to the picture with complete facial features according to the face confidence and the face attribute;

[0139] If there is no complete facial features area in the picture containing the face, the step of upper body detection is performed on all pictures.

[0140] In a possible implementation, in the above push icon generation device of the present application, the determination module 103 is specifically used to:

[0141] Calculating the score corresponding to each face region according to the face angle, the face gender and the face confidence;

[0142] The face area with the smallest score is determined as the push icon for the information to be pushed.

[0143] In a possible implementation, in the above push icon generation device of the present application, the determination module 103 is specifically used to:

[0144] If there is at least one upper body region in all the images, the upper body region is cropped for the images with the upper body region, and skin region detection is performed on the cropped upper body region;

[0145] Calculating the area ratio of the detected skin area in the entire upper body area, and retaining the upper body area whose area ratio is not greater than a preset threshold;

[0146] Based on the predicted scores of the cropping boxes of the upper body regions, determining the upper body regions with the highest score as the push icon for the information to be pushed; the predicted score of the cropping boxes is obtained based on the upper body detection;

[0147] If there is no upper body area in all the pictures, the preset icon is determined as the push icon for the information to be pushed.

[0148] In a possible implementation, in the above push icon generation device of the present application, the determination module 103 is specifically used to:

[0149] Convert the upper body region from RGB color space to YCrCb color space;

[0150] Pixel points whose Cr values ​​are within the first range and whose Cb values ​​are within the second range are determined as skin color points to obtain the skin area in the upper body area.

[0151] In a possible implementation, in the above push icon generation device of the present application, the acquisition module 101 is specifically used to:

[0152] Get the cover images of all images and / or videos to be inserted into the information to be pushed.

[0153] The push icon generation device provided in the embodiment of the present application and the push icon generation method provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented therein.

[0154] The embodiments of the present application also provide an electronic device corresponding to the push icon generation method provided in the aforementioned embodiments, such as a mobile phone, a laptop computer, a tablet computer, a desktop computer, etc., to execute the above-mentioned push icon generation method.

[0155] Please refer to Fig.10 , which shows a schematic diagram of an electronic device provided by some embodiments of the present application. Fig.10As shown, the electronic device 20 includes: a processor 200, a memory 201, a bus 202 and a communication interface 203, and the processor 200, the communication interface 203 and the memory 201 are connected via the bus 202; the memory 201 stores a computer program that can be run on the processor 200, and when the processor 200 runs the computer program, it executes the push icon generation method provided in any of the aforementioned embodiments of the present application.

[0156] The memory 201 may include a high-speed random access memory (RAM), and may also include a non-volatile memory, such as at least one disk memory. The communication connection between the system network element and at least one other network element is realized through at least one communication interface 203 (which may be wired or wireless), and the Internet, wide area network, local area network, metropolitan area network, etc. may be used.

[0157] The bus 202 may be an ISA bus, a PCI bus, or an EISA bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The memory 201 is used to store programs, and the processor 200 executes the program after receiving an execution instruction. The push icon generation method disclosed in any implementation of the aforementioned embodiment of the present application may be applied to the processor 200, or implemented by the processor 200.

[0158] The processor 200 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 hardware integrated logic circuit or software instructions in the processor 200. The above processor 200 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a readily available programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor can be executed. The software module can be located in a mature storage medium in the field 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. The storage medium is located in the memory 201, and the processor 200 reads the information in the memory 201 and completes the steps of the above method in combination with its hardware.

[0159] The electronic device provided in the embodiment of the present application and the push icon generation method provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented therein.

[0160] The present application also provides a computer-readable storage medium corresponding to the push icon generation method provided in the above embodiment. Fig.11 The computer-readable storage medium shown is a CD 30 on which a computer program (ie, a program product) is stored. When the computer program is executed by a processor, the push icon generation method provided in any of the aforementioned embodiments will be executed.

[0161] It should be noted that examples of the computer-readable storage medium may also 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 optical or magnetic storage media, which are not listed here one by one.

[0162] The computer-readable storage medium provided in the above-mentioned embodiment of the present application and the push icon generation method provided in the embodiment of the present application are based on the same inventive concept and have the same beneficial effects as the method adopted, run or implemented by the application program stored therein.

[0163] It should be noted that the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0164] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0165] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.

[0166] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0167] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0168] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0169] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application, and they should all be included in the scope of the claims and specification of the present application.

Claims

1. A method for generating a push icon, characterized in that: include: Get all the pictures in the information to be pushed; Performing face detection on each of the images; wherein the detection result includes that all images contain at least one face or that all images do not contain any face; If all the pictures contain at least one face, the integrity of the facial features in the pictures containing the faces is determined to obtain a first detection result, and a push icon for the information to be pushed is determined according to the first detection result; If all the pictures do not contain human faces, upper body detection is performed on all the pictures to obtain a second detection result, and a push icon for the information to be pushed is determined according to the second detection result; The step of determining the push icon of the information to be pushed according to the first detection result includes: If there is at least one complete facial features region in the picture containing a face, the face region is extracted from the picture with the complete facial features region, and the extracted face region is predicted based on the face attribute prediction model to obtain the corresponding face attributes; Obtaining a face confidence level corresponding to the face region, wherein the face confidence level is obtained based on face key point detection; Determining a push icon for the information to be pushed from the face area corresponding to the picture with complete facial features according to the face confidence and the face attribute; If there is no complete facial features area in the picture containing the face, the step of upper body detection is performed on all pictures.

2. The method according to claim 1, characterized in that The determining of the integrity of the facial features region in the image containing the face includes: Perform facial key point detection and image puzzle line detection on pictures containing faces to determine the integrity of the facial features.

3. The method according to claim 1, characterized in that The face attributes include face angle and face gender.

4. The method according to claim 3, characterized in that The step of determining the push icon for the information to be pushed from the face area corresponding to the picture with complete facial features according to the face confidence and the face attribute includes: Calculating the score corresponding to each face region according to the face angle, the face gender and the face confidence; The face area with the smallest score is determined as the push icon for the information to be pushed.

5. The method according to claim 1, characterized in that The step of determining a push icon for the information to be pushed according to the second detection result includes: If there is at least one upper body region in all the images, the upper body region is cropped for the images with the upper body region, and skin region detection is performed on the cropped upper body region; Calculating the area ratio of the detected skin area in the entire upper body area, and retaining the upper body area whose area ratio is not greater than a preset threshold; Based on the predicted scores of the cropping boxes of the upper body regions, determining the upper body regions with the highest score as the push icon for the information to be pushed; the predicted score of the cropping boxes is obtained based on the upper body detection; If there is no upper body area in all the pictures, the preset icon is determined as the push icon for the information to be pushed.

6. The method according to claim 5, characterized in that The performing skin area detection on the cropped upper body area comprises: Convert the upper body region from RGB color space to YCrCb color space; Pixel points whose Cr values ​​are within the first range and whose Cb values ​​are within the second range are determined as skin color points to obtain the skin area in the upper body area.

7. The method according to claim 1, characterized in that The method of obtaining all pictures in the information to be pushed includes: Get the cover images of all images and / or videos to be inserted into the information to be pushed.

8. A push icon generation device, characterized in that: include: The acquisition module is used to obtain all the pictures in the information to be pushed; A face detection module, used to perform face detection on each of the pictures; wherein the detection result includes that all pictures contain at least one face or that all pictures do not contain any face; Identify modules for: If all the pictures contain at least one face, the integrity of the facial features in the pictures containing the faces is determined to obtain a first detection result, and a push icon for the information to be pushed is determined according to the first detection result; If all the pictures do not contain human faces, upper body detection is performed on all the pictures to obtain a second detection result, and a push icon for the information to be pushed is determined according to the second detection result; The step of determining the push icon of the information to be pushed according to the first detection result includes: If there is at least one complete facial features region in the picture containing a face, the face region is extracted from the picture with the complete facial features region, and the extracted face region is predicted based on the face attribute prediction model to obtain the corresponding face attributes; Obtaining a face confidence level corresponding to the face region, wherein the face confidence level is obtained based on face key point detection; Determining a push icon for the information to be pushed from the face area corresponding to the picture with complete facial features according to the face confidence and the face attribute; If there is no complete facial features area in the picture containing the face, the step of upper body detection is performed on all pictures.

9. An electronic device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium having computer-readable instructions stored thereon, wherein the computer-readable instructions can be executed by a processor to implement the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Cover recommendation method and device, equipment and medium

    CN112860941A