Determination Method, Device, Equipment and Storage Medium for Looking-up Rate

By identifying the center position and confidence of the human eye in the image, and combining the human body image to determine the user's head-up or head-down type, the problem of low head-up rate calculation efficiency in the prior art is solved, and efficient and accurate head-up rate calculation is achieved.

CN119580018BActive Publication Date: 2025-08-01GUANGZHOU SIHAN INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510134918.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-02-07
Publication Date
2025-08-01
Estimated Expiration
2045-02-07

AI Technical Summary

Technical Problem

In the prior art, the calculation efficiency of determining the head-up rate is low, mainly because it is necessary to identify the full face features of the face image, which consumes a lot of computing resources.

Method used

By acquiring the center position and confidence of the human eye in the image, combining the human body image, the user's head-up or head-down type is determined, thereby calculating the head-up rate, reducing the need for face comparison.

Benefits of technology

It improves the calculation efficiency of the head-up rate and ensures the accuracy of the calculation results. It can accurately predict the human body type especially when the human eye is blocked, reducing the consumption of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119580018B_ABST
    Figure CN119580018B_ABST
Patent Text Reader

Abstract

The present application provides a method, apparatus, device, and storage medium for determining the head-up rate, relating to the field of computer technology. The method includes: obtaining a first image collected in a preset scenario, where there are multiple users in the preset scenario; performing human body recognition processing on the first image to determine multiple human body images in the first image, and the human body images include face regions; for any one of the human body images, performing image recognition processing on the face region in the human body image to obtain the human eye center position of the center points of both eyes in the face region and the first confidence level of the human eye center position; determining the target human body type corresponding to the human body image according to the human eye center position, the first confidence level, and the human body image, where the target human body type is a head-up type or a head-down type; and determining the head-up rate corresponding to the preset scenario according to the target human body type corresponding to each human body image. The calculation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and particularly to a method, device, equipment, and storage medium for determining the head-up rate. Background Art

[0002] In some scenarios, the degree of attention of a user to a certain target object can be evaluated by analyzing the head-up rate. For example, in the classroom teaching scenario, the effectiveness of teaching can be evaluated by analyzing the head-up rate of students.

[0003] In the related art, the head-up rate can be determined by performing face recognition on a picture. First, the picture to be detected can be obtained, the face images and the number of faces in the picture to be detected can be determined through face recognition, the face images are compared with the face images in the preset head-up state for similarity, and the human body posture corresponding to the face image with a high similarity is determined as the head-up, then the number of targets with the human body posture of head-up in the picture to be detected is determined, and the head-up rate is determined according to the number of targets and the number of faces.

[0004] However, in the above method, it is necessary to recognize the full-face features of the face images, which requires a large amount of computing resources, resulting in a low calculation efficiency of the head-up rate. Summary of the Invention

[0005] This application provides a method, device, equipment, and storage medium for determining the head-up rate to solve the problem of low calculation efficiency of the head-up rate.

[0006] In a first aspect, this application provides a method for determining the user type, including:

[0007] Obtain a first image collected in a preset scenario, where there are multiple users in the preset scenario;

[0008] Perform human body recognition processing on the first image to determine multiple human body images in the first image, and the human body images include face regions;

[0009] For any one of the human body images, perform image recognition processing on the face region in the human body image to obtain the human eye center position of the center points of both eyes in the face region and the first confidence level of the human eye center position;

[0010] According to the human eye center position, the first confidence level, and the human body image, determine the target human body type corresponding to the human body image, where the target human body type is the head-up type or the head-down type;

[0011] According to the target human body type corresponding to each human body image, determine the head-up rate corresponding to the preset scenario.

[0012] In a possible design, performing image recognition processing on the face region in the human body image to obtain the human eye center position of the center points of both eyes in the face region and a first confidence level of the human eye center position, including:

[0013] Performing human eye recognition processing on the face region to obtain left eye information, right eye information, and the first confidence level, where the left eye information includes the left eye position and left eye size of the left eye in the first image, and the right eye information includes the right eye position and right eye size of the right eye in the first image;

[0014] Determining the human eye center position according to the left eye information and the right eye information.

[0015] In a possible design, performing human eye recognition processing on the face region to obtain left eye information, right eye information, and the first confidence level, including:

[0016] Performing human eye recognition processing in the face region to obtain first human eye information of the first human eye, second human eye information of the second human eye, and binocular detection information, where the first human eye information includes the position of the first human eye in the first image and the size of the first human eye, and the second human eye information includes the position of the second human eye in the first image and the size of the second human eye;

[0017] Determining the human eye types of the first human eye and the second human eye according to the first human eye information and the second human eye information, where the human eye type is a left eye type or a right eye type;

[0018] Determining the left eye information and the right eye information from the first human eye information and the second human eye information according to the human eye types of the first human eye and the second human eye;

[0019] Determining the first confidence level according to the binocular detection information.

[0020] In a possible design, determining the human eye center position according to the left eye information and the right eye information, including:

[0021] Determining the horizontal center coordinate according to the following formula: ;

[0022] Determining the vertical center coordinate according to the following formula: ;

[0023] Determining that the human eye center position includes the horizontal center coordinate and the vertical center coordinate;

[0024] Wherein, the ex is the horizontal center coordinate, the RP.x is the abscissa of the right eye, the RP.y is the ordinate of the right eye, the RP.w is the width of the right eye, the RP.h is the height of the right eye, the ey is the vertical center coordinate, the LP.x is the abscissa of the left eye, the LP.y is the ordinate of the left eye, the LP.w is the width of the left eye, and the LP.h is the height of the left eye.

[0025] In a possible design, the binocular detection information includes the occlusion ratio of both eyes and the recognition clarity of both eyes; determining the first confidence level according to the binocular detection information includes:

[0026] Determine the occlusion weight and the clarity weight;

[0027] Determine the product of the occlusion ratio and the occlusion weight as the first sub-confidence level;

[0028] Determine the product of the recognition clarity and the clarity weight as the second sub-confidence level;

[0029] Determine the first confidence level according to the first sub-confidence level and the second sub-confidence level.

[0030] In a possible design, determining the target human body type corresponding to the human body image according to the human eye center position, the first confidence level, and the human body image includes:

[0031] Determine the initial human body type according to the human eye center position;

[0032] If the first confidence level of the human eye center position is greater than or equal to the first threshold, then determine the initial human body type as the target human body type;

[0033] If the first confidence level of the human eye center position is less than the first threshold, then determine the target human body type according to the human body image and the initial human body type.

[0034] In a possible design, the human eye center position includes a horizontal center coordinate and a vertical center coordinate; determining the initial human body type according to the human eye center position includes:

