A sight tracking method, device, electronic device and storage medium

Through the combination of real-time face detection and eye calibration data, the gaze angle and gaze range are calculated, which solves the problems of low gaze tracking accuracy and difficulty in labeling in the existing technology, and achieves more efficient and accurate gaze tracking.

CN118279966BActive Publication Date: 2024-08-27BOE YIYUN (HANGZHOU) TECH CO LTD +4
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410712448.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-04
Publication Date
2024-08-27
Estimated Expiration
2044-06-04

AI Technical Summary

Technical Problem

Existing gaze tracking technology has problems such as low accuracy, susceptibility to the influence of ambient light, lack of interpretability of results, and difficulty in labeling, resulting in high difficulty in labeling gaze angles and high training data costs.

Method used

Through real-time face detection, key point recognition and posture analysis, combined with eye calibration data, the arc tangent operation and the triangle ratio theorem are used to calculate the sight angle and sight range, and the eye and facial angle information are integrated to improve the accuracy and accuracy of sight tracking. Data richness.

Benefits of technology

It effectively improves the accuracy of gaze tracking results, reduces the difficulty and cost of gaze tracking, and increases the interpretability of results and the richness of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118279966B
    Figure CN118279966B
Patent Text Reader

Abstract

The present application provides a sight tracking method, device, electronic device and storage medium, including: when the sight tracking requirements are met, face posture analysis and processing are performed to determine the face posture angle at the current moment; and according to multiple face key points, the current eye observation information when the user is looking at the target object is determined, and eye calibration data is obtained; according to the first relative position of each eye pupil relative to the eye contour in the current eye observation information, the second relative position of each eye pupil relative to the eye contour when the eye is looking at the first calibration point in the eye calibration data, and the first distance from the retina to the pupil in the eye calibration data, the sight angle of the eye is determined; according to the sight angle of the eye, the face posture angle at the current moment, the eye calibration data and the current eye observation information, the sight information of the user when currently looking at the target object is determined. In this way, through this solution, the accuracy of the results can be effectively improved and the difficulty of sight tracking can be reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer vision technology, and in particular to a line of sight tracking method, device, electronic device and storage medium. Background Art

[0002] The basic concept of eye tracking is to use a non-contact camera or other optical sensors to capture and analyze the direction of eye movement and then calculate the angle of the line of sight, and even the point where the line of sight falls on the object being viewed.

[0003] Existing gaze tracking technology usually adopts the following two solutions: 1. Use the traditional machine learning algorithm Hough transform to perform ellipse matching, match the outer edge contour of the human eye, estimate the iris center as the pupil point based on the eye contour, and track the movement of the eyeball; 2. Use deep learning to perform face detection and key point calculation on the face, and send the entire face data and key point information to the deep learning model to predict the gaze angle.

[0004] However, Solution 1 has the disadvantages of low accuracy and being easily affected by ambient light. Solution 2 has the disadvantages of lack of interpretability of the results, requiring massive amounts of data, and having difficulty labeling single training data and line of sight angles, and the cost of producing training data is high. Summary of the invention

[0005] In view of this, the purpose of the present application is to provide a gaze tracking method, device, electronic device and storage medium, which can effectively improve the result accuracy and reduce the difficulty of gaze tracking.

[0006] The present invention provides a method for tracking a line of sight, and the method for tracking a line of sight includes:

[0007] Performing real-time face detection on an initial image in front of a target object acquired by an image acquisition device;

[0008] When it is recognized that the initial image contains a face that meets the requirements of the face image, key point recognition processing is performed on the face in the initial image to determine a plurality of face key points;

[0009] Performing facial posture analysis and processing according to the plurality of facial key points to determine the facial posture angle at the current moment;

[0010] When the posture angle of the face meets the preset angle threshold requirement, determining the current eye observation information of the user when looking at the target object according to the multiple facial key points;

[0011] Acquire eye calibration data determined during the calibration process;

[0012] For each eye, determine the sight angle of the eye through inverse tangent operation according to a first relative position of the pupil of the eye relative to the eye contour in the current eye observation information, a second relative position of the pupil of the eye relative to the eye contour when the eye is fixated on the first calibration point in the eye calibration data, and a first distance from the retina to the pupil of the eye in the eye calibration data;

[0013] According to the sight angle of each eye, the facial posture angle at the current moment, the eye calibration data and the current eye observation information, angle fusion processing and sight calculation processing are performed in sequence to determine the sight information of the user when he is currently looking at the target object; wherein the sight information includes the target sight point and sight range of each eye when the user is looking at the target object.

[0014] Optionally, the following steps are performed to determine whether the initial image contains a face that meets the requirements of a face image:

[0015] Performing face detection processing on the initial image;

[0016] When the initial image includes a human face, determining that the initial image includes a human face that meets the requirements of a human face image;

[0017] or,

[0018] When the initial image includes a human face, and the image proportion of the human face area is greater than a preset proportion threshold, it is determined that the initial image includes a human face that meets the requirements of a human face image;

[0019] or,

[0020] When the initial image includes a human face, and the offset distance of the center point of the human face area relative to the center point of the initial image is less than a preset distance threshold, it is determined that the initial image includes a human face that meets the requirements of a human face image;

[0021] or,

[0022] When the initial image includes a face, and the image proportion of the face area is greater than a preset proportion threshold, and the offset distance of the center point of the face area relative to the center point of the initial image is less than a preset distance threshold, it is determined that the initial image contains a face that meets the requirements of a face image.

[0023] Optionally, the facial posture angle includes at least one of the following: a pitch angle, a yaw angle, and a roll angle.

[0024] Optionally, the first distance from the retina to the pupil of each of the user's eyes is determined by the following steps:

