Data-driven method and device for estimating line of sight when wearing glasses

By detecting the user wearing glasses and obtaining the glasses prescription, and using the line of sight estimation model to correct the line of sight error, the problem of line of sight estimation error under the condition of wearing glasses is solved, and more accurate line of sight direction detection is achieved.

CN115100727BActive Publication Date: 2024-09-24TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210494729.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-07
Publication Date
2024-09-24
Estimated Expiration
2042-05-07

AI Technical Summary

Technical Problem

The existing technology has errors in line of sight estimation when wearing glasses and cannot accurately obtain the direction of the user's line of sight. In particular, errors caused by the refraction effect of the lenses are difficult to correct.

Method used

By detecting whether the user wears glasses and obtaining the actual glasses prescription, the user's actual line of sight estimate is obtained by using the mapping relationship between the pre-built line of sight estimation model and the eye area image and head posture to calculate and correct the line of sight error.

Benefits of technology

The accuracy of line of sight estimation under wearing glasses is improved, requiring only additional input of glasses power, simplifying the implementation process and facilitating promotion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115100727B
    Figure CN115100727B
Patent Text Reader

Abstract

The present application discloses a data-driven method and device for estimating line of sight when wearing glasses, wherein the method comprises: detecting whether a user meets the conditions for wearing glasses; when detecting that the user meets the conditions for wearing glasses, obtaining the actual degree of the user's glasses; calculating the corresponding line of sight error when wearing glasses according to the actual degree of the glasses, and correcting the line of sight estimation value of the user according to the line of sight error when wearing glasses, to obtain the actual line of sight estimation value of the user. Thus, the technical problem that the line of sight estimation method based on appearance in the related art is not applicable to the conditions for wearing glasses, is easily interfered by the lenses, and causes errors in the line of sight estimation result is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical fields of computer vision and computer graphics, and in particular to a data-driven method and device for estimating line of sight when wearing glasses. Background Art

[0002] Line of sight estimation has many applications in the fields of virtual reality and augmented reality. For example, it allows users to interact with applications through changes in their line of sight, eliminating the inconvenience of external control devices. In addition, it can dynamically allocate computing resources according to the user's line of sight, render the scene within the user's field of view in detail, and render the scene outside the field of view in a fuzzy manner, thereby improving the utilization of computing resources and lowering the hardware threshold of related applications.

[0003] In related technologies, such as the appearance-based gaze estimation method, the image information of the eye area of ​​the face and the head posture are input into the computer to calculate the gaze direction in the camera coordinate system. The appearance of the eye area of ​​the face is used as a clue, and the eyeball features are used to estimate the eyeball rotation. The final gaze estimation result is then obtained by combining the head posture.

[0004] However, in the related art, when wearing glasses, the amount of rotation of the human eye in the same direction will change due to the refractive effect of the lenses, thereby "cheating" the computer and causing errors in the line of sight estimation results, resulting in a certain deviation in line of sight estimation, which needs to be improved. Summary of the invention

[0005] The present application provides a data-driven method and device for estimating line of sight when wearing glasses, in order to solve the technical problem that the line of sight estimation method based on appearance in the related art is not suitable for wearing glasses, is easily interfered by lenses, and causes errors in the line of sight estimation results.

[0006] The first aspect of the present application provides a data-driven method for estimating line of sight when wearing glasses, comprising the following steps: detecting whether a user meets the conditions for wearing glasses; when it is detected that the user meets the conditions for wearing glasses, obtaining the actual glasses degree of the user; calculating the corresponding line of sight error when wearing glasses according to the actual glasses degree, and correcting the line of sight estimation value of the user according to the line of sight error when wearing glasses to obtain the actual line of sight estimation value of the user.

[0007] Optionally, in one embodiment of the present application, before correcting the user's line of sight estimation value according to the line of sight error while wearing glasses, it also includes: collecting the current eye area image of the user; and obtaining the actual head posture of the user.

