Sight line estimation method based on adversarial network and attention mechanism

Through a line of sight estimation method based on adversarial networks and attention mechanisms, and processing multi-channel features through feature fusion adversarial networks and cross-attention modules, the problem of accuracy decline in existing technologies in complex environments is solved and higher robustness is achieved. and line of sight estimation accuracy.

CN118629082AActive Publication Date: 2024-09-10CHONGQING UNIV OF POSTS & TELECOMM
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410723019.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-09-10
Estimated Expiration
2044-06-05

AI Technical Summary

Technical Problem

The accuracy of existing gaze estimation methods decreases in complex environments, especially when the face is slightly obscured or affected by shadows, and it is impossible to select highly reliable input features. Moreover, most networks only rely on a single input image and fail to fully extract gaze-related information.

Method used

A gaze estimation method based on adversarial networks and attention mechanisms is used to extract gaze-related features through the feature fusion adversarial network (FadNet), and weight distribution and fusion of multiple channel features are carried out through the cross-attention module to maximize the preservation of the input image. Line of sight estimation related features to enhance robustness.

Benefits of technology

In complex environments, especially outdoor natural environments, it can maintain high robustness and line of sight estimation accuracy, improve the accuracy and adaptability of line of sight estimation, and overcome the problem of poor generalization performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118629082A
    Figure CN118629082A
Patent Text Reader

Abstract

The invention requests to protect a sight line estimation method based on an adversarial network and an attention mechanism, the method estimates a sight line direction through a feature fusion adversarial network FadNet, and the FadNet comprises two parts of an extraction network and a fusion network. A confrontation module is introduced into the extraction network, and sight line estimation related features are extracted more accurately through a confrontation optimization method; the fusion network can fuse the features of a plurality of channels, and adaptively distributes the weight of each channel through an attention mechanism, thereby obtaining a more accurate line-of-sight direction. The method has better precision performance in unconstrained natural environment sight line estimation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the research field of line of sight estimation, and in particular to a line of sight estimation method based on an adversarial network and an attention mechanism. Background Art

[0002] Specifically, the definition of the line of sight estimation task is to accurately predict the three-dimensional direction vector of the line of sight based on the input image or video information, or directly determine the position of the gaze point on the two-dimensional plane. As an important branch of the field of computer vision, this task not only covers the essence of deep learning and image processing, but also integrates the advanced technology of machine learning. Therefore, it has far-reaching significance for both academic research and practical applications.

[0003] The extraction of sight information actually opens a window for us to gain insight into the psychological and physiological state of the target subject. By analyzing sight information, we can infer a variety of potential psychological states of the target subject, such as the distribution of attention, the process of cognitive behavior, etc. These in-depth analyses and understandings have further promoted the development of human-computer interaction technology, enabling us to interact with computers or other smart devices more naturally and efficiently. At the same time, sight information also plays a key role in many practical applications. For example, it can be used to detect whether the driver is in a state of fatigue driving, thereby ensuring driving safety; it can also assist doctors in diagnosing diseases and improve the accuracy and efficiency of diagnosis.

[0004] In principle, the methods for implementing line of sight estimation can be roughly divided into two categories: model-based methods and appearance-based methods. Among them, the appearance-based method directly uses RGB images or depth images as input, and directly outputs the direction of sight through a trained regression function. In recent years, with the rapid development of deep learning and neural network technology, the appearance-based method has achieved significant improvements in the accuracy of line of sight estimation. More importantly, this method also has the ability to maintain high accuracy under unconstrained conditions such as complex environments, such as changes in lighting conditions and large changes in head angles, which makes it have broader prospects and potential in practical applications. Therefore, appearance-based line of sight estimation methods have received more and more attention and research from researchers.

[0005] The inventor's prior application CN114898453A is a method for estimating sight lines based on a cooperative network, which includes the following steps: S1, preprocessing a face image, using the MTCNN algorithm to perform face detection and eye area positioning, and extracting eye feature information; S2, estimating head posture using a convolutional neural network based on spatial weights; S3, using both eyes and facial images as input to build a cooperative network CI-Net; S4, using the C-Net network to predict eye consistency through training; S5, using the predicted consistency to guide the inconsistency predicted by I-Net through a cross-attention module, thereby obtaining the sight line direction of both eyes.

