Image-based eye tracking method and system

Through image-based eye tracking methods, anchor-free face detection and lightweight deep neural networks are used to locate face and pupil key points, which solves the problems of hardware-assisted discomfort and lighting effects in the existing technology, and achieves Efficient and accurate eye tracking.

CN113177515BActive Publication Date: 2024-08-23ROPEOK TECHNOLOGY GROUP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110554123.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-20
Publication Date
2024-08-23
Estimated Expiration
2041-05-20

AI Technical Summary

Technical Problem

Existing eye-tracking technology requires additional hardware assistance, resulting in discomfort and high cost. It is also susceptible to the influence of ambient lighting, resulting in inaccurate positioning of the iris center of the human eye.

Method used

Using an image-based eye tracking method, anchor-free face detection method and lightweight deep neural network are used to locate the key points of the face and pupil, and the human eye orientation is determined by calculating the offset ratio between the pupil center and the center of the eye area. , to achieve eye tracking.

Benefits of technology

It can quickly and efficiently locate faces and pupils under conditions of unsatisfactory lighting and complex backgrounds, improve the accuracy and real-time performance of eye tracking, reduce hardware costs, and avoid the discomfort caused by additional hardware assistance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113177515B
    Figure CN113177515B
Patent Text Reader

Abstract

The present invention provides an image-based eye tracking method and system, including performing face detection on an image to be detected to obtain a face detection frame; using a face key point positioning network to locate the eye region of interest and perform pupil key point positioning; and calculating a horizontal offset ratio based on the pupil center and the eye area center to determine the eye direction. An eye tracking system based on the method is also proposed. The method and system can effectively locate the face and pupil center and accurately perform eye tracking under conditions such as unsatisfactory ambient lighting conditions and complex backgrounds.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image recognition, and in particular to an image-based eye tracking method and system. Background Art

[0002] Eye tracking is a technology that estimates the gaze point of the eyes by measuring eye movements, thereby tracking eye changes in real time, predicting the user's status and needs, and responding to achieve the purpose of controlling the device with the eyes. Eye tracking technology has a wide range of uses. It can track eye changes to control mobile phones and computers to achieve automatic screen lighting, page turning and other control functions; in the field of autonomous driving, it can track the position of the eyeballs to simulate the driver's field of vision and remind the driver of possible dangers in the blind spot; in psychology, it can track the movement characteristics of the eyeballs as an auxiliary basis for psychological judgment; in medical treatment, it can use the patient's eye tracking data to assist in the diagnosis of diseases, etc.

[0003] There are currently several ways to implement eye tracking, including tracking based on changes in the angle of the iris, and actively projecting infrared light beams to the iris to extract features. However, iris recognition requires high accuracy in the image acquisition equipment, and infrared ray projection often requires the assistance of infrared light equipment. None of the above methods can achieve the goals of convenience, efficiency, and low cost.

[0004] Researchers have made many attempts at eye tracking. The following two methods are commonly used in the industry:

[0005] 1. Intrusive eye tracking technology. This type of method has the following problems: In order to obtain changes in the direction of eye observation, invasive eye tracking technology usually requires additional hardware for assistance, such as the infrared auxiliary light source used in the pupil-corneal reflection vector method, the current signal used in the electrooculogram method, and the small mirror used in the contact lens method. These additional hardware will cause discomfort to the user's eyes, or even cause damage. In addition, the use of additional hardware equipment requires additional cost investment.

[0006] 2. Based on video image eye tracking, the position of the iris center and the reference point in the eye area are determined in the image. The reference point refers to a point that remains relatively still with the eye area. The eye tracking of the iris center is performed based on the position of the iris center and the reference point in at least two frames of images. This method uses fitting based on the iris contour matching method to determine the iris center. The contour shape of this method is easily affected by ambient light, resulting in inaccurate positioning of the iris center, which is not conducive to eye tracking. Summary of the invention

[0007] In order to solve the technical problems in the prior art such as the discomfort caused by the need for additional hardware assistance and the inaccurate positioning of the center of the human iris due to susceptibility to ambient light, the present invention proposes an image-based eye tracking method and system to solve the above technical problems.

[0008] According to one aspect of the present invention, an image-based eye tracking method comprises:

[0009] S1: Perform face detection on the image to be detected and obtain a face detection frame;

[0010] S2: Using the face key point localization network to locate the eye region of interest and perform pupil key point localization; and

[0011] S3: Calculate the horizontal offset ratio based on the pupil center and the eye area center to determine the eye direction.

[0012] In some specific embodiments, step S1 specifically comprises performing face detection on the image to be detected using an anchor-free face detection method to obtain a face frame.

[0013] In some specific embodiments, the anchor-free face detection method includes: inputting the image to be detected into the face detection network to output the face heat map, face scale map and face center offset map, the points in the face heat map that are greater than the preset threshold are faces, and taking the face coordinate offset at the corresponding position on the face center offset map, adding it to the coordinates in the face heat map to obtain the center position of the face, calculating the width and height of the face on the face scale map to obtain the face detection frame, and using non-maximum suppression to eliminate repeated face detection frames. This method can solve the problem of face easy to miss detection in an environment with poor lighting.

[0014] In some specific embodiments, before step S2, the face detection frame is also expanded, and the horizontal axis direction of the face detection frame is expanded by one quarter of the width of the face detection frame, and the vertical axis direction of the face detection frame is expanded by one quarter of the height of the face detection frame.

[0015] In some specific embodiments, the facial key point localization network includes a MobileNetV2 backbone network, a convolutional layer, a multi-scale layer, and a fully connected layer, wherein the multi-scale layer is a layer that downsamples the output of the previous convolutional layer twice and concatenates the corresponding outputs, and the fully connected layer outputs 896 neurons. With this setting, features on feature maps of different scales can be fused to enhance the robustness of the facial key point localization model.

[0016] In some specific embodiments, step S2 includes:

[0017] S21. Preprocessing the face training image, the preprocessing includes data amplification and data normalization, the data amplification includes random edge filling and random color jitter;

[0018] S22. Input the face training image into the face key point network and calculate the loss of the network output and the manual annotation Among them, L off is the loss value of the face key point coordinates, o k is the true value of the manually marked coordinates, is the coordinate value predicted by the network, N is the total number of samples, and x is the coordinate value of the key points of the face;

[0019] S23. Training optimizer Adam, where the hyperparameter β 1 and β 2 0.9 and 0.99 respectively;

[0020] S24. The learning rate is set to 5e -4 ;

[0021] S25. Reduce the learning rate to 5e after 80 iterations -5 , repeat the iteration 80 times, when the final loss value is less than or equal to the preset loss threshold, adjust the weight and gradient of the positioning model until the final loss value is greater than the preset loss threshold, and output the facial key point positioning model;

[0022] S26. Use the facial key point positioning model to output the coordinates of 468 facial key points.

[0023] In some specific embodiments, pupil key point positioning specifically includes: expanding the eye area to obtain the eye region of interest according to the 468 facial key point coordinates, and inputting the pupil key point positioning model to output the pupil key point coordinates.

[0024] In some specific embodiments, the calculation formula of the horizontal offset ratio in step S3 is When HorizontalRatio≤0.35, it means the eyes are looking to the right; when HorizontalRatio≥0.65, it means the eyes are looking to the left; when 0.35<HorizontalRatio<0.65, it means the eyes are looking to the center, where leftiris_center_x represents the coordinates of the center point of the left eye pupil, rightiris_center_x represents the coordinates of the center point of the right eye pupil, lefteye_center_x represents the coordinates of the center point of the left eye area, and righteye_center_x represents the coordinates of the center point of the right eye area.

[0025] According to a second aspect of the present invention, a computer-readable storage medium is provided, on which one or more computer programs are stored. When the one or more computer programs are executed by a computer processor, any of the above methods is implemented.

[0026] According to a third aspect of the present invention, an image-based eye tracking system comprises:

[0027] A face detection frame acquisition unit: configured to perform face detection on the image to be detected and obtain a face detection frame;

[0028] Parameter acquisition unit: configured to locate the eye region of interest and pupil key point location using a face key point location network;

[0029] Human eye direction calculation unit: configured to determine the human eye direction by calculating the horizontal offset ratio based on the pupil center and the eye area center.