[0035] Perform face recognition processing on the face region to obtain face information, where the face information includes the face position of the face region in the first image and the face size;

[0036] Determine a first index value according to the horizontal center coordinate, the horizontal face coordinate in the face position, and the face width in the face size, where the first index value is used to indicate: in the horizontal direction, the area of the human eye on the face;

[0037] Determine a second index value according to the longitudinal center coordinate, the longitudinal face coordinate in the face position, and the face height in the face size, where the second index value is used to indicate: in the longitudinal direction, the area of the human eyes on the face;

[0038] Determine the initial human body type according to the first index value and the second index value.

[0039] In a possible design, determining the initial human body type according to the first index value and the second index value includes:

[0040] If the first index value is within a first preset interval and the second index value is within a second preset interval, then determine that the initial human body type is the head-up type;

[0041] If the first index value is not within the first preset interval, or the second index value is not within the second preset interval, then determine that the initial human body type is the head-down type.

[0042] In a possible design, determining the target human body type according to the human body image and the initial human body type includes:

[0043] Perform recognition processing on the human body image through a preset model to obtain a predicted human body type and a second confidence level of the predicted human body type;

[0044] If the second confidence level is greater than or equal to a second threshold, then determine the predicted human body type as the target human body type;

[0045] If the second confidence level is less than the second threshold, if the predicted human body type is the same as the initial human body type, then determine the predicted human body type as the target human body type, if the predicted human body type is different from the initial human body type, then determine the human body type with the highest corresponding confidence level among the predicted human body type and the initial human body type as the target human body type.

[0046] In a second aspect, the present application provides a device for determining the head-up rate, including: an acquisition module, a first determination module, a recognition processing module, a second determination module, and a third determination module, where,

[0047] The acquisition module is configured to acquire a first image collected in a preset scenario, where there are multiple users in the preset scenario;

[0048] The first determination module is configured to perform human body recognition processing on the first image to determine multiple human body images in the first image, where the human body images include face regions;

[0049] The recognition processing module is configured to perform image recognition processing on the face region in any human body image to obtain the eye center position of the two eye centers in the face region and the first confidence level of the eye center position.

[0050] The second determination module is configured to determine the target human body type corresponding to the human body image according to the eye center position, the first confidence level, and the human body image, where the target human body type is a head-up type or a head-down type.

[0051] The third determination module is configured to determine the head-up rate corresponding to the preset scenario according to the target human body type corresponding to each human body image.

[0052] In a possible design, the recognition processing module is specifically configured to:

[0053] Perform eye recognition processing on the face region to obtain left eye information, right eye information, and the first confidence level. The left eye information includes the left eye position and left eye size of the left eye in the first image, and the right eye information includes the right eye position and right eye size of the right eye in the first image.

[0054] Determine the eye center position according to the left eye information and the right eye information.

[0055] In a possible design, the recognition processing module is specifically configured to:

[0056] Perform eye recognition processing in the face region to obtain the first eye information of the first eye, the second eye information of the second eye, and binocular detection information. The first eye information includes the position of the first eye in the first image and the size of the first eye, and the second eye information includes the position of the second eye in the first image and the size of the second eye.

[0057] Determine the eye types of the first eye and the second eye according to the first eye information and the second eye information. The eye types are left eye type or right eye type.

[0058] Determine the left eye information and the right eye information from the first eye information and the second eye information according to the eye types of the first eye and the second eye.

[0059] Determine the first confidence level according to the binocular detection information.

[0060] In a possible design, the recognition processing module is specifically configured to:

[0061] Determine the horizontal center coordinate according to the following formula: ;

[0062] Determine the vertical center coordinate according to the following formula: ;

[0063] Determine the center position of the human eye including the horizontal center coordinate and the vertical center coordinate;

[0064] Wherein, the ex is the horizontal center coordinate, the RP.x is the abscissa of the right eye, the RP.y is the ordinate of the right eye, the RP.w is the width of the right eye, the RP.h is the height of the right eye, the ey is the vertical center coordinate, the LP.x is the abscissa of the left eye, the LP.y is the ordinate of the left eye, the LP.w is the width of the left eye, and the LP.h is the height of the left eye.

[0065] In a possible design, the recognition processing module is specifically configured to:

[0066] Determine the occlusion weight and the clarity weight;

[0067] Multiply the occlusion ratio and the occlusion weight to determine the first sub-confidence level;

[0068] Multiply the recognition clarity and the clarity weight to determine the second sub-confidence level;

[0069] Determine the first confidence level according to the first sub-confidence level and the second sub-confidence level.

[0070] In a possible design, the second determination module is specifically configured to:

[0071] Determine the initial human body type according to the center position of the human eye;

[0072] If the first confidence level of the center position of the human eye is greater than or equal to the first threshold, determine the initial human body type as the target human body type;

[0073] If the first confidence level of the center position of the human eye is less than the first threshold, determine the target human body type according to the human body image and the initial human body type.

[0074] In a possible design, the second determination module is specifically configured to:

[0075] Perform face recognition processing on the face region to obtain face information, where the face information includes the face position of the face region in the first image and the face size;

[0076] Determine a first index value based on the horizontal center coordinate, the horizontal face coordinate in the face position, and the face width in the face size, where the first index value is used to indicate the area of the human eyes on the face in the horizontal direction;

[0077] Determine a second index value based on the vertical center coordinate, the vertical face coordinate in the face position, and the face height in the face size, where the second index value is used to indicate the area of the human eyes on the face in the vertical direction;

[0078] Determine the initial human body type according to the first index value and the second index value.

[0079] In a possible design, the second determination module is specifically configured to:

[0080] If the first index value is within a first preset interval and the second index value is within a second preset interval, determine that the initial human body type is the looking-up type;

[0081] If the first index value is not within the first preset interval, or the second index value is not within the second preset interval, determine that the initial human body type is the looking-down type.

[0082] In a possible design, the second determination module is specifically configured to:

[0083] Perform recognition processing on the human body image through a preset model to obtain a predicted human body type and a second confidence level of the predicted human body type;

[0084] If the second confidence level is greater than or equal to a second threshold, determine the predicted human body type as the target human body type;

[0085] If the second confidence level is less than the second threshold, if the predicted human body type is the same as the initial human body type, determine the predicted human body type as the target human body type, and if the predicted human body type is different from the initial human body type, determine the human body type with the maximum corresponding confidence level among the predicted human body type and the initial human body type as the target human body type.

[0086] In a third aspect, an embodiment of the present application provides an electronic device, including: at least one processor and a memory; the memory stores computer execution instructions; the at least one processor executes the computer execution instructions stored in the memory, so that the at least one processor executes the method for determining the looking-up rate as described in the first aspect and various possible designs of the first aspect above.