[0006] This patent can improve the accuracy of line of sight estimation when the two eyes have different appearances or when the face is partially occluded by selectively using input features. However, this method selects relatively high-quality monocular images from both eyes and mainly relies on the extracted features to predict the line of sight direction, suppressing and discarding the rest of the image. There is a problem of insufficient extraction of line of sight related information. In addition, when the entire face is slightly occluded or affected by shadows at the same time, high-reliability input features cannot be selected. This method proposes an adversarial network for feature extraction. It does not mainly rely on a single eye or suppress poor-quality images. Instead, it first removes redundant features from multiple channels simultaneously, maximizes the retention of line of sight estimation related features in the input image, and then uses the attention module to weight and fuse multi-channel features. When low-quality images are input simultaneously from multiple channels in an outdoor natural environment, the present invention can still maintain a high level of robustness. Summary of the invention

[0007] The present invention aims to solve the above problems of the prior art. A line of sight estimation method based on adversarial network and attention mechanism is proposed. The technical solution of the present invention is as follows:

[0008] A line of sight estimation method based on an adversarial network and an attention mechanism comprises the following steps:

[0009] S1. Send the facial image information to the feature fusion adversarial network FadNet, which consists of two parts: the extraction network and the fusion network. The extraction network uses the adversarial optimization method to more accurately extract the features related to line of sight estimation, and the fusion network fuses the features of multiple channels to obtain a more accurate line of sight direction.

[0010] S2. In the extraction network, EyeCNN is used to extract features of both eyes, and FaceCNN is used to extract features of the face to obtain preliminary features of both eyes and preliminary features of the face;

[0011] S3, sending the preliminary features of both eyes and the preliminary features of the face to the adversarial module, and processing them into secondary features by the adversarial module;

[0012] S4. Send the obtained secondary features into the fusion network. The fusion network combines the three features through the cross attention module and obtains the final gaze direction.

[0013] Furthermore, in step S2, EyeCNN is used in the extraction network to extract features of both eyes, and FaceCNN is used to extract features of the facial features to obtain preliminary features of both eyes and preliminary features of the facial features, as follows:

[0014] In the extraction network, FaceCNN and EyeCNN extract preliminary features of the face and eyes respectively. In order to obtain a larger receptive field, the two CNNs add dilated convolutions to the basic network of VGG-Net; the dilated convolution output feature v is expressed by the following formula:

[0015]

[0016] Where N×M×K is the convolution kernel size, u(x,y) represents the element on the input feature map, m and n represent the position in the convolution kernel, k represents the input channel, w and b are the weight and bias values ​​respectively, and (r1,r2) is the expansion rate of the network. Dilated convolution is used in both FaceCNN and EyeCNN networks to improve the multi-channel architecture. The template images of the two networks are set to 64×64, and FaceCNN uses a higher expansion rate in the dilated convolution layer.

[0017] Furthermore, the step S3 sends the preliminary features of the face and eyes to the adversarial module, which are processed by the adversarial module to become secondary features, as follows:

[0018] The feature optimization is indirectly achieved using two adversarial loss functions. The adversarial module consists of a gaze estimator Dg(x; θ g ) and an appearance estimator Da(x;θ a );The adversarial module uses the sight line estimator Dg(·) and the appearance classifier Da(·) to optimize the feature extractor parameters so that it can obtain more robust features x` and use x` for final sight line estimation; Specifically, the sight line estimator and the appearance classifier have their own optimization goals, and both control their own parameters while counteracting the adverse effects of parameter changes caused by the other party; The optimization is implicitly achieved through the adversarial loss function;

[0019] The gaze estimator Dg(·) directly regresses the gaze direction and constructs a loss function based on the difference with the true gaze direction. Its purpose is to estimate the gaze direction more accurately. The loss function is:

[0020]

[0021] where yi Represents the pitch and yaw angles of the real value in 3D space, x i represents the initial features extracted from the dilated convolutional network, f is the learned feature representation, and E f The parameter is θ f The feature extractor D g The parameter is θ g The gaze estimator of t ′ is the number of test samples.

[0022] The appearance classifier Da(·) obtains a probability t between 0 and 1, which characterizes the possibility that the input comes from the training domain, and the loss function is:

[0023]