[0030] The present invention proposes an image-based eye tracking method and system, which adopts Centerface, a face detection method based on anchor-free points. The method avoids the tedious anchor-based post-processing time, is fast and efficient, has a high recall rate and a low false detection rate, and better solves the problem of missed face detection in an environment with poor lighting conditions; a lightweight deep neural network (face key point positioning network) for mobile terminals is used to locate face key points, meeting the real-time, efficient and accurate requirements of the mobile terminals; a lightweight deep neural network (pupil key point positioning network) for mobile terminals is used to locate pupil key points, and this module meets the real-time, efficient and accurate requirements of the mobile terminals under complex backgrounds; the gaze direction of the human eye is calculated based on the offset ratio between the pupil center coordinates and the eye area center, thereby realizing sensitive, efficient and accurate eye tracking. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The accompanying drawings are included to provide a further understanding of the embodiments and are incorporated into and constitute a part of this specification. The accompanying drawings illustrate the embodiments and together with the description are used to explain the principles of the present invention. Other embodiments and many expected advantages of the embodiments will be readily appreciated as they become better understood by reference to the following detailed description. Other features, objects and advantages of the present application will become more apparent by reading the detailed description of the non-limiting embodiments made with reference to the following drawings:

[0032] Figure 1 is a flow chart of an image-based eye tracking method according to an embodiment of the present application;

[0033] Figure 2 is a flow chart of an image-based eye tracking method according to a specific embodiment of the present application;

[0034] Figure 3 This is a diagram of a facial key point positioning network structure of a specific embodiment of the present application;

[0035] Figure 4 This is a pupil key point positioning network structure diagram of a specific embodiment of the present application;

[0036] Figure 5 is a framework diagram of an image-based eye tracking system according to an embodiment of the present application;

[0037] Figure 6 It is a structural diagram of a computer system suitable for implementing an electronic device of an embodiment of the present application. DETAILED DESCRIPTION

[0038] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. It should also be noted that, for ease of description, only the parts related to the relevant invention are shown in the accompanying drawings.

[0039] It should be noted that, in the absence of conflict, the embodiments and features in the embodiments of the present application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0040] According to an image-based eye tracking method of one embodiment of the present application, Figure 1 FIG. 1 shows a flow chart of an image-based eye tracking method according to an embodiment of the present application. Figure 1 As shown, the method includes:

[0041] S101: Perform face detection on the image to be detected to obtain a face detection frame.

[0042] In a specific embodiment, a face detection method without anchor points is used to perform face detection on an image to be detected to obtain a face frame. The face detection method without anchor points includes: inputting the image to be detected into a face detection network to output a face heat map, a face scale map, and a face center offset map, points in the face heat map that are greater than a preset threshold are faces, and taking out the face coordinate offset at the corresponding position on the face center offset map, adding it to the coordinates in the face heat map to obtain the center position of the face, calculating the width and height of the face on the face scale map to obtain a face detection frame, and using non-maximum suppression to eliminate duplicate face detection frames.

[0043] In a specific embodiment, the face detection frame is further expanded, and the horizontal axis direction of the face detection frame is expanded by one quarter of the width of the face detection frame, and the vertical axis direction of the face detection frame is expanded by one quarter of the height of the face detection frame. The expansion operation can prevent the omission of facial features and further improve the accuracy of recognition.

[0044] S102: Utilize the facial key point location network to locate the eye region of interest and perform pupil key point location.

[0045] In a specific embodiment, the facial key point location network includes a MobileNetV2 backbone network, a convolutional layer, a multi-scale layer, and a fully connected layer, wherein the multi-scale layer is downsampled twice by the output of the previous convolutional layer and the corresponding outputs are concatenated together, and the fully connected layer outputs 896 neurons. The key point location method is as follows:

[0046] S21. Preprocessing the face training image, the preprocessing includes data amplification and data normalization, the data amplification includes random edge filling and random color jitter;

[0047] S22. Input the face training image into the face key point network and calculate the loss of the network output and the manual annotation Among them, L off is the loss value of the face key point coordinates, o k is the true value of the manually marked coordinates, is the coordinate value predicted by the network, N is the total number of samples, and x is the coordinate value of the key points of the face;