[0087] Fourthly, an embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions. When a processor executes the computer-executable instructions, a method for determining the head-up rate as described in the first aspect and various possible designs of the first aspect is implemented.

[0088] Fifthly, an embodiment of the present application provides a computer program product including a computer program. When the computer program is executed by a processor, a method for determining the head-up rate as described in the first aspect and various possible designs of the first aspect is implemented.

[0089] For the method, device, equipment, and storage medium for determining the head-up rate provided by the present application, when it is necessary to determine the head-up rate for a first image, the human body type (head-up or head-down) of the user can be determined based on the position of the human eyes in the first image and the human body image in the first image, and then the head-up rate can be determined according to the human body type of the user. The position of the human eyes can accurately reflect whether the user is head-down or head-up. In the case where the human eyes are blocked (resulting in a confidence angle of the position of the human eyes), the human body type can also be predicted based on the human body image without performing complex face comparison processing, improving the calculation efficiency of the head-up rate while ensuring the accuracy of determining the head-up rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0090] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application and used together with the specification to explain the principles of the present application.

[0091] Figure 1 It is a schematic diagram of the system architecture provided by an embodiment of the present application;

[0092] Figure 2 It is a schematic flowchart of a method for determining the head-up rate provided by an embodiment of the present application;

[0093] Figure 3 It is a schematic diagram of the coordinate system of the first image provided by an embodiment of the present application;

[0094] Figure 4 It is a schematic diagram of the process of a method for determining the target human body type provided by an embodiment of the present application;

[0095] Figure 5 It is a schematic diagram of the structure of a device for determining the head-up rate provided by an embodiment of the present application;

[0096] Figure 6 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application.

[0097] Through the above-mentioned accompanying drawings, specific embodiments of the present application have been shown, and more detailed descriptions will be provided hereinafter. These drawings and written descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. Detailed Description of Specific Embodiments

[0098] Here, exemplary embodiments will be described in detail, and examples are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0099] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data that have been authorized by the user or fully authorized by all parties. And the collection, use, and processing of relevant data need to comply with relevant laws, regulations, and standards, and corresponding operation entrances are provided for users to choose to authorize or refuse.

[0100] It should be noted that in the embodiments of the present application, some industry-existing solutions such as certain software, components, models, etc. may be mentioned. They should be considered exemplary, and their purpose is only to illustrate the feasibility in the implementation of the technical solution of the present application, but it does not mean that the applicant has already or necessarily used this solution.

[0101] For the sake of easy understanding, the following Figure 1 is used to illustrate the system architecture applicable to the embodiments of the present application.

[0102] Figure 1 is a schematic diagram of the system architecture provided for the embodiments of the present application. Please refer to Figure 1 , which includes a camera device 101 and an electronic device 102. The camera device 101 can be devices such as a camera or a monitor. The camera device 101 can collect images or videos of a preset scene. For example, the camera device 101 can be a monitoring device in a classroom. The electronic device 101 can be a terminal device or a server. The camera device 101 can send the collected pictures or videos to the electronic device 101, and the electronic device 101 can process the received pictures or videos.

[0103] In the related art, the head-up rate can be determined by performing face recognition on a picture. First, the picture to be detected can be obtained, and the face images and the number of faces in the picture to be detected can be determined through face recognition. Then, the face images are compared with the pre-obtained complete face images for similarity, and the body posture corresponding to the face image with a high similarity is determined as a head-up posture. Next, the number of targets with a head-up body posture in the picture to be detected is determined, and the head-up rate is determined based on the number of targets and the number of faces.

[0104] However, in the above method, it is necessary to recognize the full-face features of the face images, which requires a large amount of computing resources, resulting in a low calculation efficiency of the head-up rate.

[0105] In view of the above problems, in the embodiments of the present application, when it is necessary to determine the head-up rate for a first image, the user's body type (head-up or head-down) can be determined based on the eye positions in the first image and the human body image in the first image, and then the head-up rate can be determined according to the user's body type. The eye positions can accurately reflect whether the user is head-down or head-up. In the case where the eyes are blocked (resulting in a confidence angle of the eye positions), the body type can also be predicted based on the human body image, without the need for complex face comparison processing, improving the calculation efficiency of the head-up rate while ensuring the accuracy of determining the head-up rate.

[0106] The technical solution of the present application and how the technical solution of the present application solves the above technical problems will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.

[0107] Figure 2 It is a schematic flowchart of a method for determining the head-up rate provided by an embodiment of the present application. Please refer to Figure 2 As shown, the method may include the following steps:

[0108] S201. Obtain a first image collected in a preset scenario.

[0109] The execution subject of the embodiments of the present application may be an electronic device or a head-up rate determination device provided in the electronic device. The head-up rate determination device can be implemented by software or by a combination of software and hardware. The electronic device can be a terminal device or a server.

[0110] The preset scenario may refer to a scenario where the head-up rate needs to be determined, and there are multiple users in the preset scenario. For example, the preset scenario may refer to a classroom teaching scenario, a public speech scenario, etc. The users in the classroom teaching scenario may refer to students, and the users in the public speech scenario may refer to the audience listening to the speech.

[0111] The first image may refer to the image information obtained by a camera device in a preset scenario. The camera device may refer to a monitoring device, a camera device, a video recording device, etc.

[0112] The camera device may capture multiple images or record videos in a preset scenario and send the multiple images or videos to an electronic device. The electronic device may select the first image from the multiple images or videos. To reduce the transmission resources between the camera device and the electronic device, the camera device may select some of the captured multiple images from the continuously captured images and transmit them to the electronic device, or the camera device may select a part of the video from the continuously recorded time-frequency and transmit it to the electronic device.

[0113] After the electronic device receives the multiple images or videos, the electronic device may select the first image from the multiple images or videos. Optionally, the clarity of the first image is greater than or equal to a preset clarity, and the face occlusion ratio in the first image is less than or equal to a preset occlusion ratio, so that the quality of the first image is relatively high, and thus the accuracy of the determined head-up rate is relatively high. Moreover, since the quality of the first image is relatively high, it is possible to determine the head-up rate without performing too many other processes (such as noise reduction processing, color correction processing, etc.) on the first image, so that the efficiency of determining the head-up rate is relatively high.

[0114] S202. Perform human body recognition processing on the first image to determine multiple human body images in the first image.

[0115] The human body recognition processing may refer to identifying multiple existing human body images from the first image through a human body recognition algorithm.