[0025] Acquire a plurality of first facial key points when the user gazes at the first calibration point according to a predetermined posture requirement, a plurality of second facial key points when the user gazes at the second calibration point, a first calibration position of the first calibration point on the target object, a second calibration position of the second calibration point on the target object, and a historical actual distance between each eye of the user and the target object under the predetermined posture requirement;

[0026] Determining a calibration distance between the first calibration point and the second calibration point according to the first calibration position and the second calibration position;

[0027] Performing eye key point analysis and processing according to the plurality of first face key points and the plurality of second face key points, and respectively determining the pupil offset distance when each eye is fixated on the first calibration point and the second calibration point;

[0028] For each eye, the first distance from the retina to the pupil of the eye is determined by calculating the triangle geometric theorem based on the historical actual distance between the eye and the target object, the corresponding pupil offset distance and the calibration distance.

[0029] Optionally, the method of sequentially performing angle fusion processing and sight line calculation processing according to the sight line angle of each eye, the facial posture angle at the current moment, the eye calibration data, and the current eye observation information to determine the sight line information of the user currently looking at the target object includes:

[0030] For each eye of the user, a position offset determination process is performed based on a first mapping position of the eye mapped to the target object when the eye is currently gazing at the target object in the current eye observation information, a second mapping position of the eye mapped to the target object when the eye is gazing at the first calibration point in the eye calibration data, and a first calibration position of the first calibration point on the target object to determine an initial sight point of the eye when the eye is currently gazing at the target object;

[0031] According to the sight angle of the eye in the current eye observation information and the facial posture angle at the current moment, angle fusion processing is performed to determine the comprehensive sight angle of the eye;

[0032] Correcting the initial sight point according to the comprehensive sight angle of the eye and the current actual distance between the eye and the target object in the current eye observation information, and determining the target sight point when the eye is currently gazing at the target object;

[0033] According to the first distance from the retina to the pupil of the eye in the eye calibration data, the current actual distance between the eye and the target object in the current eye observation information, and the pupil radius of the eye in the current eye observation information, the field of vision of the eye when it is currently looking at the target object is determined by calculation using the triangle geometric theorem.

[0034] Optionally, the correcting the initial sight line landing point according to the comprehensive sight line angle of the eye and the current actual distance between the eye and the target object in the current eye observation information to determine the target sight line landing point when the eye is currently gazing at the target object includes:

[0035] Performing tangent calculation processing according to the comprehensive sight angle of the eye and the current actual distance between the eye and the target object in the current eye observation information to determine the sight correction position value;

[0036] The sight line correction position value is merged with the initial sight line landing point to determine the target sight line landing point.

[0037] Optionally, the front surface of the image acquisition device is parallel to or located on the same plane as the front surface of the target object.

[0038] The embodiment of the present application further provides a sight tracking device, the sight tracking device comprising:

[0039] A first recognition module, used for performing real-time face detection on an initial image in front of a target object acquired by an image acquisition device;

[0040] A second recognition module is used to perform key point recognition processing on the face in the initial image to determine a plurality of key points of the face when it is recognized that the initial image contains a face that meets the requirements of the face image;

[0041] A first determination module is used to perform facial posture analysis and processing based on the multiple facial key points to determine the facial posture angle at the current moment;

[0042] A second determination module is used to determine the current eye observation information of the user when looking at the target object according to the multiple facial key points when the posture angle of the face meets the preset angle threshold requirement;

[0043] An acquisition module, used to acquire eye calibration data determined during the calibration process;

[0044] a third determination module, for each eye, determining the sight angle of the eye through an inverse tangent operation according to a first relative position of the pupil of the eye relative to the eye contour in the current eye observation information, a second relative position of the pupil of the eye relative to the eye contour when the eye is fixated on the first calibration point in the eye calibration data, and a first distance from the retina to the pupil of the eye in the eye calibration data;

[0045] The tracking module is used to perform angle fusion processing and sight line calculation processing in sequence according to the sight line angle of each eye, the facial posture angle at the current moment, the eye calibration data and the current eye observation information, so as to determine the sight line information when the user is currently looking at the target object; wherein the sight line information includes the target sight line landing point and sight line range of each eye when the user is looking at the target object.

[0046] Optionally, the eye tracking device is further used to determine that the initial image contains a human face that meets the requirements of a human face image by the following steps:

[0047] Performing face detection processing on the initial image;

[0048] When the initial image includes a human face, determining that the initial image includes a human face that meets the requirements of a human face image;

[0049] or,

[0050] When the initial image includes a human face, and the image proportion of the human face area is greater than a preset proportion threshold, it is determined that the initial image includes a human face that meets the requirements of a human face image;

[0051] or,

[0052] When the initial image includes a human face, and the offset distance of the center point of the human face area relative to the center point of the initial image is less than a preset distance threshold, it is determined that the initial image includes a human face that meets the requirements of a human face image;

[0053] or,

[0054] When the initial image includes a face, and the image proportion of the face area is greater than a preset proportion threshold, and the offset distance of the center point of the face area relative to the center point of the initial image is less than a preset distance threshold, it is determined that the initial image contains a face that meets the requirements of a face image.

[0055] Optionally, the facial posture angle includes at least one of the following: a pitch angle, a yaw angle, and a roll angle.

[0056] Optionally, the eye tracking device is further used to determine a first distance from the retina to the pupil of each of the user's eyes through the following steps:

[0057] Acquire a plurality of first facial key points when the user gazes at the first calibration point according to a predetermined posture requirement, a plurality of second facial key points when the user gazes at the second calibration point, a first calibration position of the first calibration point on the target object, a second calibration position of the second calibration point on the target object, and a historical actual distance between each eye of the user and the target object under the predetermined posture requirement;