[0048] S23. Training optimizer Adam, where the hyperparameter β 1 and β 2 0.9 and 0.99 respectively;

[0049] S24. The learning rate is set to 5e -4 ;

[0050] S25. Reduce the learning rate to 5e after 80 iterations -5 , repeat the iteration 80 times, when the final loss value is less than or equal to the preset loss threshold, adjust the weight and gradient of the positioning model until the final loss value is greater than the preset loss threshold, and output the facial key point positioning model;

[0051] S26. Use the facial key point positioning model to output the coordinates of 468 facial key points.

[0052] Furthermore, according to the coordinates of 468 facial key points, the eye area is expanded to obtain the eye region of interest, and the pupil key point positioning model is input to output the through-hole key point coordinates.

[0053] S103: Calculate the horizontal offset ratio based on the pupil center and the eye area center to determine the eye direction. Specifically, the calculation formula of the horizontal offset ratio is: The specific rule for determining the direction of human eyes is: when HorizontalRatio≤0.35, it means that the eyes are looking to the right; when HorizontalRatio≥0.65, it means that the eyes are looking to the left; when 0.35<HorizontalRatio<0.65, it means that the eyes are looking to the middle, where leftiris_center_x represents the coordinates of the center point of the left eye area, and rightiris_center_x represents the coordinates of the center point of the right eye area. This method can quickly obtain the direction of human eyes.

[0054] Continue to refer Figure 2 , Figure 2 A flow chart of an image-based eye tracking method according to a specific embodiment of the present application is shown. Figure 2 As shown, the method includes:

[0055] Step 201: input image;

[0056] Step 202: Face detection: The 2D image to be detected is subjected to face detection using a face detection method based on no anchor points (CenterFace), and the detection frame is recorded.

[0057] In a specific embodiment, face detection adopts a fast face detection method (Centerface) based on no anchor point, with high recall rate and low false detection rate, to solve the problem of easy missed detection of faces in an environment with poor lighting. The face detection steps are as follows:

[0058] The 2D surveillance image of the bank operation room to be detected is cut out and the demarcated detection area image is input into the face detection network for face detection, and the face heat map, face scale map and face center offset map are output;

[0059] Points in the face heat map that are greater than a preset threshold of 0.35 are considered to be faces, and then the face coordinate offset is taken out from the corresponding position on the face center offset map, and added to the coordinates of the face heat map to obtain the final center position of the face. Finally, the width and height of the face are calculated on the face scale map through exponential conversion to obtain the face detection frame, and then duplicate face frames are eliminated through non-maximum suppression (NMS).

[0060] In a specific embodiment, the face detection frame is expanded outwards to the surroundings, [x 1 ,y 1 ,x 2 ,y 2 ] is the coordinate of the face detection frame, where the x 1 ,x 2 Expand the detection frame by one quarter of its width w, i.e. The y value of the detection box 1 ,y 2 Expand the detection frame by one quarter of its height h, i.e.

[0061] Step 203: Facial key point location: The face area is cut out from the original image according to the face frame and sent to the face key point location network for facial key point location.

[0062] In a specific embodiment, the face area is cut out from the image according to the above-mentioned expanded face detection frame and sent to the face key point network to predict the face key points (468 points). The face key point positioning method includes a training step and a prediction step. Among them, the training step includes: face key point network design, based on transfer learning technology, the backbone network uses MobileNetV2, MobileNetV2 removes the last three layers (i.e., convolution layer, average pooling layer and fully connected layer), and accesses a custom convolution layer, multi-scale layer (Muticale Layer) and fully connected layer (FC Layer output is 896 neurons). The face key point positioning network structure is as follows Figure 3 As shown in the figure, the custom multi-scale layer is composed of the output of the previous convolutional layer, which is downsampled twice and the corresponding outputs are concatenated together to fuse the features of feature maps of different scales and enhance the robustness of the facial key point positioning model.

