Head raising rate determination method and device, equipment and storage medium
By collecting images in a preset scene, and determining the user's head-up type using the center position and confidence of the human eye, the problem of low head-up rate calculation efficiency in the prior art is solved, and efficient head-up rate calculation is achieved.
Patent Information
- Application Number
- CN202510134918.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-07
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2045-02-07
AI Technical Summary
In the prior art, the calculation efficiency of head-up rate is low, mainly because it is necessary to recognize the full face features of the face image, which consumes a lot of computing resources.
By collecting images in a preset scene, performing human body recognition processing, determining the face area in the human body image, and using the center position and confidence of the human eye to determine the user's head-up type, thereby calculating the head-up rate. This method does not require complex face comparison processing, which improves computing efficiency.
On the basis of ensuring the accuracy of the head-up rate, it improves the efficiency of head-up rate calculation and reduces the demand for computing resources.
Smart Images

Figure CN119580018A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, equipment and storage medium for determining a head-up rate. Background Art
[0002] In some scenarios, the head-up rate can be analyzed to evaluate the user's attention to a target object. For example, in a 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 an image. First, the image to be detected can be obtained, and the face image and the number of faces in the image to be detected can be determined by face recognition, and the face image and the face image in the preset head-up state are compared for similarity, and the human posture corresponding to the face image with high similarity is determined as head-up, and then the number of targets with head-up posture in the image 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, the full facial features of the face image need to be recognized, which requires large computing resources, resulting in low calculation efficiency of the head-up rate. Summary of the invention
[0005] The present application provides a method, device, equipment and storage medium for determining head-up rate, so as to solve the problem of low efficiency in calculating head-up rate.
[0006] In a first aspect, the present application provides a method for determining a user type, comprising:
[0007] Acquire a first image captured in a preset scene, where a plurality of users exist in the preset scene;
[0008] Performing human body recognition processing on the first image to determine a plurality of human body images in the first image, wherein the human body images include human face areas;
[0009] For any human body image, perform image recognition processing on a human face region in the human body image to obtain a human eye center position of a center point of both eyes in the human face region and a first confidence level of the human eye center position;
[0010] Determine, according to the center position of the human eye, the first confidence level, and the human image, a target human body type corresponding to the human body image, the target human body type being a head-up type or a head-down type;
[0011] The head-up rate corresponding to the preset scene is determined according to the target human body type corresponding to each human body image.
[0012] In a possible design, performing image recognition processing on a face region in the human body image to obtain a human eye center position of a binocular center point in the face region and a first confidence level of the human eye center position includes:
[0013] Performing eye recognition processing on the face area to obtain left eye information, right eye information, and the first confidence level, wherein the left eye information includes a left eye position and a left eye size of the left eye in the first image, and the right eye information includes a right eye position and a right eye size of the right eye in the first image;
[0014] The center position of the human eye is determined according to the left eye information and the right eye information.
[0015] In a possible design, performing eye recognition processing on the face region to obtain left eye information, right eye information, and the first confidence level includes:
[0016] Performing eye recognition processing in the face area to obtain first eye information of a first eye, second eye information of a second eye, and binocular detection information, wherein the first eye information includes a position of the first eye in the first image and a size of the first eye, and the second eye information includes a position of the second eye in the first image and a size of the second eye;
[0017] Determine the eye types of the first eye and the second eye according to the first eye information and the second eye information, where the eye type is a left eye type or a right eye type;
[0018] Determining the left eye information and the right eye information in the first eye information and the second eye information according to the eye types of the first eye and the second eye;
[0019] The first confidence level is determined according to the binocular detection information.
[0020] In a possible design, determining the center position of the human eye according to the left eye information and the right eye information includes:
[0021] Determine the horizontal center coordinates according to the following formula: ;
[0022] Determine the longitudinal center coordinates according to the following formula: ;
[0023] Determining the center position of the human eye includes the horizontal center coordinate and the vertical center coordinate;
[0024] Among them, ex is the horizontal center coordinate, RP.x is the horizontal coordinate of the right eye, RP.y is the vertical coordinate 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 horizontal coordinate of the left eye, LP.y is the vertical coordinate of the left eye, LP.w is the width of the left eye, and LP.h is the height of the left eye.
[0025] In a possible design, the binocular detection information includes an occlusion ratio of the binoculars and recognition clarity of the binoculars; and determining the first confidence level according to the binocular detection information includes:
[0026] Determining the occlusion weight and the clarity weight;
[0027] Determine the product of the occlusion ratio and the occlusion weight as a first sub-confidence;
[0028] Determine the product of the recognition clarity and the clarity weight as a second sub-confidence;
[0029] The first confidence criterion is determined according to the first sub-confidence criterion and the second sub-confidence criterion.
[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] Determining an initial human body type according to the center position of the human eye;
[0032] If the first confidence level of the center position of the human eye is greater than or equal to a first threshold, determining the initial human body type as the target human body type;
[0033] If the first confidence level of the center position of the human eye is less than the first threshold, the target human body type is determined according to the human body image and the initial human body type.
[0034] In a possible design, the center position of the human eye includes a horizontal center coordinate and a vertical center coordinate; determining the initial human body type according to the center position of the human eye includes:
[0035] Performing face recognition processing on the face area to obtain face information, wherein the face information includes the face position and face size of the face area in the first image;
[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, wherein the first index value is used to indicate: an area of the human eye on the face in the horizontal direction;
[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, wherein the second index value is used to indicate: an area of the human eye on the face in the longitudinal direction;
[0038] The initial human body type is determined 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 indicator value is within a first preset interval and the second indicator value is within a second preset interval, determining that the initial human body type is the head-up type;
[0041] If the first indicator value is not within the first preset interval, or the second indicator value is not within the second preset interval, it is determined 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] 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;
[0044] If the second confidence level is greater than or equal to a second threshold, determining the predicted human body type as the target human body type;
[0045] If the second confidence level is less than the second threshold value, if 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 predicted human body type is different from the initial human body type, the human body type with the highest corresponding confidence level between the predicted human body type and the initial human body type is determined as the target human body type.
[0046] In a second aspect, the present application provides a device for determining head-up rate, comprising: an acquisition module, a first determination module, a recognition processing module, a second determination module and a third determination module, wherein:
[0047] The acquisition module is used to acquire a first image captured in a preset scene, where there are multiple users in the preset scene;
[0048] The first determination module is used to perform human body recognition processing on the first image, and determine a plurality of human body images in the first image, wherein the human body images include human face areas;
[0049] The recognition processing module is used to perform image recognition processing on a face area in any human image to obtain the eye center position of the center points of both eyes in the face area and a first confidence level of the eye center position;
[0050] The second determination module is used 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, the target human body type being a head-up type or a head-down type;
[0051] The third determination module is used to determine the head-up rate corresponding to the preset scene according to the target human body type corresponding to each human body image.
[0052] In a possible design, the identification processing module is specifically used for:
[0053] Performing eye recognition processing on the face area to obtain left eye information, right eye information, and the first confidence level, wherein the left eye information includes a left eye position and a left eye size of the left eye in the first image, and the right eye information includes a right eye position and a right eye size of the right eye in the first image;
[0054] The center position of the human eye is determined according to the left eye information and the right eye information.
[0055] In a possible design, the identification processing module is specifically used for:
[0056] Performing eye recognition processing in the face area to obtain first eye information of a first eye, second eye information of a second eye, and binocular detection information, wherein the first eye information includes a position of the first eye in the first image and a size of the first eye, and the second eye information includes a position of the second eye in the first image and a 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, where the eye type is a left eye type or a right eye type;
[0058] Determining the left eye information and the right eye information in the first eye information and the second eye information according to the eye types of the first eye and the second eye;
[0059] The first confidence level is determined according to the binocular detection information.
[0060] In a possible design, the identification processing module is specifically used for:
[0061] Determine the horizontal center coordinates according to the following formula: ;
[0062] Determine the longitudinal center coordinates according to the following formula: ;
[0063] Determining the center position of the human eye includes the horizontal center coordinate and the vertical center coordinate;
[0064] Among them, ex is the horizontal center coordinate, RP.x is the horizontal coordinate of the right eye, RP.y is the vertical coordinate 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 horizontal coordinate of the left eye, LP.y is the vertical coordinate of the left eye, LP.w is the width of the left eye, and LP.h is the height of the left eye.
[0065] In a possible design, the identification processing module is specifically used for:
[0066] Determining the occlusion weight and the clarity weight;
[0067] Determine the product of the occlusion ratio and the occlusion weight as a first sub-confidence;
[0068] Determine the product of the recognition clarity and the clarity weight as a second sub-confidence;
[0069] The first confidence criterion is determined according to the first sub-confidence criterion and the second sub-confidence criterion.
[0070] In a possible design, the second determining module is specifically used to:
[0071] Determining an 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 a first threshold, determining 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, the target human body type is determined according to the human body image and the initial human body type.
[0074] In a possible design, the second determining module is specifically used to:
[0075] Performing face recognition processing on the face area to obtain face information, wherein the face information includes the face position and face size of the face area in the first image;
[0076] 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, wherein the first index value is used to indicate: an area of the human eye on the face in the horizontal direction;
[0077] 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, wherein the second index value is used to indicate: an area of the human eye on the face in the longitudinal direction;
[0078] The initial human body type is determined according to the first index value and the second index value.
[0079] In a possible design, the second determining module is specifically used to:
[0080] If the first indicator value is within a first preset interval and the second indicator value is within a second preset interval, determining that the initial human body type is the head-up type;
[0081] If the first indicator value is not within the first preset interval, or the second indicator value is not within the second preset interval, it is determined that the initial human body type is the head-down type.
[0082] In a possible design, the second determining module is specifically used to:
[0083] 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;
[0084] If the second confidence level is greater than or equal to a second threshold, determining the predicted human body type as the target human body type;
[0085] If the second confidence level is less than the second threshold value, if 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 predicted human body type is different from the initial human body type, the human body type with the highest corresponding confidence level between the predicted human body type and the initial human body type is determined as the target human body type.
[0086] In a third aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor and a memory; the memory stores computer execution instructions; 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 head-up rate as described in the first aspect above and various possible designs of the first aspect.
[0087] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the method for determining the head-up rate as described in the first aspect and various possible designs of the first aspect is implemented.
[0088] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the method for determining the head-up rate as described in the first aspect and various possible designs of the first aspect.
[0089] The head-up rate determination method, device, equipment and storage medium provided in the present application can determine the head-up rate for the first image based on the eye position in the first image and the human image in the first image to determine the user's body type (head up or head down), and then determine the head-up rate based on the user's body type. The eye position can accurately reflect whether the user is looking down or up. In the case where the eye is blocked (resulting in the confidence angle of the eye position), the body type can also be predicted based on the human image, without the need for complex face comparison processing. On the basis of ensuring the accuracy of determining the head-up rate, the calculation efficiency of the head-up rate is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0090] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0091] Figure 1 A schematic diagram of the system architecture provided for an embodiment of the present application;
[0092] Figure 2 A flowchart of a method for determining a head-up rate provided in an embodiment of the present application;
[0093] Figure 3 A schematic diagram of a coordinate system of a first image provided in an embodiment of the present application;
[0094] Figure 4 A schematic diagram of the process of the method for determining the target human body type provided in an embodiment of the present application;
[0095] Figure 5 A schematic diagram of the structure of a device for determining head-up rate provided in an embodiment of the present application;
[0096] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0097] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope 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
[0098] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, 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 used for analysis, stored data, displayed data, etc.) involved in one or more embodiments of this specification are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and corresponding operation entrances shall be provided for users to choose to authorize or refuse.
[0100] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0101] For ease of understanding, the following Figure 1 , the system architecture applicable to the embodiments of the present application is described.
[0102] Figure 1 This is a schematic diagram of the system architecture provided by the embodiment of this application. Figure 1 , including a camera device 101 and an electronic device 102. The camera device 101 may be a camera, a monitoring device, etc. The camera device 101 may capture images or videos of a preset scene. For example, the camera device 101 may be a monitoring device in a classroom. The electronic device 101 may be a terminal device or a server. The camera device 101 may send the captured pictures or videos to the electronic device 101, and the electronic device 101 may process the received pictures or videos.
[0103] In the related art, the head-up rate can be determined by performing face recognition on an image. First, the image to be detected can be obtained, and the face image and the number of faces in the image to be detected can be determined by face recognition. The face image and the pre-acquired complete face image are compared for similarity, and the human posture corresponding to the face image with high similarity is determined as head-up. Then, the number of targets with head-up posture in the image 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, the full facial features of the face image need to be recognized, which requires large computing resources, resulting in low calculation efficiency of the head-up rate.
[0105] In view of the above problems, in the embodiment of the present application, when it is necessary to determine the head-up rate for the first image, the user's body type (head-up or head-down) can be determined based on the eye position in the first image and the body image in the first image, and then the head-up rate is determined based on the user's body type. The eye position can accurately reflect whether the user is looking down or up. In the case where the eye is blocked (resulting in the confidence angle of the eye position), the body type can also be predicted based on the body image, without the need for complex face comparison processing. On the basis of ensuring the accuracy of determining the head-up rate, the calculation efficiency of the head-up rate is improved.
[0106] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following 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 in conjunction with the accompanying drawings.
[0107] Figure 2 A flowchart of a method for determining head-up rate provided in an embodiment of the present application. Figure 2 As shown, the method may include the following steps:
[0108] S201: Acquire a first image captured in a preset scene.
[0109] The execution subject of the embodiment of the present application may be an electronic device, or a head-up rate determination device set in the electronic device. The head-up rate determination device may be implemented by software, or by a combination of software and hardware. The electronic device may be a terminal device or a server.
[0110] The preset scene may refer to a scene where the head-up rate needs to be determined, and there are multiple users in the preset scene. For example, the preset scene may refer to a classroom teaching scene, a public speech scene, etc. The users in the classroom teaching scene may refer to students, and the users in the public speech scene may refer to audiences who come to listen to the speech.
[0111] The first image may refer to image information acquired by a camera device in a preset scene, and the camera device may refer to a monitoring device, a camera device, a recording device, and the like.
[0112] The camera device can capture multiple images or record videos in a preset scene, and send the multiple images or videos to the electronic device, and the electronic device can select the first image from the multiple images or videos. In order to reduce the transmission resources between the camera device and the electronic device, the camera device can select part of the multiple images captured from the continuously captured images to transmit to the electronic device, or the camera device can select part of the videos from the continuously recorded time frequency to transmit to the electronic device.
[0113] After the electronic device receives multiple images or videos, the electronic device can 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 high, and thus the head-up rate determined is more accurate, and because the quality of the first image is high, the head-up rate can be determined without performing too much other processing (for example, noise reduction processing, color correction processing, etc.) on the first image, so that the efficiency of determining the head-up rate is higher.
[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 process may refer to recognizing a plurality of existing human body images from the first image by using a human body recognition algorithm.
[0116] Multiple human body images can be determined in the following manner: acquiring a first image, preprocessing the first image, including performing noise reduction and color correction on the first image to improve recognition accuracy; performing edge detection on the first image to identify edge information within the first image; using a human body recognition algorithm to perform human body detection and recognition on the edge information to obtain multiple human body images, and the number of human bodies corresponding to the multiple human body images.
[0117] The human body image includes a face region, and the face region may refer to a region in the human body image where the face is located.
[0118] The face region may be determined in the following manner: multiple human body images are acquired, and for any human body image, feature extraction processing is performed on the human body image to extract key facial feature points in the human body image, such as eyes, nose, mouth, ears, etc., and the region in the human body image containing the key facial feature points is determined as the face region.
[0119] S203: for any human body image, perform image recognition processing on the human face region in the human body image to obtain the human eye center position of the center points of both eyes in the human face region and the first confidence level of the human eye center position.
[0120] The binocular center point may refer to the geometric center of the two eyes in the image, that is, the binocular center point determined by the image recognition process. A coordinate system is established with a corner (e.g., the upper left corner) of the first image as the origin of the coordinates, and the center position of the human eye may refer to the coordinate position of the binocular center point on the coordinate system.
[0121] The center position of the human eye can be determined in the following manner: perform eye recognition processing on the face area to obtain left eye information, right eye information, and a first confidence level, wherein 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 center position of the human eye based on the left eye information and the right eye information.
[0122] The left eye position may be the coordinate position of the left eyeball (or left eye socket) on the first image, and the right eye position may be the coordinate position of the right eyeball (or right eye socket) on the first image. The first confidence level may refer to the accuracy of determining the center position of the human eye. The value range of the first confidence level is between 0 and 1. The higher the first confidence level, the more accurate the center position of the human eye is.
[0123] The center position of the human eye may include a horizontal center coordinate and a vertical center coordinate. For example, assuming that the center position of the human eye is (x, y), then x is the horizontal center coordinate, and y is the vertical center coordinate.
[0124] Next, combine Figure 3 , the coordinate system of the first image is explained through a specific example.
[0125] Figure 3 For a schematic diagram of the coordinate system of the first image provided in the embodiment of the present application, see Figure 3 , including the coordinate system of the first image, the first face area, the first eye center position, the second face area, and the second eye center position. In the first face area, the first binocular center point A can be determined, and the coordinate position of the first binocular center point A on the first image is the first eye center position (x1, y1); in the second face area, the second binocular center point B can be determined, and the coordinate position of the second binocular center point B on the first image is the second eye center position (x2, y2).
[0126] S204: Determine a 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 a head-up type or a head-down type.
[0128] The target human body type can be determined in the following manner: an initial human body type is determined based on the center position of the human eye; if the first confidence level of the center position of the human eye is greater than or equal to a first threshold, the initial human body type is determined as the target human body type; if the first confidence level of the center position of the human eye is less than the first threshold, the target human body type is determined based on the human body image and the initial human body type.
[0129] The first threshold may refer to a value set in advance by the user in the terminal device, for example, the first threshold may be 0.8. The initial human body type may be a head-up type or a head-down type.
[0130] The initial human body type can be determined in the following manner: performing facial recognition processing on the face area to obtain facial information, the facial information including the face position of the face area in the first image and the face size; determining a first indicator value based on the horizontal center coordinates, the horizontal face coordinates in the face position, and the face width in the face size; determining a second indicator value based on the vertical center coordinates, the vertical face coordinates in the face position, and the face height in the face size; if the first indicator value is within the first preset interval and the second indicator value is within the second preset interval, determining the initial human body type as a head-up type; if the first indicator value is not within the first preset interval, or the second indicator value is not within the second preset interval, determining the initial human body type as a head-down type.
[0131] The first index value is used to indicate the area where the human eyes are on the face in the horizontal direction; the second index value is used to indicate the area where the human eyes are on the face in the vertical direction.
[0132] S205: Determine the head-up rate corresponding to the preset scene 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 turn, and determine the number of human body images with the target human body type being the head-raising type as the number of head-raising human bodies; determine the number of human bodies based on the first image; and divide the number of head-raising human bodies by the number of human bodies to obtain the head-raising rate.
[0134] For example, assuming that the number of people looking up in the preset scene is 80 and the number of people is 100, it can be determined that the head-up rate of the preset scene is 0.8.
[0135] In the embodiment of the present application, when it is necessary to determine the head-up rate, the first image captured in the preset scene can be obtained first, and the first image can be acquired by the acquisition device; the first image can be subjected to human body recognition processing to determine multiple human body images including the face area; the face area can be subjected to image recognition processing to obtain the human eye center position of the center point of both eyes in the face area, and the first confidence of the human eye center position, and the target human body type corresponding to the human body image is determined according to the human eye center position, the first confidence and the human body image, and the target human body type is the head-up type or the head-down type; the head-up rate corresponding to the preset scene is determined according to the target human body type corresponding to each human body image. The human eye position can accurately reflect whether the user is lowering his head or raising his head. In the case where the human eye is blocked (resulting in the confidence angle of the human eye position), the human body type can also be predicted based on the human body image, without the need for complex face comparison processing, and the calculation efficiency of the head-up rate is improved on the basis of ensuring the accuracy of determining the head-up rate.
[0136] Based on any of the above embodiments, Figure 4 , the method for determining the target human body type ( Figure 2 S203-S204 in the embodiment are described in detail.
[0137] Figure 4 This is a schematic diagram of the process of determining the target human body type provided in the embodiment of the present application. Figure 4 , the method may include:
[0138] S401, performing eye recognition processing in a face area to obtain first eye information of a first eye, second eye information of a second eye, and binocular detection information.
[0139] The first eye information includes the position of the first eye in the first image and the size of the first eye, wherein the position of the first eye in the first image may refer to the position of the eyeball of the first eye in the coordinate system of the first image, and the size of the first eye may include the height of the first eye and the width of the first eye. The first eye information may be expressed as P1=[x1,y1,w1,h1], wherein [x1,y1] represents the position of the first eye in the first image, x1 represents the horizontal coordinate of the first eye, y1 represents the vertical coordinate of the first eye, and [w1,h1] represents the width and height of the first eye.
[0140] The second eye information includes the position of the second eye in the first image and the size of the second eye, wherein the position of the second eye in the first image may refer to the position of the eyeball of the second eye in the coordinate system of the first image, and the size of the second eye may include the height and the width of the second eye. The second eye information may be expressed as P2=[x2,y2,w2,h2], wherein [x2,y2] represents the position of the second eye in the first image, x2 represents the horizontal coordinate of the second eye, y2 represents the vertical coordinate of the second eye, and [w2,h2] represents the width and height of the second eye.
[0141] The binocular detection information includes the binocular occlusion ratio and binocular recognition clarity, wherein the binocular occlusion ratio may refer to the degree to which the binoculars are occluded, and the binocular recognition clarity may refer to the clarity of the binoculars in the first image.
[0142] The occlusion ratio of both eyes can be determined in the following ways: by detecting the integrity of the binocular region through human eye recognition processing, the area of the occluded region can be determined; the area of both eyes can be determined by the first eye size and the second eye size; the occlusion ratio of both eyes can be obtained by dividing the area of the occluded region by the area of both eyes.
[0143] The recognition clarity of both eyes may be determined in the following manner: by performing human eye recognition processing, the resolution of the binocular region is detected, and the resolution of the binocular region is determined as the recognition clarity of both eyes.
[0144] S402: Determine the eye types of the first eye and the second eye according to the first eye information and the second eye information.
[0145] The human eye type is either a left eye type or a right eye type.
[0146] The eye type can be determined in the following way: based on the first eye information, the horizontal coordinate x1 of the first eye in the first image coordinate system can be determined; based on the second eye information, the horizontal coordinate x2 of the second eye in the first image coordinate system can be determined; it is determined whether x1 is greater than x2, and if so, the eye type of the first eye is determined as the right eye type, and the eye type of the second eye is determined as the left eye type; if not, the eye type of the first eye is determined as the left eye type, and the eye type of the second eye is determined as the right eye type.
[0147] For example, assuming that the horizontal coordinate x1 of the first eye in the first image coordinate system is 5, and the horizontal coordinate x2 of the second eye in the first image coordinate system is 10, then x2>x1, it can be determined that the eye type of the first eye is the left eye type, and the eye type of the second eye is the right eye type.
[0148] S403 . Determine left eye information and right eye information in the first eye information and the second eye information according to the eye types of the first eye and the second eye.
[0149] The left eye information and the right eye information may be determined in the following manner: obtaining the eye type of the first eye and the eye type of the second eye, determining the eye information of the left eye type as the left eye information, and determining the eye information of the right eye type as the right eye information.
[0150] 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 a first confidence level according to binocular detection information.
[0152] The first confidence level can be determined in the following manner: determining an occlusion weight and a clarity weight; determining the product of the occlusion ratio and the occlusion weight as the first sub-confidence level; determining the product of the recognition clarity and the clarity weight as the second sub-confidence level; based on the first sub-confidence level and the second sub-confidence level, the first confidence level can be determined as:
[0153] First confidence = 1-first sub-confidence + second sub-confidence
[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 impact 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 impact of the clarity on the accuracy.
[0155] S405: Determine the center position of the human eye according to the left eye information and the right eye information.
[0156] Assuming that the center position of the human eye can be expressed as [ex, ey], ex is the horizontal center coordinate, RP.x is the horizontal coordinate of the right eye, RP.y is the vertical coordinate 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 horizontal coordinate of the left eye, LP.y is the vertical coordinate 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 area to obtain face information.
[0160] The face information includes the face position of the face area in the first image and the face size.
[0161] Among them, the face position of the face area in the first image may refer to the position of the middle point of the face area in the coordinate system of the first image, and the middle point of the face area may refer to the position of the nose in the face area; the face size may 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 area in the first image, x3 represents the horizontal coordinate of the middle point of the face area, y3 represents the vertical coordinate of the middle point of the face area, [w3,h3] represents the face size, w3 represents the face width, and h3 represents the face height.
[0163] S407: 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.
[0164] The first index value is used to indicate: in the horizontal direction, the area where the human eyes are on the face.
[0165] Assuming 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, the first indicator value Check1 can be determined as:
[0166] Check1=(ex-P3.x) / P3.w
[0167] S408. 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.
[0168] The second index value is used to indicate: in the vertical direction, the area of the human eye on the human face.
[0169] Assuming that ey is the longitudinal center coordinate, P1.y is the longitudinal face coordinate in the face position, and P1.h is the face height in the face size, the second indicator 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 manner: obtain a first preset interval and a second preset interval; determine whether the first indicator value is in the first preset interval and the second indicator value is in the second preset interval at the same time, if so, determine that the initial human body type is a head-up type; if not, determine that the initial human body type is a head-down type.
[0173] The first preset interval and the second preset interval may be values set in advance by the user in the terminal device. For example, the first preset interval may be [0.4, 0.6], and the second preset interval may be [0, 0.45].
[0174] S410: Determine whether a first confidence level of the center position of a human eye is greater than or equal to a first threshold.
[0175] If yes, execute S411.
[0176] If not, execute S412.
[0177] S411, determining 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 a predicted human body type and a second confidence level of the predicted human body type.
[0179] Predicted human body types may include head-up type and head-down type.
[0180] The preset model is obtained by training with sample data, wherein the sample data includes sample human body images and annotated human body types, and the annotated human body types may include head-up type and head-down type.
[0181] The second confidence may refer to the accuracy of predicting the human body type. The value range of the second confidence is 0 to 1. The higher the second confidence, the higher the accuracy of predicting the human body type.
[0182] The second confidence level can be determined in the following manner: determine the occlusion weight of the human image and the clarity weight of the human image; determine the product of the occlusion ratio of the human image and the occlusion weight of the human image as the third sub-confidence level; determine the product of the recognition clarity and the clarity weight as 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 may also be obtained through a preset model output.
[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 impact of the occlusion ratio on the accuracy; 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 impact of clarity on the accuracy.
[0186] The occlusion ratio of the human body image can be determined in the following manner: by detecting the integrity of the human body image through human body recognition processing, the area of the occluded region of the human body image is determined; the area of the human body image is determined, and the occlusion ratio of the human body image can be obtained by dividing the area of the occluded region by the area of the human body image.
[0187] The recognition clarity of the human body image may be determined in the following manner: by performing 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 a second threshold.
[0189] The second threshold may be a threshold pre-set by a user in the terminal device. For example, the second threshold may be 0.7.
[0190] If yes, 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 yes, execute S416.
[0194] If not, execute S415.
[0195] S415. Determine the human body type with the highest corresponding confidence between 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, eye recognition processing can be performed in the face area to obtain first eye information, second eye information, the occlusion ratio of both eyes and the recognition clarity of both eyes; based on the first eye information and the second eye information, the horizontal coordinate of the first eye and the horizontal coordinate of the second eye can be determined, thereby determining the eye type of the first eye and the second eye; based on the eye type, the left eye information and the right eye information can be determined in the first eye information and the second eye information; based on the occlusion ratio of both eyes and the recognition clarity of both eyes, the first confidence level can be determined, and by predetermining the first confidence level, the accuracy of the center position of the eye can be improved; based on the left eye information and the right eye information, the center position of the eye can be determined; by performing face recognition processing on the face area, face information can be obtained, and the face information includes the face position of the face area in the first image, and the face size; based on the horizontal center coordinates, the horizontal face coordinates in the face position, and the face width in the face size, the face width can be determined. a first indicator value; a second indicator value can be determined according to the longitudinal center coordinate, the longitudinal face coordinate in the face position, and the face height in the face size; according to the first indicator value and the second indicator value, it can be determined whether the initial human body type is a head-up type or a head-down type; it is determined whether the first confidence of the center position of the human eye is greater than or equal to the first threshold value, and if so, the initial human body type is determined as the target human body type; if not, the human body image is recognized and processed by a preset model to obtain a predicted human body type and a second confidence of the predicted human body type; if the second confidence is greater than or equal to the second threshold value, the predicted human body type is determined as the target human body type; if the second confidence 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 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 largest corresponding confidence between the predicted human body type and the initial human body type is determined as the target human body type. Through the above method, it is only necessary to determine the position of the center points of both eyes and the first confidence of the center position of the human eyes through human body recognition processing, and judge the target human body type according to the position of the center points of both eyes. If the first confidence is low, the human body image is further recognized and processed to determine the target human body model. It does not require a large amount of computing resources, thereby improving the calculation efficiency of the head-up rate.
[0198] Figure 5 This is a schematic diagram of a device for determining head-up rate provided in an embodiment of the present application. Figure 5 The head-up rate determination device 10 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, wherein:
[0199] The acquisition module 11 is used to acquire a first image captured in a preset scene, where there are multiple users;
[0200] The first determination module 12 is used to perform human body recognition processing on the first image, and determine a plurality of human body images in the first image, wherein the human body images include human face areas;
[0201] The recognition processing module 13 is used to perform image recognition processing on a face area in any human image to obtain the eye center position of the center points of both eyes in the face area and a first confidence level of the eye center position;
[0202] The second determination module 14 is used 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, wherein the target human body type is a head-up type or a head-down type;
[0203] The third determination module 15 is used to determine the head-up rate corresponding to the preset scene according to the target human body type corresponding to each human body image.
[0204] A head-up rate determination device provided in an embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0205] In a possible design, the identification processing module 13 is specifically used for:
[0206] Performing eye recognition processing on the face area to obtain left eye information, right eye information, and the first confidence level, wherein the left eye information includes a left eye position and a left eye size of the left eye in the first image, and the right eye information includes a right eye position and a right eye size of the right eye in the first image;
[0207] The center position of the human eye is determined according to the left eye information and the right eye information.
[0208] In a possible design, the identification processing module 13 is specifically used for:
[0209] Performing eye recognition processing in the face area to obtain first eye information of a first eye, second eye information of a second eye, and binocular detection information, wherein the first eye information includes a position of the first eye in the first image and a size of the first eye, and the second eye information includes a position of the second eye in the first image and a size of the second eye;
[0210] Determine the eye types of the first eye and the second eye according to the first eye information and the second eye information, where the eye type is a left eye type or a right eye type;
[0211] Determining the left eye information and the right eye information in the first eye information and the second eye information according to the eye types of the first eye and the second eye;
[0212] The first confidence level is determined according to the binocular detection information.
[0213] In a possible design, the identification processing module 13 is specifically used for:
[0214] Determine the horizontal center coordinates according to the following formula: ;
[0215] Determine the longitudinal center coordinates according to the following formula: ;
[0216] Determining the center position of the human eye includes the horizontal center coordinate and the vertical center coordinate;
[0217] Among them, ex is the horizontal center coordinate, RP.x is the horizontal coordinate of the right eye, RP.y is the vertical coordinate 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 horizontal coordinate of the left eye, LP.y is the vertical coordinate of the left eye, LP.w is the width of the left eye, and LP.h is the height of the left eye.
[0218] In a possible design, the identification processing module 13 is specifically used for:
[0219] Determining the occlusion weight and the clarity weight;
[0220] Determine the product of the occlusion ratio and the occlusion weight as a first sub-confidence;
[0221] Determine the product of the recognition clarity and the clarity weight as a second sub-confidence;
[0222] The first confidence criterion is determined according to the first sub-confidence criterion and the second sub-confidence criterion.
[0223] In a possible design, the second determining module 14 is specifically configured to:
[0224] Determining an initial human body type according to the center position of the human eye;
[0225] If the first confidence level of the center position of the human eye is greater than or equal to a first threshold, determining the initial human body type as the target human body type;
[0226] If the first confidence level of the center position of the human eye is less than the first threshold, the target human body type is determined according to the human body image and the initial human body type.
[0227] In a possible design, the second determining module 14 is specifically configured to:
[0228] Performing face recognition processing on the face area to obtain face information, wherein the face information includes the face position and face size of the face area in the first image;
[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, wherein the first index value is used to indicate: an area of the human eye on the face in the horizontal direction;
[0230] 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, wherein the second index value is used to indicate: an area of the human eye on the face in the longitudinal direction;
[0231] The initial human body type is determined according to the first index value and the second index value.
[0232] In a possible design, the second determining module 14 is specifically configured to:
[0233] If the first indicator value is within a first preset interval and the second indicator value is within a second preset interval, determining that the initial human body type is the head-up type;
[0234] If the first indicator value is not within the first preset interval, or the second indicator value is not within the second preset interval, it is determined that the initial human body type is the head-down type.
[0235] In a possible design, the second determining module 14 is specifically configured to:
[0236] 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;
[0237] If the second confidence level is greater than or equal to a second threshold, determining the predicted human body type as the target human body type;
[0238] If the second confidence level is less than the second threshold value, if 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 predicted human body type is different from the initial human body type, the human body type with the highest corresponding confidence level between the predicted human body type and the initial human body type is determined as the target human body type.
[0239] A head-up rate determination device provided in an embodiment of the present application can execute the technical solution shown in the above method embodiment, and its implementation principle and beneficial effects are similar, which will not be repeated here.
[0240] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 6 As 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 scheme in the above embodiment. The processor 22 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 field programmable gate array FPGA or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
[0242] The memory 23 is connected to the processor 22 via a system bus and completes communication between them. The memory 23 is used to store computer program instructions.
[0243] The transceiver 21 may be used to obtain tasks to be executed and configuration information of the tasks to be executed.
[0244] The system bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The system bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, 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 random access memory (RAM) and may also include non-volatile memory.
[0245] The electronic device provided in the embodiment of the present application may be the terminal device of the above embodiment.
[0246] An embodiment of the present application also provides a chip for running instructions, which is used to execute the technical solution of the method for determining the head-up rate in the above embodiment.
[0247] An embodiment of the present application also provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions are executed on a computer, the computer executes the technical solution of the method for determining the head-up rate in the above embodiment.
[0248] An embodiment of the present application also provides a computer program product, which includes a computer program stored in a computer-readable storage medium. At least one processor can read the computer program from the computer-readable storage medium. When at least one processor executes the computer program, it can implement the technical solution of the method for determining the head-up rate in the above embodiment.
[0249] 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. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules 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 an indirect coupling or communication connection through some interfaces, devices or modules, which can be electrical, mechanical or other forms.
[0250] The modules described as separate components may or may not be physically separated, and the components shown as modules 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 modules may be selected according to actual needs to implement the solution of this embodiment.
[0251] In addition, each functional module in each embodiment of the present application can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The above-mentioned module-composed unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
[0252] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.
[0253] It should be understood that the above processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the invention can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor.
[0254] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.
[0255] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or 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 ease of representation, the bus in the drawings of this application is not limited to only one bus or one type of bus.
[0256] The above 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, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0257] An exemplary storage medium is coupled to a 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 main control device.
[0258] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned 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, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[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 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 with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for determining head-up rate, characterized in that: include: Acquire a first image captured in a preset scene, where a plurality of users exist in the preset scene; Performing human body recognition processing on the first image to determine a plurality of human body images in the first image, wherein the human body images include human face areas; For any human body image, perform image recognition processing on a human face region in the human body image to obtain a human eye center position of a center point of both eyes in the human face region and a first confidence level of the human eye center position; Determine, according to the center position of the human eye, the first confidence level, and the human image, a target human body type corresponding to the human body image, the target human body type being a head-up type or a head-down type; The head-up rate corresponding to the preset scene is determined 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 binocular center points in the face region and the first confidence level of the eye center position includes: Performing eye recognition processing on the face area to obtain left eye information, right eye information, and the first confidence level, wherein the left eye information includes a left eye position and a left eye size of the left eye in the first image, and the right eye information includes a right eye position and a right eye size of the right eye in the first image; The center position of the human eye is determined according to the left eye information and the right eye information.
3. The method according to claim 2, characterized in that Performing eye recognition processing on the face region to obtain left eye information, right eye information, and the first confidence level includes: Performing eye recognition processing in the face area to obtain first eye information of a first eye, second eye information of a second eye, and binocular detection information, wherein the first eye information includes a position of the first eye in the first image and a size of the first eye, and the second eye information includes a position of the second eye in the first image and a size of the second eye; Determine the eye types of the first eye and the second eye according to the first eye information and the second eye information, where the eye type is a left eye type or a right eye type; Determining the left eye information and the right eye information in the first eye information and the second eye information according to the eye types of the first eye and the second eye; The first confidence level is determined according to the binocular detection information.
4. The method according to claim 2 or 3, characterized in that: Determining the center position of the human eye according to the left eye information and the right eye information includes: Determine the horizontal center coordinates according to the following formula: ; Determine the longitudinal center coordinates according to the following formula: ; Determining the center position of the human eye includes the horizontal center coordinate and the vertical center coordinate; Among them, ex is the horizontal center coordinate, RP.x is the horizontal coordinate of the right eye, RP.y is the vertical coordinate 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 horizontal coordinate of the left eye, LP.y is the vertical coordinate 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 the binoculars and the recognition clarity of the binoculars; and determining the first confidence level according to the binocular detection information includes: Determine occlusion weight and clarity weight; Determine the product of the occlusion ratio and the occlusion weight as a first sub-confidence; Determine the product of the recognition clarity and the clarity weight as a second sub-confidence; The first confidence criterion is determined according to the first sub-confidence criterion and the second sub-confidence criterion.
6. The method according to any one of claims 1 to 3, characterized in that: Determining a 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: Determining an initial human body type according to the center position of the human eye; If the first confidence level of the center position of the human eye is greater than or equal to a first threshold, determining the initial human body type as the target human body type; If the first confidence level of the center position of the human eye is less than the first threshold, the target human body type is determined according to the human body image and the initial human body type.
7. The method according to claim 6, characterized in that The center position of the human eye includes a horizontal center coordinate and a vertical center coordinate; determining the initial human body type according to the center position of the human eye includes: Performing face recognition processing on the face area to obtain face information, wherein the face information includes the face position and face size of the face area in the first image; 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, wherein the first index value is used to indicate: an area of the human eye on the face in the horizontal direction; 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, wherein the second index value is used to indicate: an area of the human eye on the face in the longitudinal direction; The initial human body type is determined according to the first index value and the second index value.
8. The method according to claim 7, characterized in that Determining the initial human body type according to the first index value and the second index value includes: If the first indicator value is within a first preset interval and the second indicator value is within a second preset interval, determining that the initial human body type is the head-up type; If the first indicator value is not within the first preset interval, or the second indicator value is not within the second preset interval, it is determined that the initial human body type is the head-down type.
9. The method according to claim 6, characterized in that Determining the target human body type according to the human body image and the initial human body type includes: 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, determining the predicted human body type as the target human body type; If the second confidence level is less than the second threshold value, if 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 predicted human body type is different from the initial human body type, the human body type with the highest corresponding confidence level between the predicted human body type and the initial human body type is determined as the target human body type.
10. A device for determining 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, wherein: The acquisition module is used to acquire a first image captured in a preset scene, where there are multiple users; The first determination module is used to perform human body recognition processing on the first image, and determine a plurality of human body images in the first image, wherein the human body images include human face areas; The recognition processing module is used to perform image recognition processing on a face area in any human image to obtain the eye center position of the center points of both eyes in the face area and a first confidence level of the eye center position; The second determination module is used 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, wherein the target human body type is a head-up type or a head-down type; The third determination module is used to determine the head-up rate corresponding to the preset scene according to the target human body type corresponding to each human body image.
11. An electronic device, characterized in that: include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 9 when executed by a processor.
13. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 9 when being executed by a processor.
Citation Information
Patent Citations
Classroom listener head-up rate detection method based on a deep learning network
CN109492594A
Machine vision-based small error identification method, network equipment and storage medium
CN116682040A
Head pose estimation from local eye region
US20190102905A1
Head posture estimation method and apparatus, and device and storage medium
WO2024055748A1