[0024] The appearance classification loss function is defined in the form of binary cross entropy, where Da(x; θ a ) is the parameter θ a The output of the appearance classifier is a scalar probability t, which indicates the probability that the input comes from the source domain, n t Indicates the number of test samples, n s Represents the number of source domain samples. When the output probability of the classifier is close to 0.5, it means that the feature distribution p is completely indistinguishable. x and the source domain distribution p data , the appearance classifier reaches the global optimal solution;

[0025] In order to make the extracted features more accurate in estimating the line of sight and difficult to distinguish the type of environment, the loss functions of the two components are combined to obtain a joint loss function:

[0026]

[0027] where λ a is a positive balancing factor; denote the loss functions of the gaze estimator Dg(·) and the appearance classifier Da(·), respectively.

[0028] Since the optimization objectives of the above two loss functions are different, they actually form an adversarial optimization relationship and together constitute an adversarial module.

[0029] Furthermore, the step S4 sends the obtained secondary features to the fusion network, and the fusion network combines the three features through the cross attention module and obtains the final sight direction, as follows:

[0030] The function of the cross-attention module is to assign different weights to the input features according to their reliability. First, the features of both eyes pass through the self-attention sublayer respectively, then the facial features are fused through the residual connection, and finally the cross-attention operation is performed between the features of both eyes. The cross-attention module can assign weights to the eye features and facial features, and selectively enhance and suppress the input features. The cross-attention module is based on the Decoder and is improved on this basis for the gaze estimation task. Overall, it is coupled by two feature fusion Decoders, each of which includes three sublayers, namely the self-attention sublayer, the cross-attention sublayer, and the fully connected sublayer. Facial features are added to the self-attention sublayer, and the query values ​​of both eyes are exchanged in the cross-attention sublayer.

[0031] The attention function is the process of mapping the input query, key and value to the output. The weight of each value is obtained by processing its query and key through dot product, division by dimension parameter and softmax function. For two cross attention modules, the corresponding eye feature is used as key and value, and the other eye feature is used as query.

[0032] Furthermore, for the two cross attention modules, the corresponding eye features are used as Key and Value, and the other eye feature is used as Query, and the formula is as follows:

[0033]

[0034]

[0035] Where K l , K r The key vectors representing the left and right eye features, V l 、V r The Value vectors representing the left and right eye features, d k K l , K r The vector dimension of , softmax(·) means it is processed by the softmax function.

[0036] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, a line of sight estimation method based on an adversarial network and an attention mechanism as described in any one of the items is implemented.

[0037] A non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements a line of sight estimation method based on an adversarial network and an attention mechanism as described in any one of the above.

[0038] The advantages and beneficial effects of the present invention are as follows:

[0039] The emergence of deep learning networks represented by convolutional neural networks (CNN) has made it possible to estimate line of sight only through input images, and as the number of network layers gradually increases, CNN can extract more abstract high-level features, further improving the accuracy of line of sight estimation. However, in line of sight estimation based on deep learning, the models trained with a large amount of data usually have poor generalization performance, and the overfitting phenomenon of the model is a major challenge that restricts its scope of application. When faced with new environments that have not been trained or new individuals that have not been seen, the prediction accuracy of the network will be significantly reduced compared to the training environment. At present, researchers usually improve adaptability through methods such as fast calibration, but the effect is still not ideal.

[0040] After analysis, it was found that there are two main reasons that restrict the generalization of the model. The first is that the invalid features related to the specific environment in all features cannot be removed. The ideal network should more accurately obtain the factors related to the line of sight in the input image. However, environmental related features such as lighting conditions and background environment, and subject related features such as the appearance of the subject will lead to a decrease in accuracy when changing the usage scene. Secondly, most networks currently use only a single input, such as an eye image or a facial image, or simply connect the two, and fail to reasonably fuse the extracted multiple features. Studies have shown that multi-feature fusion is beneficial to improving network robustness. Therefore, the present invention proposes a feature fusion adversarial network (FadNet) to better extract effective features to remove environmental factors, and organically fuse multiple features of the face and eyes to achieve better line of sight estimation effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is an overall architecture diagram of a feature fusion adversarial network provided by a preferred embodiment of the present invention;

[0042] Figure 2 It is a structural diagram of the adversarial module in the extraction network provided by the preferred embodiment of the present invention;