[0063] In a specific embodiment, the face training image is preprocessed, and the preprocessing includes data augmentation and data normalization processing, and the data augmentation includes random edge filling, random color jittering and other operations; the face training image is input into the face key point network, and the loss L is calculated by comparing the 896-dimensional output of the network with the true value (i.e., the x and y coordinates of the 486 face key points) that are manually annotated off , the formula is as follows Where L off is the loss value of the face key point coordinates, o k is the true value of the manually marked coordinates, is the coordinate value predicted by the network, N is the total number of samples; training optimizer Adam, hyperparameter β 1 and β 2They are 0.9 and 0.999 respectively; the learning rate is 5e -4 ; Reduce the learning rate to 5e after 80 iterations -5 , continue to repeat the iteration 80 times, when the final loss value is less than or equal to the preset threshold, adjust the internal parameters of the face key point positioning model (the internal parameters are the model's weights, gradients, etc.), until the final loss value is greater than the preset threshold, output the standard face key point positioning model; input the face image into the above-mentioned trained model, and output 468 face key point coordinates.

[0064] Step 204: pupil key point location. The eye region of interest is cut out according to the coordinates of the face key points to locate the pupil key points.

[0065] In a specific embodiment, the pupil key point positioning method also includes a training step and a prediction step. The pupil key point positioning training step includes network structure design and network model training. The pupil key point positioning network structure is similar to the face key point positioning network structure, and the difference is the number of neurons in the output layer. The number of neurons in the output layer of the pupil key point positioning network is 10. The pupil key point positioning network structure is as follows: Figure 4 shown.

[0066] In a specific embodiment, the model training of the pupil key point positioning network specifically includes: preprocessing the eye area training image, the preprocessing includes data augmentation and data normalization processing, and the data augmentation includes random edge filling, random color jitter and other operations; wherein the eye area image is generated according to the following: according to the 468 facial key points obtained above, for the left eye, the left corner point (x1, y1) and the right corner point (x2, y2) of the left eye are taken out, and w=x2-x1 is obtained after calculation. The following rule (referred to as Rule 1) is applied to x1, x2, y1, and y2 to expand the eye area and obtain the left eye area of ​​interest. Rule 1 is as follows:

[0067] x1=x1-w*(2.3-1) / 2

[0068] x2=x2+w*(2.3-1) / 2

[0069] y1=y1-2.3*w / 2

[0070] y2=y2+2.3*w / 2

[0071] For the right eye, the left corner point (x3, y3) and the right corner point (x4, y4) of the right eye are taken out and the same operation is performed as for the left eye to obtain the image of the right eye region of interest. Then the image of the right eye region of interest is horizontally mirrored and flipped as the training image. The eye region training image is input into the pupil key point network, and the loss L is calculated by comparing the 10-dimensional output of the network with the true value annotated by humans (i.e., the x and y coordinates of the 5 facial key points). off , the calculation method is the same as the L in the above face key points off Calculation formula; training optimizer Adam, hyperparameter β 1 and β 2 They are 0.9 and 0.999 respectively; the learning rate is 5e -4 ; Reduce the learning rate to 5e after 60 iterations -5 , continue to repeat the iteration for 60 times. When the final loss value is less than or equal to the preset threshold, adjust the internal parameters of the pupil key point positioning model (the internal parameters are the weights, gradients, etc. of the model) until the final loss value is greater than the preset threshold, and then output the standard pupil key point positioning model. Input the left eye region of interest into the above-trained pupil key point positioning model, and output the left eye pupil key point coordinates. Since the pupil key point positioning model is trained based on the left eye image, for the right eye, the corresponding pupil key point coordinates are output. According to the mirror relationship, the right eye image needs to be flipped on the y-axis before inputting the model to restore the original image, that is, the obtained right eye pupil key point coordinates are x'=Wx operated to restore the coordinates to the original image, where W is the width of the right eye region of interest.

[0072] Step 205: Eye tracking. The horizontal offset ratio is calculated based on the pupil center and the eye area center and the gaze direction of the human eye is determined, thereby achieving eye tracking.

[0073] In a specific embodiment, according to the above 468 facial key points are obtained, for the left eye, the left corner point of the left eye (x 01 ,y 01 ), right corner (x 02 ,y 02 ), upper boundary point (x 03 ,y 03 ) and the lower boundary point (x 04 ,y 04 ), calculate the coordinates of the center point of the left eye area (lefteye_center_x, lefteye_center_y), where lefteye_center_x = (x 01 +x 02 ) / 2,lefteye_center_y=(y 01 +y 02) / 2. According to rule 1, cut out the left eye area image from the original image and input the pupil key point positioning model to obtain the left eye pupil midpoint coordinates (leftiris_center_x, rightiris_center_y). Perform similar operations on the right eye to obtain the right eye area center point coordinates (lefteye_center_x, lefteye_center_y) and the right eye pupil midpoint coordinates (leftiris_center_x, rightiris_center_y), and calculate the horizontal offset ratio HorizontalRatio:

[0074]

[0075] When HorizontalRatio<=0.35, it means the eyes are looking to the right;

[0076] When HorizontalRatio>=0.65, it means the eyes are looking to the left;

[0077] When HorizontalRatio>0.35 and HorizontalRatio<0.65, it means looking towards the middle.

[0078] Since the mobile APP collects video images under unfavorable ambient lighting conditions and complex backgrounds, how to effectively locate the face and pupil center and accurately track eye movements under these unfavorable conditions; the above method can collect 2D images based on the mobile APP, and can achieve accurate real-time eye movement tracking under unfavorable conditions such as complex backgrounds and unfavorable ambient lighting. The anchor-free face detection method Centerface is adopted. This method avoids the tedious anchor-based post-processing time, is fast and efficient, has a high recall rate and a low false detection rate, and better solves the problem of missed face detection in an environment with unfavorable lighting; a lightweight deep neural network for mobile terminals (face key point positioning network) is used to locate face key points to meet the real-time, efficient and accurate requirements of the mobile terminal; a lightweight deep neural network for mobile terminals (pupil key point positioning network) is used to locate pupil key points. This module meets the real-time, efficient and accurate requirements of the mobile terminal under complex backgrounds; the human eye gaze direction is calculated based on the offset ratio between the pupil center coordinates and the eye area center, so as to achieve eye movement tracking, which is sensitive, efficient and accurate.

[0079] Continue to refer Figure 5 , Figure 5The framework diagram of an image-based eye tracking system according to an embodiment of the present application is shown. The system specifically includes a face side frame acquisition unit 501, a parameter acquisition unit 502, and an eye direction calculation unit 503. The face detection frame acquisition unit 501 is configured to perform face detection on the image to be detected and obtain a face detection frame; the parameter acquisition unit 502 is configured to use a face key point positioning network to locate the eye area of ​​interest and perform pupil key point positioning; the eye direction calculation unit 503 is configured to determine the eye direction by calculating the horizontal offset ratio based on the pupil center and the eye area center. The system is based on Figure 1 The image-based eye tracking method shown in or 2 can effectively locate the face and pupil center and accurately track eye movements under conditions such as unsatisfactory ambient lighting conditions and complex backgrounds.

[0080] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 suitable for implementing an electronic device of an embodiment of the present application. Figure 6 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0081] like Figure 6 As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0082] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0083] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable storage medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above functions defined in the method of the present application are executed. It should be noted that the computer-readable storage medium of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium can be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to, an electrical connection with one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable storage medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wireless, wireline, optical cable, RF, etc., or any suitable combination of the foregoing.