[0008] Optionally, in one embodiment of the present application, the corresponding line of sight error when wearing glasses is calculated according to the actual glasses degree, and the line of sight estimation value of the user is corrected according to the line of sight error when wearing glasses to obtain the actual line of sight estimation value of the user, including: based on a pre-built line of sight estimation model, according to the mapping relationship between the glasses degree and the eye area image and the head posture, obtaining the actual line of sight estimation value corresponding to the actual glasses degree.

[0009] Optionally, in one embodiment of the present application, before obtaining the actual line of sight estimation value of the user, it also includes: obtaining images of the learning user with glasses and without glasses, and obtaining corresponding real labels of head posture, line of sight direction, and glasses degree, to generate a data set; performing facial image cropping based on the images with glasses and the images without glasses to obtain a first face eye area image and a second face eye area image, respectively; and using the first face eye area image and the second face eye area image and the data set to obtain the mapping relationship.

[0010] Optionally, in one embodiment of the present application, it also includes: when it is detected that the user does not meet the glasses wearing condition, calculating the actual line of sight estimation value according to the current eye area image and the actual head posture.

[0011] The second aspect of the present application provides a data-driven device for estimating the line of sight when wearing glasses, including: a detection module, used to detect whether a user meets the conditions for wearing glasses; a degree acquisition module, used to obtain the actual glasses degree of the user when it is detected that the user meets the conditions for wearing glasses; an estimation module, used to calculate the corresponding line of sight error when wearing glasses according to the actual glasses degree, and correct the line of sight estimation value of the user according to the line of sight error when wearing glasses to obtain the actual line of sight estimation value of the user.

[0012] Optionally, in one embodiment of the present application, it further includes: a collection module for collecting the current eye area image of the user; and a posture acquisition module for acquiring the actual head posture of the user.

[0013] Optionally, in one embodiment of the present application, the estimation module is further used to obtain an actual line of sight estimation value corresponding to the actual eyeglass degree based on a pre-built line of sight estimation model and a mapping relationship between the eyeglass degree and the eye area image and the head posture.

[0014] Optionally, in one embodiment of the present application, it also includes: a generation module, used to obtain images of the learning user wearing glasses and not wearing glasses, and obtain the corresponding real labels of head posture, line of sight direction, and glasses degree, to generate a data set; a cropping module, used to crop facial images based on the images wearing glasses and the images not wearing glasses, to obtain a first face eye area image and a second face eye area image, respectively; a mapping module, used to use the first face eye area image and the second face eye area image and the data set to obtain the mapping relationship.

[0015] Optionally, in one embodiment of the present application, it also includes: a calculation module, which is used to calculate the actual line of sight estimation value according to the current eye area image and the actual head posture when it is detected that the user does not meet the glasses wearing condition.

[0016] A third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the data-driven method for estimating line of sight when wearing glasses as described in the above embodiment.

[0017] A fourth aspect of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the data-driven method for estimating the line of sight when wearing glasses as described in the above embodiments.

[0018] The embodiment of the present application can correct the user's line of sight estimation value according to the user's actual eyeglasses power when the user wears glasses, and obtain the actual line of sight estimation value when the user wears glasses, which can improve the accuracy of line of sight estimation under the condition of wearing glasses, and only requires additional input of the eyeglasses power, which is simple and easy to implement and easy to promote. Therefore, the technical problem that the line of sight estimation method based on appearance in the related art is not suitable for wearing glasses, is easily interfered by the lens, and leads to errors in the line of sight estimation result is solved.

[0019] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0021] Figure 1 A flowchart of a data-driven method for estimating line of sight when wearing glasses provided according to an embodiment of the present application;

[0022] Figure 2This is a flow chart of a data-driven method for estimating line of sight when wearing glasses according to one embodiment of the present application;

[0023] Figure 3 A schematic diagram of the structure of a data-driven eyeglass sight estimation device provided according to an embodiment of the present application;