[0058] Determining a calibration distance between the first calibration point and the second calibration point according to the first calibration position and the second calibration position;

[0059] Performing eye key point analysis and processing according to the plurality of first face key points and the plurality of second face key points, and respectively determining the pupil offset distance when each eye is fixated on the first calibration point and the second calibration point;

[0060] For each eye, the first distance from the retina to the pupil of the eye is determined by calculating the triangle geometric theorem based on the historical actual distance between the eye and the target object, the corresponding pupil offset distance and the calibration distance.

[0061] Optionally, when the tracking module is used to perform angle fusion processing and sight line calculation processing in sequence according to the sight line angle of each eye, the facial posture angle at the current moment, the eye calibration data and the current eye observation information to determine the sight line information when the user is currently looking at the target object, the tracking module is used to:

[0062] For each eye of the user, a position offset determination process is performed based on a first mapping position of the eye mapped to the target object when the eye is currently gazing at the target object in the current eye observation information, a second mapping position of the eye mapped to the target object when the eye is gazing at the first calibration point in the eye calibration data, and a first calibration position of the first calibration point on the target object to determine an initial sight point of the eye when the eye is currently gazing at the target object;

[0063] According to the sight angle of the eye in the current eye observation information and the facial posture angle at the current moment, angle fusion processing is performed to determine the comprehensive sight angle of the eye;

[0064] Correcting the initial sight point according to the comprehensive sight angle of the eye and the current actual distance between the eye and the target object in the current eye observation information, and determining the target sight point when the eye is currently gazing at the target object;

[0065] According to the first distance from the retina to the pupil of the eye in the eye calibration data, the current actual distance between the eye and the target object in the current eye observation information, and the pupil radius of the eye in the current eye observation information, the field of vision of the eye when it is currently looking at the target object is determined by calculation using the triangle geometric theorem.

[0066] Optionally, when the tracking module is used to correct the initial sight point according to the comprehensive sight angle of the eye and the current actual distance between the eye and the target object in the current eye observation information, and determine the target sight point when the eye is currently gazing at the target object, the tracking module is used to:

[0067] Performing tangent calculation processing according to the comprehensive sight angle of the eye and the current actual distance between the eye and the target object in the current eye observation information to determine the sight correction position value;

[0068] The sight line correction position value is merged with the initial sight line landing point to determine the target sight line landing point.

[0069] Optionally, the front surface of the image acquisition device is parallel to or located on the same plane as the front surface of the target object.

[0070] An embodiment of the present application also provides an electronic device, including: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the above-mentioned gaze tracking method are performed.

[0071] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned line of sight tracking method are executed.

[0072] The embodiment of the present application provides a gaze tracking method, device, electronic device and storage medium, the gaze tracking method comprising: performing real-time face detection on an initial image in front of a target object acquired by an image acquisition device; when it is recognized that the initial image contains a face that meets the requirements of a face image, performing key point recognition processing on the face in the initial image to determine a plurality of face key points; performing face posture analysis processing based on the plurality of face key points to determine the face posture angle at the current moment; when the face posture angle meets the preset angle threshold requirement, determining the current eye observation information of the user when looking at the target object based on the plurality of face key points; acquiring eye calibration data determined during the calibration process; and For each eye, the sight angle of the eye is determined by inverse tangent operation according to the first relative position of the pupil of the eye relative to the eye contour in the current eye observation information, the second relative position of the pupil of the eye relative to the eye contour when the eye is fixated on the first calibration point in the eye calibration data, and the first distance from the retina to the pupil of the eye in the eye calibration data; according to the sight angle of each eye, the facial posture angle at the current moment, the eye calibration data and the current eye observation information, angle fusion processing and sight calculation processing are performed in sequence to determine the sight information of the user when he is currently fixated on the target object; wherein the sight information includes the target sight point and sight range of each eye when the user is fixated on the target object.

[0073] In this way, through the technical solution provided by the present application, the comprehensive sight angle is determined by fusing the eye sight angle and the facial posture angle, and the target sight point is determined based on the comprehensive sight angle, which can effectively improve the accuracy of the determination result, and the sight range is determined based on the first distance from the retina to the pupil, which also effectively increases the richness of the result data. In addition, the technical solution of the present application also reduces the difficulty of sight tracking.

[0074] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0076] Figure 1 A flow chart of a gaze tracking method provided in an embodiment of the present application;

[0077] Figure 2 A schematic diagram of the result of determining key points of a face provided in this application;

[0078] Figure 3 A schematic diagram of the principle of determining the distance from the retina to the pupil provided in this application;

[0079] Figure 4 A schematic diagram of the structure of a sight tracking device provided in an embodiment of the present application;

[0080] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0081] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, each other embodiment obtained by those skilled in the art without making creative work belongs to the scope of protection of the present application.

[0082] The basic concept of eye tracking is to use a non-contact camera or other optical sensors to capture and analyze the direction of eye movement and then calculate the angle of the line of sight, and even the point where the line of sight falls on the object being viewed.

[0083] Existing gaze tracking technology usually adopts the following two solutions: 1. Use the traditional machine learning algorithm Hough transform to perform ellipse matching, match the outer edge contour of the human eye, estimate the iris center as the pupil point based on the eye contour, and track the movement of the eyeball; 2. Use deep learning to perform face detection and key point calculation on the face, and send the entire face data and key point information to the deep learning model to predict the gaze angle.

[0084] However, Solution 1 has the disadvantages of low accuracy and being easily affected by ambient light. Solution 2 has the disadvantages of lack of interpretability of the results, requiring massive amounts of data, and having difficulty labeling single training data and line of sight angles, and the cost of producing training data is high.