[0116] The multiple human body images can be determined in the following way: Obtain the first image and perform preprocessing on the first image, including noise reduction processing and color correction processing on the first image to improve the accuracy of recognition; perform edge detection on the first image to identify the edge information in the first image; use a human body recognition algorithm to perform human body detection and recognition on the edge information to obtain multiple human body images and the corresponding number of human bodies of the multiple human body images.

[0117] The human body image includes a face region, and the face region may refer to the region where the face is located in the human body image.

[0118] The face region can be determined in the following way: Obtain multiple human body images. For any human body image, perform feature extraction processing on the human body image to extract the key face feature points in the human body image, such as eyes, nose, mouth, ears, etc., and determine the region in the human body image that contains the key face feature points as the face region.

[0119] S203. For any human body image, perform image recognition processing on the face region in the human body image to obtain the human eye center position of the center points of both eyes in the face region and the first confidence level of the human eye center position.

[0120] The center points of both eyes can refer to the geometric center of the two eyes in the image, that is, the center points of the two eyes determined through image recognition processing. Establish a coordinate system with a corner (such as the upper left corner) of the first image as the coordinate origin, and the human eye center position can refer to the coordinate position of the center points of both eyes on this coordinate system.

[0121] The human eye center position can be determined in the following way: perform human eye recognition processing on the face region to obtain left eye information, right eye information, and the first confidence level. The left eye information includes the left eye position and the left eye size of the left eye in the first image, and the right eye information includes the right eye position and the right eye size of the right eye in the first image; determine the human eye center position according to the left eye information and the right eye information.

[0122] Among them, the left eye position can be the coordinate position of the left eye pupil (or the left eye orbit) on the first image, and the right eye position can be the coordinate position of the right eye pupil (or the right eye orbit) on the first image. The first confidence level can refer to the accuracy of determining the human eye center position. The value range of the first confidence level is between 0 and 1. The higher the first confidence level, the more accurate the determined human eye center position.

[0123] The human eye center position can include a horizontal center coordinate and a vertical center coordinate. For example, assuming the human eye center position is (x, y), then x is the horizontal center coordinate and y is the vertical center coordinate.

[0124] Next, in combination with Figure 3 , through specific examples, the coordinate system of the first image will be described.

[0125] Figure 3 For the schematic diagram of the coordinate system of the first image provided by the embodiment of the present application, please refer to Figure 3 , which includes the coordinate system of the first image, the first face region, the first human eye center position, the second face region, and the second human eye center position. Within the first face region, the first center points of both eyes A can be determined, and the coordinate position of the first center points of both eyes A on the first image is the first human eye center position (x1, y1); within the second face region, the second center points of both eyes B can be determined, and the coordinate position of the second center points of both eyes B on the first image is the second human eye center position (x2, y2).

[0126] S204. Determine the target human body type corresponding to the human body image according to the human eye center position, the first confidence level, and the human body image.

[0127] The target human body type can be the head-up type or the head-down type.

[0128] The target human body type can be determined in the following way: determine the initial human body type according to the center position of the human eyes; if the first confidence level of the center position of the human eyes is greater than or equal to the first threshold, determine the initial human body type as the target human body type; if the first confidence level of the center position of the human eyes is less than the first threshold, determine the target human body type according to the human body image and the initial human body type.

[0129] Among them, the first threshold can refer to a value set in advance in the terminal device by the user. For example, the first threshold can be 0.8. The initial human body type can be the head-up type or the head-down type.

[0130] The initial human body type can be determined in the following way: perform face recognition processing on the face area to obtain face information, where the face information includes the face position of the face area in the first image and the face size; determine the first index value according to the horizontal center coordinate, the horizontal face coordinate in the face position, and the face width in the face size; determine the second index value according to the vertical center coordinate, the vertical face coordinate in the face position, and the face height in the face size; if the first index value is within the first preset interval and the second index value is within the second preset interval, determine the initial human body type as the head-up type; if the first index value is not within the first preset interval or the second index value is not within the second preset interval, determine the initial human body type as the head-down type.

[0131] Among them, the first index value is used to indicate the area of the human eyes on the face in the horizontal direction; the second index value is used to indicate the area of the human eyes on the face in the vertical direction.

[0132] S205. Determine the head-up rate corresponding to the preset scenario according to the target human body type corresponding to each human body image.

[0133] Determine the target human body type corresponding to each human body image in sequence, and determine the number of human body images with the target human body type of the head-up type as the number of head-up humans; determine the number of humans according to the first image; divide the number of head-up humans by the number of humans to obtain the head-up rate.

[0134] For example, assume that the number of head-up humans in the preset scenario is 80 and the number of humans is 100, then the head-up rate of the preset scenario can be determined to be 0.8.

[0135] In an embodiment of the present application, when it is necessary to determine the head-up rate, first, a first image collected in a preset scenario can be obtained, and the first image can be obtained by a collection device; the first image can be processed for human body recognition to determine multiple human body images including face regions; the face regions can be processed for image recognition to obtain the human eye center position of the center points of both eyes in the face region and the first confidence level of the human eye center position. According to the human eye center position, the first confidence level, and the human body image, the target human body type corresponding to the human body image is determined, and the target human body type is a head-up type or a head-down type; according to the target human body type corresponding to each human body image, the head-up rate corresponding to the preset scenario is determined. The position of the human eye can accurately reflect whether the user is looking down or up. In the case where the human eye is blocked (resulting in a confidence level angle of the human eye position), the human body type can also be predicted based on the human body image without performing complex face comparison processing, improving the calculation efficiency of the head-up rate while ensuring the accuracy of determining the head-up rate.

[0136] Based on any one of the above embodiments, below, in combination with Figure 4 , a method for determining the target human body type ( Figure 2 S203 - S204 in the embodiment) will be described in detail.

[0137] Figure 4 It is a schematic process diagram of the method for determining the target human body type provided by the embodiment of the present application. Please refer to Figure 4 , the method may include:

[0138] S401. Perform human eye recognition processing in the face region to obtain the first human eye information of the first human eye, the second human eye information of the second human eye, and binocular detection information.

[0139] The first human eye information includes the position of the first human eye in the first image and the size of the first human eye. Among them, the position of the first human eye in the first image may refer to the position of the pupil of the first human eye in the coordinate system of the first image, and the size of the first human eye may include the height and width of the first human eye. The first human eye information can be expressed as P1 = [x1, y1, w1, h1], where [x1, y1] represents the position of the first human eye in the first image, x1 represents the abscissa of the first human eye, y1 represents the ordinate of the first human eye, and [w1, h1] represents the width and height of the first human eye.