[0043] Figure 3 This is a structural diagram of the cross-attention module in the fusion network provided by the preferred embodiment of the present invention. DETAILED DESCRIPTION

[0044] The following will describe the technical solutions in the embodiments of the present invention in detail in conjunction with the accompanying drawings in the embodiments of the present invention. The described embodiments are only part of the embodiments of the present invention.

[0045] The technical solution of the present invention to solve the above technical problems is:

[0046] A line of sight estimation method based on an adversarial network and an attention mechanism comprises the following steps:

[0047] S1, sending the facial image information into the feature fusion adversarial network FadNet, which consists of two parts: the extraction network and the fusion network;

[0048] S2, using EyeCNN and FaceCNN in the extraction network to extract facial features and binocular features to obtain preliminary features;

[0049] S3, sending the preliminary features of the face and eyes to the adversarial module, and processing them into secondary features;

[0050] S4. Send the obtained secondary features into the fusion network. The fusion network combines the three features through the cross attention module and obtains the final gaze direction.

[0051] 2. According to the method for line of sight estimation based on adversarial network and attention mechanism in claim 1, it is characterized in that in step S2, EyeCNN and FaceCNN are used in the extraction network to extract facial features and binocular features to obtain preliminary features, which are as follows:

[0052] In the extraction network, FaceCNN and EyeCNN extract the preliminary features of the face and eyes respectively. In order to obtain a larger receptive field, the two CNNs add dilated convolutions to the basic network of VGG-Net. Common methods to increase the receptive field include increasing the step size and using pooling layers, but their disadvantages are that they also reduce the resolution of the feature map, which will have a significant adverse effect on the regression task of line of sight estimation. Dilated convolution can ensure spatial resolution and keep the number of parameters from increasing significantly. Its output feature v can be expressed by the following formula:

[0053]

[0054] Where N×M×K is the convolution kernel size, w and b are weight and bias values, respectively, and (r1, r2) is the network expansion rate. Dilated convolution is used in both FaceCNN and EyeCNN networks to improve the multi-channel architecture. The template image of both networks is set to 64×64. The backbone network is as follows Figure 3 As shown in Figure 2, FaceCNN uses a higher dilation rate in the dilated convolutional layer.

[0055] 3. According to the method for line of sight estimation based on adversarial network and attention mechanism in claim 1, it is characterized in that in step S3, the preliminary features of the face and eyes are sent to the adversarial module, and the preliminary features are processed by the adversarial module into secondary features, which are as follows:

[0056] In traditional supervised learning, the feature x is obtained from the input image p dataThe goal of supervised learning is to reversely optimize the loss function to obtain the feature x that minimizes the error. This paper uses two opposing loss functions to indirectly optimize the features, such as Figure 2 As shown, the adversarial module consists of a gaze estimator Dg(x; θ g ) and an appearance estimator Da(x;θ a ). The adversarial module does not directly use the feature x to estimate the gaze direction, but uses the gaze estimator Dg(·) and the appearance classifier Da(·) to optimize the feature extractor parameters, so that it can obtain more robust features x`, and use x` for the final gaze estimation. Specifically, the gaze estimator and the appearance classifier have their own optimization goals. While controlling their own parameters, they must counter the adverse effects of parameter changes caused by each other. The optimization is implicitly achieved through the adversarial loss function.

[0057] The gaze estimator Dg(·) directly regresses the gaze direction and constructs a loss function based on the difference with the true gaze direction, with the aim of estimating the gaze direction more accurately. The loss function is:

[0058]

[0059] Where y represents the pitch and yaw angles of the true value in 3D space. f is the learned feature representation, E f The parameter is θ f The feature extractor, E g The parameter is θ g The gaze estimator.

[0060] The appearance classifier Da(·) obtains a probability t between 0 and 1, which characterizes the possibility that the input comes from the training domain, and the loss function is:

[0061]

[0062] The appearance classification loss function is defined in the form of binary cross entropy, where Da(x; θ a ) is the parameter θ a The output of the appearance classifier is a scalar probability t, which indicates the probability that the input comes from the source domain. When the output probability of the classifier is close to 0.5, it means that the feature distribution p is completely indistinguishable. x and the source domain distribution p data , the appearance classifier reaches the global optimal solution.

[0063] In order to make the extracted features more accurate in estimating the line of sight and difficult to distinguish the type of environment, the loss functions of the two components are combined to obtain a joint loss function:

[0064]

[0065] where λ a is a positive balancing factor.

[0066] Since the optimization objectives of the above two loss functions are different, they actually form an adversarial optimization relationship and together constitute an adversarial module.

[0067] 4. According to the method for line of sight estimation based on adversarial network and attention mechanism in claim 1, it is characterized in that in step S4, the obtained secondary features are sent to the fusion network, and the fusion network combines the three features through the cross attention module to obtain the final line of sight direction, which is as follows:

[0068] In practical applications, due to the influence of facial angles and other factors, the features of both eyes are usually quite different. The role of the cross-attention module is to assign different weights to the input features according to their reliability. First, the features of both eyes pass through the self-attention sublayer respectively, then the facial features are fused through the residual connection, and finally the cross-attention operation is performed between the features of both eyes. It has been verified that the cross-attention module can assign weights to eye features and facial features, and selectively enhance and suppress input features. The Transformer architecture is a new network architecture suitable for computer vision tasks. Researchers have proved that integrating pure Transformer with traditional CNN can achieve advanced performance. The cross-attention module of this method is based on Decoder and is improved on this basis for the line of sight estimation task. On the whole, it is coupled by two feature fusion Decoders, each of which includes three sublayers, namely self-attention sublayer, cross-attention sublayer, and fully connected sublayer. This paper adds facial features to the self-attention sublayer, and exchanges the query values ​​of both eyes in the cross-attention sublayer. The entire cross-attention module is shown in the attached figure. Figure 3 shown.

[0069] The attention function is the process of mapping the input query, key and value to the output. The weight of each value is obtained by processing its query and key through dot product, division by dimension parameter and softmax function. For two cross attention modules, this paper uses the corresponding eye feature as key and value, and the other eye feature as query. The formula is as follows:

[0070]

[0071]

[0072] Where K l , K r The key vectors representing the left and right eye features, V l 、V rThe Value vectors representing the left and right eye features, d k K l , K r The vector dimension of , softmax(·) means it is processed by the softmax function.

[0073] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0074] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0075] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0076] The above embodiments should be understood to be only used to illustrate the present invention and not to limit the protection scope of the present invention. After reading the contents of the present invention, technicians can make various changes or modifications to the present invention, and these equivalent changes and modifications also fall within the scope defined by the claims of the present invention.

Claims

1. A line of sight estimation method based on adversarial network and attention mechanism, characterized in that: The following steps are involved: S1. Send the facial image information to the feature fusion adversarial network FadNet, which consists of two parts: the extraction network and the fusion network. The extraction network uses the adversarial optimization method to more accurately extract the features related to line of sight estimation, and the fusion network fuses the features of multiple channels to obtain a more accurate line of sight direction. S2. In the extraction network, EyeCNN is used to extract features of both eyes, and FaceCNN is used to extract features of the face to obtain preliminary features of both eyes and preliminary features of the face; S3, sending the preliminary features of both eyes and the preliminary features of the face to the adversarial module, and processing them into secondary features by the adversarial module; S4. Send the obtained secondary features into the fusion network. The fusion network combines the three features through the cross attention module and obtains the final gaze direction.

2. According to claim 1, a line of sight estimation method based on adversarial network and attention mechanism is characterized in that: In step S2, EyeCNN is used in the extraction network to extract features from both eyes, and FaceCNN is used to extract features from facial features to obtain preliminary features of both eyes and facial features, as follows: In the extraction network, FaceCNN and EyeCNN extract preliminary features of the face and eyes respectively. In order to obtain a larger receptive field, the two CNNs add dilated convolutions to the basic network of VGG-Net; the dilated convolution output feature v is expressed by the following formula: Where N×M×K is the convolution kernel size, u(x,y) represents the element on the input feature map, m and n represent the position in the convolution kernel, k represents the input channel, w and b are the weight and bias values ​​respectively, and (r1,r2) is the expansion rate of the network. Dilated convolution is used in both FaceCNN and EyeCNN networks to improve the multi-channel architecture. The template images of the two networks are set to 64×64, and FaceCNN uses a higher expansion rate in the dilated convolution layer.