[0085] Based on this, the embodiments of the present application provide a gaze tracking method, device, electronic device and storage medium, which can effectively improve the result accuracy and reduce the difficulty of gaze tracking.

[0086] See also Figure 1 , Figure 1 A flow chart of a gaze tracking method provided in an embodiment of the present application.

[0087] This method can be applied to human-computer interaction in the fields of smartphones, AR / VR games, smart cars, etc.

[0088] like Figure 1 As shown in , the eye tracking method provided by the embodiment of the present application includes:

[0089] S101, performing real-time face detection on an initial image in front of a target object acquired by an image acquisition device.

[0090] In this step, the image acquisition device is controlled to acquire images of the visual field space in front of the target object at a predetermined time interval or in real time, an initial image is determined, and then real-time face detection is performed on the initial image.

[0091] Here, the front surface of the image acquisition device is parallel to or located on the same plane as the front surface of the target object.

[0092] The image acquisition device may be a camera, examples of which may be a common RGB camera, an infrared camera, a depth camera, etc.

[0093] The target object may be a display screen or the like.

[0094] Among them, real-time face detection can be performed through a face detection algorithm. For example, the face detection algorithm can be blazeface.

[0095] S102: When it is identified that the initial image contains a face that meets the requirements of a face image, key point recognition processing is performed on the face in the initial image to determine a plurality of face key points.

[0096] In this step, when it is identified that the initial image contains a face that meets the requirements of a face image, key point recognition processing can be performed on the face in the initial image through a deep learning model to determine a plurality of face key points.

[0097] Here, when multiple facial key points are determined, the coordinate information and type information of each key point are also determined. The type information refers to whether the key point is a nose key point, an eye key point, etc.

[0098] For example, the deep learning model may include two parts. The first part is a key point detection model, which uses a model of 275 key points, including the entire contour of the face, nose, mouth, eyes, etc., and is mainly used to calculate the angle of the face, the position of the facial features, etc.; the second part is to output the range of the pupil area, and the pupil radius can be obtained based on the pupil center point and the pupil area range.

[0099] For examples, see Figure 2 , Figure 2 This is a schematic diagram of the result of determining key points of a face provided by this application. Figure 2 As shown, face detection is first performed, and after a face that meets the face image requirements is identified (such as Figure 2 Left picture), perform key point recognition and obtain multiple facial key points (such as Figure 2 right).

[0100] In an embodiment provided in the present application, it is determined that the initial image contains a face that meets the requirements of a face image through the following steps: performing face detection processing on the initial image; when the initial image includes a face, determining that the initial image contains a face that meets the requirements of a face image; or, when the initial image includes a face, and the image proportion of the face area is greater than a preset proportion threshold, determining that the initial image contains a face that meets the requirements of a face image; or, when the initial image includes a face, and the offset distance of the center point of the face area relative to the center point of the initial image is less than a preset distance threshold, determining that the initial image contains a face that meets the requirements of a face image; or, when the initial image includes a face, and the image proportion of the face area is greater than the preset proportion threshold, and the offset distance of the center point of the face area relative to the center point of the initial image is less than the preset distance threshold, determining that the initial image contains a face that meets the requirements of a face image.

[0101] Here, four implementation methods are provided for determining whether the initial image contains a human face that meets the requirements of a human face image.

[0102] It should be noted that, when it is recognized that the initial image does not contain a face that meets the requirements of a face image, the initial image is re-acquired.

[0103] S103: Perform facial posture analysis based on the multiple facial key points to determine the facial posture angle at the current moment.

[0104] Here, the facial posture angle includes at least one of the following: a pitch angle, a yaw angle, and a roll angle.

[0105] Among them, pitch angle: the angle of rotation around the X-axis (pointing to the right side of the face), expressed as the head tilting up and down;

[0106] Yaw: The angle of rotation around the Y axis (pointing down the face), which is expressed as a horizontal rotation of the head to the left or right;

[0107] Roll angle: The angle of rotation around the Z axis (pointing to the front of the face), which is manifested as the rotation of a face photo seen from the front, and the rotation within the plane.

[0108] S104: When the posture angle of the face meets a preset angle threshold requirement, current eye observation information of the user when gazing at the target object is determined according to the multiple facial key points.

[0109] In this step, the current eye observation information includes at least: a first relative position of each eye's pupil relative to the eye contour, a pupil radius of each eye, a first mapping position of each eye mapped to the target object, and a current actual distance between each eye and the target object.

[0110] In addition, when the posture angle of the face does not meet the preset angle threshold requirement, the initial image is reacquired, and face detection and face posture angle judgment are performed in sequence.

[0111] S105: Acquire eye calibration data determined during the calibration process.

[0112] In this step, the eye calibration data determined when calibration is performed according to the predetermined facial posture requirements is obtained.

[0113] Here, the eye calibration data includes at least: a first distance from the retina to the pupil of each of the user's eyes, a second relative position of the pupil of the eye relative to the eye contour when each eye looks at the first calibration point, a second mapping position mapped to the target object when each eye looks at the first calibration point, and a first calibration position of the first calibration point on the target object.

[0114] In one implementation provided in the present application, the first distance from the retina to the pupil of each of the user's eyes is determined by the following steps:

[0115] S201. Acquire a plurality of first facial key points when the user gazes at a first calibration point according to a predetermined posture requirement, a plurality of second facial key points when the user gazes at a second calibration point, a first calibration position of the first calibration point on the target object, a second calibration position of the second calibration point on the target object, and a historical actual distance between each eye of the user and the target object under the predetermined posture requirement.

[0116] S202: Determine a calibration distance between a first calibration point and a second calibration point according to the first calibration position and the second calibration position.