[0140] The second human eye information includes the position of the second human eye in the first image and the size of the second human eye. Among them, the position of the second human eye in the first image can refer to the position of the pupil of the second human eye in the coordinate system of the first image, and the size of the second human eye can include the height and width of the second human eye. The second human eye information can be expressed as P2 = [x2, y2, w2, h2], where [x2, y2] represents the position of the second human eye in the first image, x2 represents the abscissa of the second human eye, y2 represents the ordinate of the second human eye, and [w2, h2] represents the width and height of the second human eye.

[0141] The binocular detection information includes the occlusion ratio of the binoculars and the recognition clarity of the binoculars. Among them, the occlusion ratio of the binoculars can refer to the degree of occlusion of the binoculars, and the recognition clarity of the binoculars can refer to the clarity of the binoculars in the first image.

[0142] The occlusion ratio of the binoculars can be determined in the following way: through human eye recognition processing, detect the integrity of the binocular area and determine the area of the occluded area; through the size of the first human eye and the size of the second human eye, the binocular area can be determined; by dividing the area of the occluded area by the binocular area, the occlusion ratio of the binoculars can be obtained.

[0143] The recognition clarity of the binoculars can be determined in the following way: through human eye recognition processing, detect the resolution of the binocular area and determine the resolution of the binocular area as the recognition clarity of the binoculars.

[0144] S402. Determine the human eye types of the first human eye and the second human eye according to the first human eye information and the second human eye information.

[0145] The human eye type is the left eye type or the right eye type.

[0146] The human eye type can be determined in the following way: according to the first human eye information, the abscissa x1 of the first human eye in the first image coordinate system can be determined; according to the second human eye information, the abscissa x2 of the second human eye in the first image coordinate system can be determined; judge whether x1 is greater than x2. If so, determine the human eye type of the first human eye as the right eye type and the human eye type of the second human eye as the left eye type; if not, determine the human eye type of the first human eye as the left eye type and the human eye type of the second human eye as the right eye type.

[0147] For example, assume that the abscissa x1 of the first human eye in the first image coordinate system is 5 and the abscissa x2 of the second human eye in the first image coordinate system is 10. Then x2 > x1, and it can be determined that the human eye type of the first human eye is the left eye type and the human eye type of the second human eye is the right eye type.

[0148] S403. Determine the left-eye information and right-eye information from the first-person eye information and the second-person eye information according to the types of the first-person eye and the second-person eye.

[0149] The left-eye information and right-eye information can be determined in the following way: Obtain the types of the first-person eye and the second-person eye, and determine the person eye information with the left-eye type as the left-eye information and the person eye information with the right-eye type as the right-eye information.

[0150] Among them, the left-eye information includes the position of the left eye in the first image and the size of the left eye, and the right-eye information includes the position of the right eye in the first image and the size of the right eye.

[0151] S404. Determine the first confidence level according to the binocular detection information.

[0152] The first confidence level can be determined in the following way: Determine the occlusion weight and the clarity weight; Multiply the occlusion ratio by the occlusion weight to obtain the first sub-confidence level; Multiply the recognition clarity by the clarity weight to obtain the second sub-confidence level; According to the first sub-confidence level and the second sub-confidence level, the first confidence level can be determined as:

[0153] First confidence level = 1 - first sub-confidence level + second sub-confidence level

[0154] Among them, the occlusion weight can be a value set by the user in the terminal device in advance, which is used to reflect the influence of the occlusion ratio on the accuracy; The clarity weight can be a value set by the user in the terminal device in advance, which is used to reflect the influence of the clarity on the accuracy.

[0155] S405. Determine the center position of the person eyes according to the left-eye information and the right-eye information.

[0156] Assume that the center position of the person eyes can be expressed as [ex, ey], where ex is the horizontal center coordinate, RP.x is the abscissa of the right eye, RP.y is the ordinate of the right eye, RP.w is the width of the right eye, RP.h is the height of the right eye, ey is the vertical center coordinate, LP.x is the abscissa of the left eye, LP.y is the ordinate of the left eye, LP.w is the width of the left eye, and LP.h is the height of the left eye. Then the horizontal center coordinate ex and the vertical center coordinate ey can be determined as:

[0157]

[0158]

[0159] S406. Perform face recognition processing on the face region to obtain face information.

[0160] The face information includes the face position of the face region in the first image and the face size.

[0161] Among them, the position of the face region in the first image can refer to the position of the midpoint of the face region in the coordinate system of the first image, and the midpoint of the face region can refer to the position of the nose in the face region; the face size can include the face width and the face height.

[0162] The face information can be expressed as P3 = [x3, y3, w3, h3], where [x3, y3] represents the position of the face region in the first image, x3 represents the abscissa of the midpoint of the face region, y3 represents the ordinate of the midpoint of the face region, [w3, h3] represents the face size, w3 represents the face width, and h3 represents the face height.

[0163] S407. Determine the first index value according to the horizontal center coordinate, the horizontal face coordinate in the face position, and the face width in the face size.

[0164] The first index value is used to indicate: in the horizontal direction, the position of the human eyes in the face region.

[0165] Assume that ex is the horizontal center coordinate, P3.x is the horizontal face coordinate in the face position, and P3.w is the face width in the face size. Then, the first index value Check1 can be determined as:

[0166] Check1 = (ex - P3.x) / P3.w

[0167] S408. Determine the second index value according to the vertical center coordinate, the vertical face coordinate in the face position, and the face height in the face size.

[0168] The second index value is used to indicate: in the vertical direction, the position of the human eyes in the face region.

[0169] Assume that ey is the vertical center coordinate, P1.y is the vertical face coordinate in the face position, and P1.h is the face height in the face size. Then, the second index value Check2 can be determined as:

[0170] Check2 = (ey - P1.y) / P1.h

[0171] S409. Determine the initial human body type according to the first index value and the second index value.

[0172] The initial human body type can be determined in the following way: obtain the first preset interval and the second preset interval; determine whether it simultaneously satisfies that the first index value is within the first preset interval and the second index value is within the second preset interval. If so, determine that the initial human body type is the head-up type; if not, determine that the initial human body type is the head-down type.

[0173] Among them, the first preset interval and the second preset interval can be values set by the user in the terminal device in advance. For example, the first preset interval can be [0.4, 0.6], and the second preset interval can be [0, 0.45].

[0174] S410. Determine whether the first confidence level of the center position of the human eye is greater than or equal to the first threshold value.

[0175] If so, execute S411.

[0176] If not, execute S412.

[0177] S411. Determine the initial human body type as the target human body type.

[0178] S412. Perform recognition processing on the human body image through a preset model to obtain the predicted human body type and the second confidence level of the predicted human body type.

[0179] The predicted human body type can include a head-up type and a head-down type.

[0180] The preset model is obtained by training with sample data. The sample data includes sample human body images and labeled human body types. The labeled human body types can include a head-up type and a head-down type.