[0024] Figure 4 It is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0026] The following describes the data-driven line of sight estimation method and device for wearing glasses according to the embodiment of the present application with reference to the accompanying drawings. In view of the technical problem that the line of sight estimation method based on appearance in the related art mentioned in the background technology center is not suitable for wearing glasses, is easily interfered by lenses, and causes errors in the line of sight estimation results, the present application provides a data-driven line of sight estimation method for wearing glasses. In this method, when the user wears glasses, the line of sight estimation value of the user can be corrected according to the actual degree of the user's glasses to obtain the actual line of sight estimation value when the user wears glasses, which can improve the accuracy of line of sight estimation under wearing glasses conditions, and only requires additional input of the degree of the glasses, which is simple and easy to implement and easy to promote. Thus, the technical problem that the line of sight estimation method based on appearance in the related art is not suitable for wearing glasses, is easily interfered by lenses, and causes errors in the line of sight estimation results is solved.

[0027] Specifically, Figure 1 A flowchart of a data-driven method for estimating line of sight while wearing glasses provided in an embodiment of the present application.

[0028] like Figure 1 As shown, the data-driven eye-line estimation method for wearing glasses includes the following steps:

[0029] In step S101, it is detected whether the user meets the glasses wearing condition.

[0030] In the actual implementation process, there can be many ways to detect whether the user is wearing glasses. For example, the embodiment of the present application can obtain the user's facial image and determine whether the user meets the conditions for wearing glasses based on the facial image. It can also determine whether the user meets the conditions for wearing glasses by allowing the user to choose whether to wear glasses, which facilitates the subsequent correction of the line of sight estimation when wearing glasses, thereby obtaining the user's actual line of sight estimation value.

[0031] In step S102, when it is detected that the user meets the glasses wearing condition, the actual glasses degree of the user is obtained.

[0032] As a possible implementation method, when the embodiment of the present application detects that the user meets the conditions for wearing glasses, the actual glasses degree of the user can be further obtained, wherein the actual glasses degree of the user can be input by the user according to his or her actual situation, or it can be detected by an external lens degree detection device, and the value can be imported into the embodiment of the present application, so as to facilitate the subsequent calculation of the line of sight error according to the lens degree, and then correct the estimated value of the line of sight when wearing glasses to obtain the actual line of sight estimated value of the user.

[0033] In step S103, the corresponding sight line error when wearing the glasses is calculated according to the actual glasses degree, and the sight line estimation value of the user is corrected according to the sight line error when wearing the glasses to obtain the actual sight line estimation value of the user.

[0034] During the actual implementation process, the embodiments of the present application can perform preliminary line of sight estimation on users who meet the conditions for wearing glasses, obtain an initial line of sight estimation value, and calculate the corresponding line of sight error for wearing glasses based on the actual glasses degree obtained, and then correct the user's initial line of sight estimation value based on the line of sight error for wearing glasses to obtain the user's actual line of sight estimation value, which can improve the accuracy of line of sight estimation under the condition of wearing glasses, and only requires the additional input of the glasses degree, with low additional cost, which is easy to promote.

[0035] Optionally, in one embodiment of the present application, before correcting the user's line of sight estimation value according to the line of sight error when wearing glasses, it also includes: collecting the user's current eye area image; and obtaining the user's actual head posture.

[0036] It is understandable that different actual head postures of the user have different effects on line of sight estimation. Therefore, after collecting the user's facial image, the embodiment of the present application, in addition to cropping the facial image to obtain the facial eye area image, also needs to obtain the user's actual head posture, thereby ensuring the accuracy of the user's actual line of sight estimation value.

[0037] Optionally, in one embodiment of the present application, a corresponding line of sight error when wearing glasses is calculated according to the actual glasses degree, and the user's line of sight estimation value is corrected according to the line of sight error when wearing glasses to obtain the user's actual line of sight estimation value, including: based on a pre-built line of sight estimation model, according to the mapping relationship between the glasses degree and the eye area image and the head posture, obtaining the actual line of sight estimation value corresponding to the actual glasses degree.

[0038] In the actual implementation process, the embodiment of the present application can obtain an initial line of sight estimation value based on the input face eye area image and head posture information based on the pre-built line of sight estimation model, and then obtain the actual line of sight estimation value corresponding to the actual eyeglass degree based on the mapping relationship between the input eyeglass degree and the eye area image and the head posture. The actual eyeglass degree of the user is obtained, and the corresponding line of sight error is calculated, so as to correct the user's line of sight estimation value and obtain the user's actual line of sight estimation value, which can improve the accuracy of line of sight estimation under the condition of wearing glasses.