[0117] S203, performing eye key point analysis and processing according to the plurality of first face key points and the plurality of second face key points, and respectively determining the pupil offset distance when each eye is gazing at the first calibration point and the second calibration point.

[0118] S204: For each eye, determine a first distance from the retina to the pupil of the eye according to the historical actual distance between the eye and the target object, the corresponding pupil offset distance, and the calibration distance by calculating the triangle geometric theorem.

[0119] For step S201, the predetermined posture requirement may be that the human eye sight angle is 0°. The first calibration point may be a point on the screen or directly in front of the human visual field. The second calibration point may be a point on the screen different from the first calibration point.

[0120] The historical actual distance between each eye of the user and the target object under the predetermined posture requirement includes a second distance between the left eye and the target object and a third distance between the right eye and the target object.

[0121] The first calibration position of the first calibration point on the target object and the second calibration position of the second calibration point on the target object may be directly or pre-determined and saved in the eye calibration data.

[0122] With respect to step S202 , a calibration distance between the first calibration point and the second calibration point is determined by Euclidean distance calculation according to the first calibration position (coordinate information) and the second calibration position (coordinate information).

[0123] For step S203, eye key point analysis and processing are performed based on multiple first facial key points and multiple second facial key points, and the pupil offset distance of each eye when looking at the first calibration point and the second calibration point is determined respectively, including: eye key point analysis and processing are performed based on multiple first facial key points and multiple second facial key points, and the left eye pupil offset distance when the left eye looks at the first calibration point and the second calibration point is determined, and the right eye pupil offset distance when the right eye looks at the first calibration point and the second calibration point is determined.

[0124] In one embodiment, eye key point analysis is performed based on a plurality of first facial key points and a plurality of second facial key points to respectively determine the pupil offset distance when each eye is gazing at a first calibration point and a second calibration point, including: determining, based on a plurality of first facial key points, a second relative position of the pupil relative to the eye contour when each eye of the user is gazing at the first calibration point, and a second mapping position of each eye mapped to the target object when each eye is gazing at the first calibration point; determining, based on a plurality of second facial key points, a third relative position of the pupil relative to the eye contour when each eye of the user is gazing at the second calibration point, and a third mapping position of each eye mapped to the target object when each eye is gazing at the second calibration point; for each eye, determining the pupil offset distance of the eye based on the second relative position and the third relative position of the eye. Alternatively, determining the pupil offset distance of the eye based on the second mapping position and the third mapping position of the eye.

[0125] It should be noted that the mapping position is a position (coordinate) determined after coordinate conversion processing. The relative position of the pupil with respect to the eye contour may be the position of the pupil center point.

[0126] Regarding step S204, taking the left eye as an example, the first distance from the retina to the pupil of the left eye may be determined according to the following formula.

[0127] l / L=h / (h+H1)

[0128] Here, l is the left eye pupil offset distance, L is the calibration distance, h is the first distance from the left eye retina to the pupil, and H1 is the historical actual distance between the left eye and the target object.

[0129] For examples, see Figure 3 , Figure 3 The following is a schematic diagram of the principle of determining the distance from the retina to the pupil provided in this application. Figure 3As shown, only the method for determining the first distance from the retina to the pupil of one eye is shown here, taking the left eye as an example, where l is the left eye pupil offset distance, L is the calibration distance, h is the first distance from the retina to the pupil of the left eye, H1 is the historical actual distance between the left eye and the target object, A is the first calibration point, B is the second calibration point, and the positions corresponding to points A' and B' are the positions of the left eye pupil area, so that h can be determined.

[0130] S106. For each eye, determine the sight angle of the eye through inverse tangent operation based on the first relative position of the pupil of the eye relative to the eye contour in the current eye observation information, the second relative position of the pupil of the eye relative to the eye contour when the eye is fixated on the first calibration point in the eye calibration data, and the first distance from the retina to the pupil of the eye in the eye calibration data.

[0131] For example, the following content will be used to explain the process of determining the sight angle of the eye. Taking the left eye as an example, ( , ) is the first relative position of the left pupil relative to the left eye contour when the current user is gazing at the target object, ( , ) is the second relative position of the left pupil relative to the left eye contour when the user looks at the first calibration point during the calibration process, h is the first distance from the left eye retina to the pupil determined during the calibration process, and the position change vector of these two gazes is ( - , - ), then the tangent value of the vertical angle of the human eye can be obtained by ( - ) / h, and then the vertical sight angle b1 is obtained by the inverse tangent function. Similarly, the tangent value of the horizontal angle can be obtained by ( - ) / h, and the angle b2 is obtained by the inverse tangent function; (b1, b2) is the sight angle of the left eye when the face angle is not considered.

[0132] The process of determining the sight angle of the right eye is the same as that of the left eye and will not be repeated here.

[0133] S107, according to the sight angle of each eye, the facial posture angle at the current moment, the eye calibration data and the current eye observation information, angle fusion processing and sight line calculation processing are performed in sequence to determine the sight line information of the user when he is currently looking at the target object.

[0134] Here, the sight line information includes the target sight line point and sight line range of each eye when the user looks at the target object.

[0135] In an implementation manner provided in the present application, the angle fusion processing and the sight line calculation processing are sequentially performed according to the sight line angle of each eye, the facial posture angle at the current moment, the eye calibration data, and the current eye observation information to determine the sight line information when the user is currently looking at the target object, including:

[0136] S1071. For each eye of the user, a position offset determination process is performed based on a first mapping position of the eye mapped to the target object when the eye is currently gazing at the target object in the current eye observation information, a second mapping position of the eye mapped to the target object when the eye is gazing at the first calibration point in the eye calibration data, and a first calibration position of the first calibration point on the target object to determine the initial line of sight landing point of the eye when it is currently gazing at the target object.