[0181] The second confidence level can refer to the accuracy of the predicted human body type. The value range of the second confidence level is from 0 to 1. The higher the second confidence level, the higher the accuracy of the predicted human body type.

[0182] The second confidence level can be determined in the following way: Determine the occlusion weight of the human body image and the clarity weight of the human body image; Multiply the occlusion ratio of the human body image and the occlusion weight of the human body image to determine the third sub-confidence level; Multiply the recognition clarity and the clarity weight to determine the fourth sub-confidence level; According to the third sub-confidence level and the fourth sub-confidence level, the second confidence level can be determined as:

[0183] Second confidence level = 1 - third sub-confidence level + fourth sub-confidence level

[0184] Optionally, the second confidence level can also be obtained through the output of the preset model.

[0185] Among them, the occlusion weight of the human body image can be a value set by the user in the terminal device in advance, which is used to reflect the influence of the occlusion ratio on the accuracy rate; The clarity weight of the human body image can be a value set by the user in the terminal device in advance, which is used to reflect the influence of the clarity on the accuracy rate.

[0186] The occlusion ratio of the human body image can be determined in the following way: Through human body recognition processing, the integrity of the human body image is detected, and the area of the occluded area of the human body image is determined; the area of the human body image is determined, and by dividing the area of the occluded area by the area of the human body image, the occlusion ratio of the human body image can be obtained.

[0187] The recognition clarity of the human body image can be determined in the following way: Through human body recognition processing, the resolution of the human body image is detected, and the resolution of the human body image is determined as the recognition clarity of both eyes.

[0188] S413. Determine whether the second confidence level is greater than or equal to the second threshold.

[0189] The second threshold can be a threshold pre-set by the user in the terminal device. For example, the second threshold can be 0.7.

[0190] If so, execute S416.

[0191] If not, execute S414.

[0192] S414. Determine whether the predicted human body type is the same as the initial human body type.

[0193] If so, execute S416.

[0194] If not, execute S415.

[0195] S415. Determine the human body type with the highest corresponding confidence level among the predicted human body type and the initial human body type as the target human body type.

[0196] S416. Determine the predicted human body type as the target human body type.

[0197] In an embodiment of the present application, when it is necessary to determine the head-up rate, human eye recognition processing can be performed within the face region to obtain first human eye information, second human eye information, the occlusion ratio of both eyes, and the recognition clarity of both eyes; according to the first human eye information and the second human eye information, the abscissa of the first human eye and the abscissa of the second human eye can be determined, so as to determine the human eye types of the first human eye and the second human eye; according to the human eye types, the left eye information and the right eye information can be determined from the first human eye information and the second human eye information; according to the occlusion ratio of both eyes and the recognition clarity of both eyes, a first confidence level can be determined. By pre-determining the first confidence level, the accuracy of the human eye center position can be improved; according to the left eye information and the right eye information, the human eye center position can be determined; performing face recognition processing on the face region can obtain face information, where the face information includes the face position of the face region in the first image and the face size; according to the horizontal center coordinate, the horizontal face coordinate in the face position, and the face width in the face size, a first index value can be determined; according to the vertical center coordinate, the vertical face coordinate in the face position, and the face height in the face size, a second index value can be determined; according to the first index value and the second index value, the initial human body type can be determined as the head-up type or the head-down type; determining whether the first confidence level of the human eye center position is greater than or equal to a first threshold value. If so, the initial human body type is determined as the target human body type; if not, performing recognition processing on the human body image through a preset model to obtain a predicted human body type and a second confidence level of the predicted human body type; if the second confidence level is greater than or equal to a second threshold value, the predicted human body type is determined as the target human body type; if the second confidence level is less than the second threshold value and the predicted human body type is the same as the initial human body type, the predicted human body type is determined as the target human body type; if the second confidence level is less than the second threshold value but the predicted human body type is different from the initial human body type, the human body type with the maximum corresponding confidence level among the predicted human body type and the initial human body type is determined as the target human body type. Through the above method, only the position of the center point of both eyes and the first confidence level of the human eye center position need to be determined through human body recognition processing, and the target human body type is judged according to the position of the center point of both eyes. If the first confidence level is low, then the human body image is further recognized to determine the target human body model, without requiring a large amount of computing resources, and the calculation efficiency of the head-up rate is improved.

[0198] Figure 5 FIG. is a schematic structural diagram of a device for determining the head-up rate provided by an embodiment of the present application. Please refer to Figure 5 As shown in, the device 10 for determining the head-up rate includes: an acquisition module 11, a first determination module 12, a recognition processing module 13, a second determination module 14, and a third determination module 15, where

[0199] The acquisition module 11 is configured to acquire a first image collected in a preset scenario, where there are multiple users in the preset scenario;

[0200] The first determination module 12 is configured to perform human body recognition processing on the first image, determine multiple human body images in the first image, and the human body images include face regions;

[0201] The recognition processing module 13 is configured to perform image recognition processing on the face region in any one of the human body images, and obtain the human eye center position of the center points of both eyes in the face region and the first confidence level of the human eye center position;

[0202] The second determination module 14 is configured to determine the target human body type corresponding to the human body image according to the human eye center position, the first confidence level, and the human body image, and the target human body type is a head-up type or a head-down type;

[0203] The third determination module 15 is configured to determine the head-up rate corresponding to the preset scenario according to the target human body type corresponding to each human body image.

[0204] The determination device for the head-up rate provided by the embodiment of the present application can execute the technical solutions shown in the above method embodiments, and its implementation principle and beneficial effects are similar, and will not be described in detail here.

[0205] In a possible design, the recognition processing module 13 is specifically configured to:

[0206] Perform human eye recognition processing on the face region to obtain left eye information, right eye information, and the first confidence level. The left eye information includes the left eye position and left eye size of the left eye in the first image, and the right eye information includes the right eye position and right eye size of the right eye in the first image;

[0207] Determine the human eye center position according to the left eye information and the right eye information.

[0208] In a possible design, the recognition processing module 13 is specifically configured to:

[0209] Perform human eye recognition processing in the face region to obtain the first human eye information of the first human eye, the second human eye information of the second human eye, and binocular detection information. The first human eye information includes the position of the first human eye in the first image and the size of the first human eye, and the second human eye information includes the position of the second human eye in the first image and the size of the second human eye;

[0210] Determine the human eye type of the first human eye and the second human eye according to the first human eye information and the second human eye information, and the human eye type is a left eye type or a right eye type;

[0211] Determine the left-eye information and the right-eye information from the first human eye information and the second human eye information according to the types of the first human eye and the second human eye;

[0212] Determine the first confidence level according to the binocular detection information.