[0039] It should be noted that the pre-built line of sight estimation model will be elaborated in detail below.

[0040] Optionally, in one embodiment of the present application, before obtaining the user's actual line of sight estimation value, it also includes: obtaining images of the learning user with and without glasses, and obtaining the corresponding real labels of head posture, line of sight direction, and glasses degree, to generate a data set; performing facial image cropping based on the images with and without glasses to obtain a first face eye area image and a second face eye area image, respectively; and obtaining a mapping relationship using the first face eye area image and the second face eye area image and the data set.

[0041] Here, the line of sight estimation model is elaborated in detail.

[0042] Specifically, the embodiment of the present application can collect images of the same learning user wearing glasses and not wearing glasses, as well as the corresponding head posture, the direction of sight and the real label of the degree of glasses, so as to produce a data set, eliminate individual differences between different people, and ensure that the only variable is glasses, which is conducive to the neural network to accurately learn the impact of glasses, and perform facial image cropping on the images wearing glasses and the images not wearing glasses, respectively, to obtain the first face eye area image and the second face eye area image, and further use the neural network to obtain a mapping relationship, so that the output line of sight estimation through the first face eye area image, the second face eye area image, the head posture and the corresponding glasses degree is close to the real label of the line of sight direction. Among them, the corresponding glasses degree label enables the neural network to learn the mapping relationship between the error impact and the glasses degree.

[0043] It is understandable that in the related art, line of sight estimation requires the input of eye area images and head posture information. The embodiment of the present application can input the glasses degree on this basis, and automatically correct the line of sight estimation deviation caused by the glasses through the mapping relationship learned by the neural network, so as to obtain a more accurate line of sight estimation value. Since the refraction effect of glasses on light is very complex and direct modeling is difficult, the neural network can use a data-driven method to learn the mapping relationship between the influence of glasses and various variables.

[0044] Optionally, in one embodiment of the present application, it also includes: when it is detected that the user does not meet the conditions for wearing glasses, calculating the actual line of sight estimation value based on the current eye area image and the actual head posture.

[0045] During the actual implementation process, the embodiments of the present application can detect through face image detection or the user's choice of whether to wear glasses, and when it is detected that the user does not meet the conditions for wearing glasses, the actual line of sight estimation value can be directly calculated based on the current eye area image and the actual head posture without correction. This makes the embodiments of the present application compatible with line of sight estimation without wearing glasses while being able to perform line of sight estimation with glasses, and is more versatile.

[0046] Combine the following Figure 2 As shown, the working principle of the data-driven eye-line estimation method for wearing glasses according to the embodiment of the present application is described in detail with a specific embodiment.

[0047] like Figure 2 As shown, the embodiment of the present application includes the following steps:

[0048] Step S201: training a sight line estimation model. Specifically, training a sight line estimation model may include the following steps:

[0049] 1. Prepare a dataset, which may include images of the same person wearing and not wearing glasses, as well as the corresponding real labels of head posture, sight direction, and glasses degree.

[0050] 2. Crop the face image to obtain an image of the eye area of ​​the face.

[0051] 3. Input the eye area image, head posture, and glasses degree, and require the output result of the gaze estimation model to be close to the true label of the gaze direction to form a mapping relationship.

[0052] Step S202: Input user information. The embodiment of the present application can collect user images, and obtain the user's eyeglasses degree under the premise that the user wears glasses, and then obtain and input the user's face eye area image, head posture and eyeglasses degree.

[0053] Step S203: Obtaining an initial sight line estimation value. The embodiment of the present application can obtain a rough sight line result, namely, an initial sight line estimation value, by using the image of the user's eye area and the head posture information.

[0054] Step S204: Obtaining an actual sight line estimation value using the sight line estimation model. Further, the embodiment of the present application can obtain an actual sight line estimation value based on the above steps according to the input glasses degree and the learned mapping relationship.

[0055] During the actual implementation process, the embodiment of the present application can calculate the actual line of sight estimation value based on the current eye area image and the actual head posture when it is detected that the user does not meet the conditions for wearing glasses.