[0084] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0085] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0086] The modules involved in the embodiments of the present application may be implemented by software or by hardware.

[0087] As another aspect, the present application also provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or it may exist independently without being assembled into the electronic device. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed by the electronic device, the electronic device: performs face detection on the image to be detected to obtain a face detection frame; uses a face key point positioning network to locate the eye area of ​​interest and locate the pupil key point; and calculates the horizontal offset ratio based on the pupil center and the eye area center to determine the eye direction.

[0088] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.

Claims

1. An image-based eye tracking method, It is characterized in that include: S1: Perform face detection on the image to be detected and obtain a face detection frame; S2: Use the face key point localization network to locate the eye region of interest and perform pupil key point localization; as well as S3: Calculate and obtain the horizontal offset ratio based on the pupil center and the center of the eye region to determine the human eye orientation; the calculation formula of the horizontal offset ratio When HorizontalRatio ≤ 0.35, it means the eyes are looking to the right; when HorizontalRatio ≥ 0.65, it means the eyes are looking to the left; when 0.35 < HorizontalRatio < 0.65, it means the eyes are looking in the middle, where leftiris_center_x represents the coordinate of the center point of the left eye pupil, rightiris_center_x represents the coordinate of the center point of the right eye pupil, lefteye_center_x represents the coordinate of the center point of the left eye region, and righteye_center_x represents the coordinate of the center point of the right eye region.