[0213] In a possible design, the recognition processing module 13 is specifically configured to:

[0214] Determine the horizontal center coordinate according to the following formula: ;

[0215] Determine the vertical center coordinate according to the following formula: ;

[0216] Determine that the human eye center position includes the horizontal center coordinate and the vertical center coordinate;

[0217] Wherein, the ex is the horizontal center coordinate, the RP.x is the abscissa of the right eye, the RP.y is the ordinate of the right eye, the RP.w is the width of the right eye, the RP.h is the height of the right eye, the ey is the vertical center coordinate, the LP.x is the abscissa of the left eye, the LP.y is the ordinate of the left eye, the LP.w is the width of the left eye, and the LP.h is the height of the left eye.

[0218] In a possible design, the recognition processing module 13 is specifically configured to:

[0219] Determine the occlusion weight and the clarity weight;

[0220] Determine the product of the occlusion ratio and the occlusion weight as the first sub-confidence level;

[0221] Determine the product of the recognition clarity and the clarity weight as the second sub-confidence level;

[0222] Determine the first confidence level according to the first sub-confidence level and the second sub-confidence level.

[0223] In a possible design, the second determination module 14 is specifically configured to:

[0224] Determine the initial human body type according to the human eye center position;

[0225] If the first confidence level of the human eye center position is greater than or equal to the first threshold, determine the initial human body type as the target human body type;

[0226] If the first confidence level of the human eye center position is less than the first threshold, determine the target human body type according to the human body image and the initial human body type.

[0227] In a possible design, the second determination module 14 is specifically configured to:

[0228] Perform face recognition processing on the face region to obtain face information, where the face information includes the face position of the face region in the first image and the face size;

[0229] Determine a first index value according to the horizontal center coordinate, the horizontal face coordinate in the face position, and the face width in the face size, where the first index value is used to indicate the area of the human eyes in the face in the horizontal direction;

[0230] Determine a second index value according to the vertical center coordinate, the vertical face coordinate in the face position, and the face height in the face size, where the second index value is used to indicate the area of the human eyes in the face in the vertical direction;

[0231] Determine the initial human body type according to the first index value and the second index value.

[0232] In a possible design, the second determination module 14 is specifically configured to:

[0233] If the first index value is within a first preset interval and the second index value is within a second preset interval, then determine that the initial human body type is the looking-up type;

[0234] If the first index value is not within the first preset interval or the second index value is not within the second preset interval, then determine that the initial human body type is the looking-down type.

[0235] In a possible design, the second determination module 14 is specifically configured to:

[0236] Perform recognition processing on the human body image through a preset model to obtain a predicted human body type and a second confidence level of the predicted human body type;

[0237] If the second confidence level is greater than or equal to a second threshold, then determine the predicted human body type as the target human body type;

[0238] If the second confidence level is less than the second threshold, if the predicted human body type is the same as the initial human body type, then determine the predicted human body type as the target human body type, and if the predicted human body type is different from the initial human body type, then determine the human body type with the maximum corresponding confidence level among the predicted human body type and the initial human body type as the target human body type.

[0239] The determination device for head-up rate provided by the embodiments of the present application can execute the technical solutions shown in the above method embodiments. The implementation principles and beneficial effects are similar, and will not be elaborated here.

[0240] Figure 6 It is a schematic structural diagram of the electronic device provided by the embodiments of the present application. As Figure 6 shown, the electronic device 20 may include: a transceiver 21, a processor 22, and a memory 23.

[0241] The processor 22 executes the computer execution instructions stored in the memory, so that the processor 22 executes the solutions in the above embodiments. The processor 22 may be a general-purpose processor, including a central processing unit CPU, a network processor (NP), etc.; it may also be a digital signal processor DSP, an application specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0242] The memory 23 is connected to the processor 22 through the system bus and completes the communication with each other. The memory 23 is used to store computer program instructions.

[0243] The transceiver 21 may be used to obtain the task to be run and the configuration information of the task to be run.

[0244] The system bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus may be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity, only a thick line is used in the figure to represent it, but it does not mean that there is only one bus or one type of bus. The transceiver is used to realize the communication between the database access device and other computers (such as clients, read-write libraries, and read-only libraries). The memory may include a random access memory (RAM), and may also include a non-volatile memory.

[0245] The electronic device provided by the embodiments of the present application may be the terminal device in the above embodiments.

[0246] The embodiments of the present application further provide a chip for running instructions. The chip is used to execute the technical solutions of the method for determining the head-up rate in the above embodiments.

[0247] The embodiments of the present application also provide a computer-readable storage medium. Computer instructions are stored in the computer-readable storage medium. When the computer instructions run on a computer, the computer is enabled to execute the technical solution of the method for determining the head-up rate in the above embodiments.

[0248] The embodiments of the present application also provide a computer program product. The computer program product includes a computer program which is stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When the at least one processor executes the computer program, the technical solution of the method for determining the head-up rate in the above embodiments can be implemented.

[0249] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces. The indirect couplings or communication connections of devices or modules can be in electrical, mechanical or other forms.

[0250] The modules described as separate components may or may not be physically separated. The components displayed as modules may or may not be physical units, that is, they can be located in one place, or can be distributed to multiple network units. Some or all of the modules can be selected according to actual needs to implement the solution of this embodiment.

[0251] In addition, in each embodiment of the present application, the functional modules can be integrated in a processing unit, or each module exists physically alone, or two or more modules can be integrated in a unit. The units formed by the above modules can be implemented in the form of hardware, or in the form of a combination of hardware and software functional units.

[0252] The integrated modules implemented in the form of software functional modules can be stored in a computer-readable storage medium. The above software functional modules are stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute some steps of the methods in each embodiment of the present application.

[0253] It should be understood that the above-mentioned processor can be a Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in combination with the invention can be directly embodied as being executed and completed by a hardware processor, or can be executed and completed by a combination of hardware and software modules in the processor.

[0254] The memory may include high-speed RAM memory, and may also include non-volatile storage NVM, such as at least one disk memory, and can also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk, or an optical disc, etc.

[0255] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience in representation, the buses in the attached drawings of this application are not limited to only one bus or one type of bus.

[0256] The above-mentioned storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disc. The storage medium can be any available medium that can be accessed by a general-purpose or special-purpose computer.

[0257] An exemplary storage medium is coupled to the processor, so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an Application Specific Integrated Circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic control unit or a master control device.

[0258] Those of ordinary skill in the art will understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments; and the aforementioned storage medium includes various media that can store program codes, such as ROM, RAM, magnetic disks, or optical discs.