[0056] According to the data-driven eye sight estimation method for wearing glasses proposed in the embodiment of the present application, when the user wears glasses, the user's eye sight estimation value can be corrected according to the user's actual eye sight degree, and the actual eye sight estimation value when the user wears glasses can be obtained, which can improve the accuracy of eye sight estimation under the condition of wearing glasses, and only requires additional input of the eye sight degree, which is simple and easy to implement and easy to promote. Therefore, the technical problem that the appearance-based eye sight estimation method in the related art is not suitable for wearing glasses, is easily interfered by the lens, and causes errors in the eye sight estimation result is solved.

[0057] Next, a data-driven eye-line estimation device for wearing glasses proposed in an embodiment of the present application is described with reference to the accompanying drawings.

[0058] Figure 3 It is a block diagram of a data-driven eye-line estimation device for wearing glasses according to an embodiment of the present application.

[0059] like Figure 3 As shown, the data-driven eyeglass sight estimation device 10 includes: a detection module 100 , a degree acquisition module 200 and an estimation module 300 .

[0060] Specifically, the detection module 100 is used to detect whether the user meets the conditions for wearing glasses.

[0061] The degree acquisition module 200 is used to acquire the actual eyeglass degree of the user when it is detected that the user meets the conditions for wearing glasses.

[0062] The estimation module 300 is used to calculate the corresponding sight line error of wearing glasses according to the actual glasses degree, and correct the user's sight line estimation value according to the sight line error of wearing glasses to obtain the user's actual sight line estimation value.

[0063] Optionally, in one embodiment of the present application, the data-driven eyeglass wearing sight line estimation device 10 further includes: a collection module.

[0064] Among them, the acquisition module is used to acquire the user's current eye area image; the posture acquisition module is used to acquire the user's actual head posture.

[0065] Optionally, in one embodiment of the present application, the estimation module 300 is further used to obtain an actual line of sight estimation value corresponding to the actual eyeglass degree based on a pre-built line of sight estimation model and a mapping relationship between the eyeglass degree and the eye area image and the head posture.

[0066] Optionally, in one embodiment of the present application, the data-driven eyeglass wearing sight line estimation device 10 further includes: a generation module, a clipping module and a mapping module.

[0067] Among them, the generation module is used to obtain the images of the learning user wearing glasses and not wearing glasses, and obtain the corresponding real labels of head posture, line of sight direction, and glasses degree to generate a data set.

[0068] The cropping module is used to crop the face image based on the image with glasses and the image without glasses to obtain a first face eye area image and a second face eye area image respectively.

[0069] The mapping module is used to obtain a mapping relationship using the first human face eye region image, the second human face eye region image and the data set.

[0070] Optionally, in one embodiment of the present application, the data-driven eyeglass sight line estimation device 10 further includes: a calculation module.

[0071] Among them, the calculation module is used to calculate the actual line of sight estimation value based on the current eye area image and the actual head posture when it is detected that the user does not meet the conditions for wearing glasses.

[0072] It should be noted that the above explanations on the data-driven eye-line estimation method embodiment for wearing glasses are also applicable to the data-driven eye-line estimation device for wearing glasses of this embodiment, and will not be repeated here.

[0073] According to the data-driven eyeglass sight estimation device proposed in the embodiment of the present application, when the user wears glasses, the user's sight estimation value can be corrected according to the user's actual eyeglass power, and the actual sight estimation value of the user when wearing glasses can be obtained, which can improve the accuracy of sight estimation under the condition of wearing glasses, and only requires additional input of the eyeglass power, which is simple and easy to implement and easy to promote. Therefore, the technical problem that the appearance-based sight estimation method in the related art is not suitable for wearing glasses, is easily interfered by the lens, and causes errors in the sight estimation result is solved.

[0074] Figure 4 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device may include:

[0075] Memory 401 , processor 402 , and a computer program stored in the memory 401 and executable on the processor 402 .

[0076] When the processor 402 executes the program, the data-driven method for estimating the sight line when wearing glasses provided in the above embodiment is implemented.