[0137] S1072. Perform angle fusion processing based on the sight angle of the eye in the current eye observation information and the facial posture angle at the current moment to determine the comprehensive sight angle of the eye.

[0138] S1073. Correct the initial sight point according to the comprehensive sight angle of the eye and the current actual distance between the eye and the target object in the current eye observation information, and determine the target sight point when the eye is currently gazing at the target object.

[0139] S1074. Determine the visual range of the eye when it is currently looking at the target object by calculating the triangle geometric theorem based on the first distance from the retina to the pupil of the eye in the eye calibration data, the current actual distance between the eye and the target object in the current eye observation information, and the pupil radius of the eye in the current eye observation information.

[0140] With respect to step S1071, taking the left eye as an example, the initial sight point of the left eye when currently gazing at the target object may be determined according to the following formula.

[0141]

[0142]

[0143] here,( , ) is the initial sight point of the left eye when it is currently gazing at the target object, ( , ) is the first mapping position of the left eye mapped to the target object when the user is currently gazing at the target object, ( , ) is the second mapping position mapped to the target object by the left eye when the user looks at the first calibration point, ( , ) is the first calibration position of the first calibration point on the target object.

[0144] For step S1072, the angle fusion processing is performed based on the sight angle of the eye in the current eye observation information and the facial posture angle at the current moment to determine the comprehensive sight angle of the eye, including: for each eye, using the current sight angle of the eye and the pitch angle and yaw angle in the facial posture angle at the current moment, performing angle fusion processing to determine the comprehensive sight angle of the eye.

[0145] With respect to step S1073, in one embodiment, the correcting the initial sight point according to the comprehensive sight angle of the eye and the current actual distance between the eye and the target object in the current eye observation information to determine the target sight point when the eye is currently gazing at the target object includes:

[0146] S10731. Perform tangent operation based on the comprehensive sight angle of the eye and the current actual distance between the eye and the target object in the current eye observation information to determine the sight correction position value.

[0147] S10732. Merge the sight line correction position value with the initial sight line landing point to determine the target sight line landing point.

[0148] With respect to step S1073, taking the left eye as an example, the target sight point when the left eye is currently gazing at the target object may be determined according to the following formula.

[0149]

[0150]

[0151] here,( , ) is the target sight point when the left eye is currently gazing at the target object, is the current actual distance between the left eye and the target object.

[0152] For step S1074, continuing to take the left eye as an example, the visual range of the left eye when currently gazing at the target object may be determined according to the following formula:

[0153] R=radius*(H2 / h)

[0154] Here, R is the visual range of the left eye when it is currently gazing at the target object, and radius is the pupil radius of the left eye.

[0155] In this way, through the technical solution provided by the present application, the comprehensive sight angle is determined by fusing the eye sight angle and the facial posture angle, and the target sight point is determined based on the comprehensive sight angle, which can effectively improve the accuracy of the determination result, and the sight range is determined based on the first distance from the retina to the pupil, which also effectively increases the richness of the result data. In addition, the technical solution of the present application also reduces the difficulty of sight tracking.

[0156] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of a gaze tracking device provided in an embodiment of the present application. Figure 4 As shown in , the sight tracking device 400 includes:

[0157] The first recognition module 410 is used to perform real-time face detection on the initial image in front of the target object acquired by the image acquisition device;

[0158] A second recognition module 420 is configured to perform key point recognition processing on the face in the initial image to determine a plurality of key points of the face when it is recognized that the initial image contains a face that meets the requirements of the face image;

[0159] A first determination module 430 is used to perform facial posture analysis based on the multiple facial key points to determine the facial posture angle at the current moment;

[0160] A second determination module 440 is used to determine the current eye observation information of the user when looking at the target object according to the multiple facial key points when the posture angle of the face meets the preset angle threshold requirement;

[0161] An acquisition module 450 is used to acquire eye calibration data determined during the calibration process;

[0162] A third determination module 460 is used to determine, for each eye, a sight line angle of the eye through an inverse tangent operation according to a first relative position of the pupil of the eye relative to the eye contour in the current eye observation information, a second relative position of the pupil of the eye relative to the eye contour when the eye is fixated on the first calibration point in the eye calibration data, and a first distance from the retina to the pupil of the eye in the eye calibration data;

[0163] The tracking module 470 is used to perform angle fusion processing and line of sight calculation processing in sequence according to the line of sight angle of each eye, the facial posture angle at the current moment, the eye calibration data and the current eye observation information, so as to determine the line of sight information when the user is currently looking at the target object; wherein the line of sight information includes the target line of sight landing point and line of sight range of each eye when the user is looking at the target object.

[0164] Optionally, the eye tracking device 400 is further configured to determine whether the initial image contains a face that meets the requirements of a face image by performing the following steps:

[0165] Performing face detection processing on the initial image;

[0166] When the initial image includes a human face, determining that the initial image includes a human face that meets the requirements of a human face image;

[0167] or,

[0168] When the initial image includes a human face, and the image proportion of the human face area is greater than a preset proportion threshold, it is determined that the initial image includes a human face that meets the requirements of a human face image;

[0169] or,

[0170] When the initial image includes a human face, and the offset distance of the center point of the human face area relative to the center point of the initial image is less than a preset distance threshold, it is determined that the initial image includes a human face that meets the requirements of a human face image;

[0171] or,

[0172] When the initial image includes a face, and the image proportion of the face area is greater than a preset proportion threshold, and the offset distance of the center point of the face area relative to the center point of the initial image is less than a preset distance threshold, it is determined that the initial image contains a face that meets the requirements of a face image.

[0173] Optionally, the facial posture angle includes at least one of the following: a pitch angle, a yaw angle, and a roll angle.