3. The line of sight estimation method based on adversarial network and attention mechanism according to claim 1, characterized in that: The step S3 sends the preliminary features of the face and eyes to the adversarial module, which are processed into secondary features as follows: The feature optimization is indirectly achieved using two adversarial loss functions. The adversarial module consists of a gaze estimator Dg(x; θ g ) and an appearance estimator Da(x;θ a );The adversarial module uses the sight line estimator Dg(·) and the appearance classifier Da(·) to optimize the feature extractor parameters so that it can obtain more robust features x` and use x` for final sight line estimation; Specifically, the sight line estimator and the appearance classifier have their own optimization goals, and both control their own parameters while counteracting the adverse effects of parameter changes caused by the other party; The optimization is implicitly achieved through the adversarial loss function; The gaze estimator Dg(·) directly regresses the gaze direction and constructs a loss function based on the difference with the true gaze direction. Its purpose is to estimate the gaze direction more accurately. The loss function is: where y i Represents the pitch and yaw angles of the real value in 3D space, x i represents the initial features extracted from the dilated convolutional network, f is the learned feature representation, and E f The parameter is θ f The feature extractor D g The parameter is θ g The gaze estimator of t ′ is the number of test samples; The appearance classifier Da(·) obtains a probability t between 0 and 1, which characterizes the possibility that the input comes from the training domain, and the loss function is: The appearance classification loss function is defined in the form of binary cross entropy, where Da(x; θ a ) is the parameter θ a The output of the appearance classifier is a scalar probability t, which indicates the probability that the input comes from the source domain, n t Indicates the number of test samples, n s Represents the number of source domain samples; when the output probability of the classifier is close to 0.5, it means that the feature distribution p is completely indistinguishable x and the source domain distribution p data , the appearance classifier reaches the global optimal solution; In order to make the extracted features more accurate in estimating the line of sight and difficult to distinguish the type of environment, the loss functions of the two components are combined to obtain a joint loss function: where λ a is a positive balancing factor; denote the loss functions of the gaze estimator Dg(·) and the appearance classifier Da(·), respectively; Since the optimization objectives of the above two loss functions are different, they actually form an adversarial optimization relationship and together constitute an adversarial module.

4. The line of sight estimation method based on adversarial network and attention mechanism according to claim 1, characterized in that: The step S4 sends the obtained secondary features to the fusion network, and the fusion network combines the three features through the cross attention module to obtain the final sight direction, which is as follows: The function of the cross-attention module is to assign different weights to the input features according to their reliability. First, the features of both eyes pass through the self-attention sublayer respectively, then the facial features are fused through the residual connection, and finally the cross-attention operation is performed between the features of both eyes. The cross-attention module can assign weights to eye features and facial features, and selectively enhance or suppress input features. The cross-attention module is based on the decoder and is improved for the gaze estimation task. It is generally coupled by two feature fusion decoders, each of which includes three sublayers: self-attention sublayer, cross-attention sublayer, and fully connected sublayer. Facial features are added to the self-attention sublayer, and the query values ​​of both eyes are exchanged in the cross-attention sublayer. The attention function is the process of mapping the input query, key and value to the output. The weight of each value is obtained by processing its query and key through dot product, division by dimension parameter and softmax function. For the two cross attention modules, the corresponding eye features are used as the key and value, and the other eye feature is used as the query.

5. The line of sight estimation method based on adversarial network and attention mechanism according to claim 4, characterized in that: For the two cross attention modules, the corresponding eye features are used as Key and Value, and the other eye feature is used as Query. The formula is as follows: Where K l , K r The key vectors representing the left and right eye features, V l 、V r The Value vectors representing the left and right eye features, d k K l , K r The vector dimension of , softmax(·) means it is processed by the softmax function.

6. An electronic device, characterized in that: It includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the line of sight estimation method based on the adversarial network and the attention mechanism as described in any one of claims 1 to 5 is implemented.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the line of sight estimation method based on an adversarial network and an attention mechanism is implemented.

Citation Information

Patent Citations

  • Line-of-sight estimation method based on cooperation network

    CN114898453A

  • Human body posture estimation method based on attention and adversarial network, medium and equipment

    CN116434272A

  • Driver cognitive distraction detection method and system based on driver eye movement information

    CN117257308A

  • Sight line estimation method and device based on improved face feature extraction

    CN117809353A

  • A neural network for head pose and gaze estimation using photorealistic synthetic data

    WO2020231401A1