[0077] Furthermore, the electronic device further comprises:

[0078] The communication interface 403 is used for communication between the memory 401 and the processor 402 .

[0079] The memory 401 is used to store computer programs that can be executed on the processor 402 .

[0080] The memory 401 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0081] If the memory 401, the processor 402 and the communication interface 403 are implemented independently, the communication interface 403, the memory 401 and the processor 402 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0082] Optionally, in a specific implementation, if the memory 401, the processor 402 and the communication interface 403 are integrated on a chip, the memory 401, the processor 402 and the communication interface 403 can communicate with each other through an internal interface.

[0083] The processor 402 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0084] This embodiment also provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the above data-driven method for estimating the line of sight when wearing glasses is implemented.

[0085] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.

[0086] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0087] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.

[0088] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or N wirings (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.

[0089] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0090] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.

[0091] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0092] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.

Claims

1. A data-driven method for estimating the line of sight when wearing glasses. It is characterized in that The following steps are involved: Detect whether the user meets the conditions for wearing glasses; When it is detected that the user meets the glasses wearing condition, obtaining the actual glasses degree of the user; Calculating a corresponding sight line error of wearing the glasses according to the actual glasses degree, and correcting the sight line estimation value of the user according to the sight line error of wearing the glasses to obtain an actual sight line estimation value of the user; The step of calculating the corresponding sight line error according to the actual glasses degree, and correcting the sight line estimation value of the user according to the sight line error to obtain the actual sight line estimation value of the user includes: obtaining the actual sight line estimation value corresponding to the actual glasses degree according to the mapping relationship between the glasses degree and the eye area image and the head posture based on a pre-built sight line estimation model; Among them, before obtaining the actual line of sight estimation value of the user, it also includes: obtaining images of the learning user wearing glasses and images of the user without glasses, and obtaining corresponding real labels of head posture, line of sight direction, and glasses degree, to generate a data set; based on the images with glasses and the images without glasses, facial images are cropped to obtain a first face eye area image and a second face eye area image, respectively; using the first face eye area image and the second face eye area image and the data set to obtain the mapping relationship.

2. The method according to claim 1, It is characterized in that Before correcting the user's line of sight estimation value according to the line of sight error of wearing glasses, the method further includes: Acquiring a current eye area image of the user; Obtain the actual head posture of the user.

3. The method according to claim 2, It is characterized in that Also includes: When it is detected that the user does not meet the glasses wearing condition, the actual sight line estimation value is calculated according to the current eye area image and the actual head posture.

4. A data-driven eye-line estimation device for wearing glasses, It is characterized in that include: A detection module is used to detect whether the user meets the conditions for wearing glasses; A degree acquisition module, used for acquiring the actual eyeglass degree of the user when it is detected that the user meets the glasses wearing condition; an estimation module, configured to calculate a corresponding sight line error when wearing glasses according to the actual glasses degree, and to correct a sight line estimation value of the user according to the sight line error when wearing glasses to obtain an actual sight line estimation value of the user; The estimation module is further used to obtain an actual sight line estimation value corresponding to the actual eyeglass degree based on a pre-built sight line estimation model and a mapping relationship between the eyeglass degree and the eye region image and the head posture; The generation module is used to obtain the images of the learning user wearing and not wearing glasses, and obtain the corresponding real labels of head posture, sight direction, and glasses degree to generate a data set; A cropping module, used for cropping the face image based on the image with glasses and the image without glasses, to obtain a first face eye region image and a second face eye region image respectively; A mapping module is used to obtain the mapping relationship by using the first face eye area image, the second face eye area image and the data set.

5. The device according to claim 4, It is characterized in that Also includes: A collection module, used for collecting the current eye area image of the user; The posture acquisition module is used to acquire the actual head posture of the user.

6. An electronic device, It is characterized in that include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the data-driven method for estimating line of sight when wearing glasses as described in any one of claims 1 to 3.

7. A computer-readable storage medium having a computer program stored thereon, It is characterized in that The program is executed by a processor to implement the data-driven method for estimating the line of sight when wearing glasses as described in any one of claims 1 to 3.