[0259] 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 them; although the present application 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 or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for determining the head-up rate, characterized in that, Including: Obtain a first image collected in a preset scenario where there are multiple users; Perform human body recognition processing on the first image, and determine multiple human body images in the first image, where the human body images include face regions; For any one human body image, perform image recognition processing on the face region in the human body image to obtain the eye center position of the two eyes in the face region and the first confidence level of the eye center position, and perform face recognition processing on the face region to obtain face information. The first confidence level is determined by the occlusion ratio of the two eyes and the recognition clarity of the two eyes; Determine an initial human body type according to the eye center position and the face information; If the first confidence level of the eye center position is greater than or equal to a first threshold, determine the initial human body type as the target human body type; If the first confidence level of the eye center position is less than the first threshold, perform recognition processing on the human body image through a preset model to obtain a predicted human body type and a second confidence level of the predicted human body type. If the second confidence level is greater than or equal to a second threshold, determine the predicted human body type as the target human body type; If the second confidence level is less than the second threshold, if the predicted human body type is the same as the initial human body type, determine the predicted human body type as the target human body type. If the predicted human body type is different from the initial human body type, determine the human body type with the maximum corresponding confidence level among the predicted human body type and the initial human body type as the target human body type. The target human body type is a head-up type or a head-down type, and the second confidence level is determined by the occlusion ratio of the human body image and the recognition clarity of the human body image; Determine the head-up rate corresponding to the preset scenario according to the target human body type corresponding to each human body image.

2. The method according to claim 1, characterized in that, Performing image recognition processing on the face region in the human body image to obtain the eye center position of the two eyes in the face region and the first confidence level of the eye center position includes: Perform eye recognition processing on the face region to obtain left eye information, right eye information, and the first confidence level. The left eye information includes the left eye position and left eye size of the left eye in the first image, and the right eye information includes the right eye position and right eye size of the right eye in the first image; Determine the eye center position according to the left eye information and the right eye information.

3. The method according to claim 2, wherein Performing eye recognition processing on the face region to obtain left eye information, right eye information, and the first confidence level includes: Perform eye recognition processing in the face region to obtain the first eye information of the first eye, the second eye information of the second eye, and binocular detection information. The first eye information includes the position of the first eye in the first image and the size of the first eye, and the second eye information includes the position of the second eye in the first image and the size of the second eye; Determine the human eye types of the first human eye and the second human eye according to the first human eye information and the second human eye information, where the human eye types are left eye types or right eye types; Determine the left eye information and the right eye information in the first human eye information and the second human eye information according to the human eye types of the first human eye and the second human eye; Determine the first confidence level according to the binocular detection information.

4. The method according to claim 2 or 3, characterized in that, Determine the human eye center position according to the left eye information and the right eye information, including: Determine the horizontal center coordinate according to the following formula: ; Determine the vertical center coordinate according to the following formula: ; Determine that the human eye center position includes the horizontal center coordinate and the vertical center coordinate; Wherein, ex is the horizontal center coordinate, RP.x is the abscissa of the right eye, RP.y is the ordinate of the right eye, RP.w is the width of the right eye, RP.h is the height of the right eye, ey is the vertical center coordinate, LP.x is the abscissa of the left eye, LP.y is the ordinate of the left eye, LP.w is the width of the left eye, and LP.h is the height of the left eye.

5. The method according to claim 3, characterized in that The binocular detection information includes the occlusion ratio of both eyes and the recognition clarity of both eyes; determining the first confidence level according to the binocular detection information includes: Determine the occlusion weight and the clarity weight; Determine the product of the occlusion ratio and the occlusion weight as the first sub-confidence level; Determine the product of the recognition clarity and the clarity weight as the second sub-confidence level; Determine the first confidence level according to the first sub-confidence level and the second sub-confidence level.

6. The method according to claim 1, characterized in that The human eye center position includes a horizontal center coordinate and a vertical center coordinate; determining the initial human body type according to the human eye center position and the face information includes: The face information includes the face position of the face area in the first image and the face size; Determine a first index value according to the horizontal center coordinate, the horizontal face coordinate in the face position, and the face width in the face size, where the first index value is used to indicate the area of the human eye on the face in the horizontal direction; Determine a second index value according to the vertical center coordinate, the vertical face coordinate in the face position, and the face height in the face size, where the second index value is used to indicate the area of the human eye on the face in the vertical direction; Determine the initial human body type according to the first index value and the second index value.

7. The method according to claim 6, wherein Determine the initial human body type according to the first index value and the second index value, including: If the first index value is within a first preset interval and the second index value is within a second preset interval, then determine that the initial human body type is the head-up type; If the first index value is not within the first preset interval, or the second index value is not within the second preset interval, then determine that the initial human body type is the head-down type.

8. A device for determining the head-up rate, characterized in that Include: An acquisition module, a first determination module, an identification processing module, a second determination module, and a third determination module, where The acquisition module is used to acquire a first image collected in a preset scenario, and there are multiple users in the preset scenario; The first determination module is configured to perform human body recognition processing on the first image, determine multiple human body images in the first image, and the human body images include face regions; The recognition processing module is configured to, for any one of the human body images, perform image recognition processing on the face region in the human body image to obtain the human eye center position of the center points of both eyes in the face region and the first confidence level of the human eye center position, and the first confidence level is determined by the occlusion ratio of both eyes and the recognition clarity of both eyes; The second determination module is configured to perform human face recognition processing on the face region to obtain face information; determine an initial human body type according to the human eye center position and the face information; if the first confidence level of the human eye center position is greater than or equal to a first threshold, determine the initial human body type as the target human body type; if the first confidence level of the human eye center position is less than the first threshold, perform recognition processing on the human body image through a preset model to obtain a predicted human body type and the second confidence level of the predicted human body type, and if the second confidence level is greater than or equal to a second threshold, determine the predicted human body type as the target human body type; if the second confidence level is less than the second threshold, if the predicted human body type is the same as the initial human body type, determine the predicted human body type as the target human body type, and if the predicted human body type is different from the initial human body type, determine the human body type with the maximum corresponding confidence level among the predicted human body type and the initial human body type as the target human body type, and the target human body type is a head-up type or a head-down type, and the second confidence level is determined by the occlusion ratio of the human body image and the recognition clarity of the human body image; The third determination module is configured to determine the head-up rate corresponding to the preset scenario according to the target human body type corresponding to each human body image.

9. An electronic device, characterized in that, Comprising: a processor, and a memory communicatively connected to the processor; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are executed by the processor, they are used to implement the method according to any one of claims 1 to 7.

11. A computer program product, characterized in that, Comprising a computer program, which when executed by the processor implements the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Classroom listener head-up rate detection method based on a deep learning network

    CN109492594A