2. The image-based eye tracking method according to claim 1, It is characterized in that The step S1 specifically comprises performing face detection on the image to be detected by using the face detection method without anchor points to obtain a face frame.

3. The image-based eye tracking method according to claim 2, It is characterized in that The anchor-free face detection method includes: inputting the image to be detected into a face detection network to output a face heat map, a face scale map and a face center offset map, the points in the face heat map that are greater than a preset threshold are faces, and taking out the face coordinate offset at the corresponding position on the face center offset map, adding it to the coordinates in the face heat map to obtain the center position of the face, calculating the width and height of the face on the face scale map to obtain a face detection frame, and using non-maximum suppression to eliminate repeated face detection frames.

4. The image-based eye tracking method according to claim 3, It is characterized in that Before step S2, the face detection frame is also expanded, and the horizontal coordinate direction of the face detection frame is expanded by one quarter of the width of the face detection frame, and the vertical coordinate direction of the face detection frame is expanded by one quarter of the height of the face detection frame.

5. The image-based eye tracking method according to claim 1, It is characterized in that The facial key point localization network includes a MobileNetV2 backbone network, a convolutional layer, a multi-scale layer and a fully connected layer, wherein the multi-scale layer is obtained by downsampling the output of the previous convolutional layer twice and concatenating the corresponding outputs, and the fully connected layer outputs 896 neurons.

6. The image-based eye tracking method according to claim 1, It is characterized in that The step S2 comprises: S21. Preprocessing the face training image, wherein the preprocessing includes data amplification and data normalization, wherein the data amplification includes random edge filling and random color jittering; S22. Input the face training image into the face key point network and calculate the loss of the network output and the manual annotation Among them, L off is the loss value of the face key point coordinates, o k is the true value of the manually marked coordinates, is the coordinate value predicted by the network, N is the total number of samples, and x is the coordinate value of the key points of the face; S23. Training optimizer Adam, where the hyperparameter β 1 and β 2 0.9 and 0.99 respectively; S24. The learning rate is set to 5e -4 ; S25. Reduce the learning rate to 5e after 80 iterations -5 , repeat the iteration 80 times, when the final loss value is less than or equal to the preset loss threshold, adjust the weight and gradient of the positioning model until the final loss value is greater than the preset loss threshold, and output the facial key point positioning model; S26. Use the facial key point positioning model to output 468 facial key point coordinates.

7. The image-based eye tracking method according to claim 6, It is characterized in that The pupil key point positioning specifically includes: expanding the eye area to obtain the eye region of interest according to the 468 facial key point coordinates, and inputting the pupil key point positioning model to output the pupil key point coordinates.

8. A computer-readable storage medium having one or more computer programs stored thereon, It is characterized in that When the one or more computer programs are executed by a computer processor, the method according to any one of claims 1 to 7 is implemented.

9. An image-based eye tracking system, It is characterized in that The system comprises: A face detection frame acquisition unit: configured to perform face detection on the image to be detected and obtain a face detection frame; Parameter acquisition unit: Configured to use a face key point localization network to locate the region of interest of the eyes and perform pupil key point localization; Human eye direction calculation unit: configured to calculate and obtain the horizontal offset ratio based on the pupil center and the eye area center to determine the human eye direction, and the calculation formula of the horizontal offset ratio is When HorizontalRatio≤0.35, it means the eyes are looking to the right; When HorizontalRatio ≥ 0.65, it indicates that the eyes are looking to the left; when 0.35 < HorizontalRatio < 0.65, it indicates that the eyes are looking towards the middle, where leftiris_center_x represents the coordinates of the center point of the left pupil, rightiris_center_x represents the coordinates of the center point of the right pupil, lefteye_center_x represents the coordinates of the center point of the left eye region, and righteye_center_x represents the coordinates of the center point of the right eye region.