[0174] Optionally, the eye tracking device 400 is further configured to determine a first distance from the retina to the pupil of each of the user's eyes through the following steps:

[0175] Acquire a plurality of first facial key points when the user gazes at the first calibration point according to a predetermined posture requirement, a plurality of second facial key points when the user gazes at the second calibration point, a first calibration position of the first calibration point on the target object, a second calibration position of the second calibration point on the target object, and a historical actual distance between each eye of the user and the target object under the predetermined posture requirement;

[0176] Determining a calibration distance between the first calibration point and the second calibration point according to the first calibration position and the second calibration position;

[0177] Performing eye key point analysis and processing according to the plurality of first face key points and the plurality of second face key points, and respectively determining the pupil offset distance when each eye is fixated on the first calibration point and the second calibration point;

[0178] For each eye, the first distance from the retina to the pupil of the eye is determined by calculating the triangle geometric theorem based on the historical actual distance between the eye and the target object, the corresponding pupil offset distance and the calibration distance.

[0179] Optionally, when the tracking module 470 is used to perform angle fusion processing and sight line calculation processing in sequence according to the sight line angle of each eye, the facial posture angle at the current moment, the eye calibration data and the current eye observation information to determine the sight line information when the user is currently looking at the target object, the tracking module 470 is used to:

[0180] For each eye of the user, a position offset determination process is performed based on a first mapping position of the eye mapped to the target object when the eye is currently gazing at the target object in the current eye observation information, a second mapping position of the eye mapped to the target object when the eye is gazing at the first calibration point in the eye calibration data, and a first calibration position of the first calibration point on the target object to determine an initial sight point of the eye when the eye is currently gazing at the target object;

[0181] According to the sight angle of the eye in the current eye observation information and the facial posture angle at the current moment, angle fusion processing is performed to determine the comprehensive sight angle of the eye;

[0182] Correcting the initial sight point according to the comprehensive sight angle of the eye and the current actual distance between the eye and the target object in the current eye observation information, and determining the target sight point when the eye is currently gazing at the target object;

[0183] According to the first distance from the retina to the pupil of the eye in the eye calibration data, the current actual distance between the eye and the target object in the current eye observation information, and the pupil radius of the eye in the current eye observation information, the field of vision of the eye when it is currently looking at the target object is determined by calculation using the triangle geometric theorem.

[0184] Optionally, when the tracking module 470 is used to correct the initial sight point according to the comprehensive sight angle of the eye and the current actual distance between the eye and the target object in the current eye observation information, and determine the target sight point when the eye is currently gazing at the target object, the tracking module 470 is used to:

[0185] Performing tangent calculation processing according to the comprehensive sight angle of the eye and the current actual distance between the eye and the target object in the current eye observation information to determine the sight correction position value;

[0186] The sight line correction position value is merged with the initial sight line landing point to determine the target sight line landing point.

[0187] Optionally, the front surface of the image acquisition device is parallel to or located on the same plane as the front surface of the target object.

[0188] See also Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 5 As shown in , the electronic device 500 includes a processor 510 , a memory 520 and a bus 530 .

[0189] The memory 520 stores machine-readable instructions executable by the processor 510. When the electronic device 500 is running, the processor 510 communicates with the memory 520 via the bus 530. When the machine-readable instructions are executed by the processor 510, the above-mentioned figure can be executed. Figure 3 The specific implementation of the steps in the method embodiment shown can be found in the method embodiment, and will not be repeated here.

[0190] The present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the computer program can execute the above-mentioned Figure 3 The specific implementation of the steps in the method embodiment shown can be found in the method embodiment, and will not be repeated here.

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

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

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

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

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

[0196] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A gaze tracking method, characterized in that: The sight tracking method comprises: Performing real-time face detection on an initial image in front of a target object acquired by an image acquisition device; When it is recognized that the initial image contains a face that meets the requirements of the face image, key point recognition processing is performed on the face in the initial image to determine a plurality of face key points; Performing facial posture analysis and processing according to the plurality of facial key points to determine the facial posture angle at the current moment; When the posture angle of the face meets the preset angle threshold requirement, determining the current eye observation information of the user when looking at the target object according to the multiple facial key points; Acquire eye calibration data determined during the calibration process; For each eye, determine the sight angle of the eye through inverse tangent operation according to a first relative position of the pupil of the eye relative to the eye contour in the current eye observation information, a second relative position of the pupil of the eye relative to the eye contour when the eye is fixated on the first calibration point in the eye calibration data, and a first distance from the retina to the pupil of the eye in the eye calibration data; According to the sight angle of each eye, the facial posture angle at the current moment, the eye calibration data and the current eye observation information, angle fusion processing and sight calculation processing are performed in sequence to determine the sight information of the user currently gazing at the target object; wherein the sight information includes the target sight point and sight range of each eye when the user is gazing at the target object; The method sequentially performs angle fusion processing and sight line calculation processing according to the sight line angle of each eye, the face posture angle at the current moment, the eye calibration data and the current eye observation information to determine the sight line information when the user is currently looking at the target object, including: For each eye of the user, a position offset determination process is performed based on a first mapping position of the eye mapped to the target object when the eye is currently gazing at the target object in the current eye observation information, a second mapping position of the eye mapped to the target object when the eye is gazing at the first calibration point in the eye calibration data, and a first calibration position of the first calibration point on the target object to determine an initial sight point of the eye when the eye is currently gazing at the target object; According to the sight angle of the eye in the current eye observation information and the facial posture angle at the current moment, angle fusion processing is performed to determine the comprehensive sight angle of the eye; Correcting the initial sight point according to the comprehensive sight angle of the eye and the current actual distance between the eye and the target object in the current eye observation information, and determining the target sight point when the eye is currently gazing at the target object; According to the first distance from the retina to the pupil of the eye in the eye calibration data, the current actual distance between the eye and the target object in the current eye observation information, and the pupil radius of the eye in the current eye observation information, the field of vision of the eye when it is currently looking at the target object is determined by calculation using the triangle geometric theorem.

2. The sight tracking method according to claim 1, characterized in that: Determine whether the initial image contains a face that meets the face image requirements by performing the following steps: Performing face detection processing on the initial image; When the initial image includes a human face, determining that the initial image includes a human face that meets the requirements of a human face image; or, When the initial image includes a human face, and the image proportion of the human face area is greater than a preset proportion threshold, it is determined that the initial image includes a human face that meets the requirements of a human face image; or, When the initial image includes a human face, and the offset distance of the center point of the human face area relative to the center point of the initial image is less than a preset distance threshold, it is determined that the initial image includes a human face that meets the requirements of a human face image; or, When the initial image includes a face, and the image proportion of the face area is greater than a preset proportion threshold, and the offset distance of the center point of the face area relative to the center point of the initial image is less than a preset distance threshold, it is determined that the initial image contains a face that meets the requirements of a face image.

3. The sight tracking method according to claim 1, characterized in that: The facial posture angle includes at least one of the following: a pitch angle, a yaw angle, and a roll angle.

4. The sight tracking method according to claim 1, characterized in that: The first distance from the retina to the pupil of each of the user's eyes is determined by the following steps: Acquire a plurality of first facial key points when the user gazes at the first calibration point according to a predetermined posture requirement, a plurality of second facial key points when the user gazes at the second calibration point, a first calibration position of the first calibration point on the target object, a second calibration position of the second calibration point on the target object, and a historical actual distance between each eye of the user and the target object under the predetermined posture requirement; Determining a calibration distance between the first calibration point and the second calibration point according to the first calibration position and the second calibration position; Performing eye key point analysis and processing according to the plurality of first face key points and the plurality of second face key points, and respectively determining the pupil offset distance when each eye is fixated on the first calibration point and the second calibration point; For each eye, the first distance from the retina to the pupil of the eye is determined by calculating the triangle geometric theorem based on the historical actual distance between the eye and the target object, the corresponding pupil offset distance and the calibration distance.

5. The sight tracking method according to claim 1, characterized in that: The method of correcting the initial sight line landing point according to the comprehensive sight line angle of the eye and the current actual distance between the eye and the target object in the current eye observation information to determine the target sight line landing point when the eye is currently gazing at the target object comprises: Performing tangent calculation processing according to the comprehensive sight angle of the eye and the current actual distance between the eye and the target object in the current eye observation information to determine the sight correction position value; The sight line correction position value is merged with the initial sight line landing point to determine the target sight line landing point.

6. The sight tracking method according to claim 1, characterized in that: The front surface of the image acquisition device is parallel to or located on the same plane as the front surface of the target object.

7. A gaze tracking device, characterized in that: The sight tracking device comprises: A first recognition module, used for performing real-time face detection on an initial image in front of a target object acquired by an image acquisition device; A second recognition module is used to perform key point recognition processing on the face in the initial image to determine a plurality of key points of the face when it is recognized that the initial image contains a face that meets the requirements of the face image; A first determination module is used to perform facial posture analysis based on the multiple facial key points to determine the facial posture angle at the current moment; A second determination module is used to determine the current eye observation information of the user when looking at the target object according to the multiple facial key points when the posture angle of the face meets the preset angle threshold requirement; An acquisition module, used to acquire eye calibration data determined during the calibration process; a third determination module, for each eye, determining the sight angle of the eye through an inverse tangent operation according to a first relative position of the pupil of the eye relative to the eye contour in the current eye observation information, a second relative position of the pupil of the eye relative to the eye contour when the eye is fixated on the first calibration point in the eye calibration data, and a first distance from the retina to the pupil of the eye in the eye calibration data; A tracking module is used to perform angle fusion processing and sight line calculation processing in sequence according to the sight line angle of each eye, the facial posture angle at the current moment, the eye calibration data and the current eye observation information, so as to determine the sight line information when the user is currently looking at the target object; wherein the sight line information includes the target sight line landing point and sight line range of each eye when the user is looking at the target object; When the tracking module is used to perform angle fusion processing and sight line calculation processing in sequence according to the sight line angle of each eye, the face posture angle at the current moment, the eye calibration data and the current eye observation information to determine the sight line information of the user when he is currently looking at the target object, the tracking module is used to: For each eye of the user, a position offset determination process is performed based on a first mapping position of the eye mapped to the target object when the eye is currently gazing at the target object in the current eye observation information, a second mapping position of the eye mapped to the target object when the eye is gazing at the first calibration point in the eye calibration data, and a first calibration position of the first calibration point on the target object to determine an initial sight point of the eye when the eye is currently gazing at the target object; According to the sight angle of the eye in the current eye observation information and the facial posture angle at the current moment, angle fusion processing is performed to determine the comprehensive sight angle of the eye; Correcting the initial sight point according to the comprehensive sight angle of the eye and the current actual distance between the eye and the target object in the current eye observation information, and determining the target sight point when the eye is currently gazing at the target object; According to the first distance from the retina to the pupil of the eye in the eye calibration data, the current actual distance between the eye and the target object in the current eye observation information, and the pupil radius of the eye in the current eye observation information, the field of vision of the eye when it is currently looking at the target object is determined by calculation using the triangle geometric theorem.

8. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and the machine-readable instructions are executed by the processor to execute the steps of the line of sight tracking method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the line of sight tracking method according to any one of claims 1 to 6 are executed.