WO2023071882A1 - Human eye gaze detection method, control method and related device - Google Patents

Human eye gaze detection method, control method and related device Download PDF

Info

Publication number
WO2023071882A1
WO2023071882A1 PCT/CN2022/126122 CN2022126122W WO2023071882A1 WO 2023071882 A1 WO2023071882 A1 WO 2023071882A1 CN 2022126122 W CN2022126122 W CN 2022126122W WO 2023071882 A1 WO2023071882 A1 WO 2023071882A1
Authority
WO
WIPO (PCT)
Prior art keywords
human eye
image
human
information
gaze
Prior art date
Application number
PCT/CN2022/126122
Other languages
French (fr)
Chinese (zh)
Inventor
龚章泉
Original Assignee
Oppo广东移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2023071882A1 publication Critical patent/WO2023071882A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting

Definitions

  • the present application relates to the technical field of consumer electronics products, and in particular to a human eye gaze detection method, a method for controlling electronic equipment through human eyes, a detection device, a control device, electronic equipment, and a non-volatile computer-readable storage medium.
  • electronic devices can estimate a user's gaze point by collecting face images.
  • the present application provides a human eye gaze detection method, a method for controlling electronic equipment through human eyes, a detection device, a control device, electronic equipment and a non-volatile computer-readable storage medium.
  • the human eye gaze detection method in one embodiment of the present application includes acquiring an image of the human eye area; determining the weight of the image of the human eye area according to the missing information of the image of the human eye area; The weight of the eye area image determines the gaze information of the human eye.
  • a detection device includes a first acquisition module, a first determination module, and a second determination module.
  • the first acquisition module is used to acquire the human eye area image;
  • the first determination module is used to determine the weight of the human eye area image according to the missing information of the human eye area image;
  • the second determination module uses The human eye gaze information is determined according to the human eye area image and the weight of the human eye area image.
  • An electronic device includes a processor, and the processor is configured to execute a human gaze detection method.
  • the human eye gaze detection method includes acquiring a human eye area image; determining the weight of the human eye area image according to missing information of the human eye area image; Weight, which determines the gaze information of the human eye.
  • the human eye gaze detection method includes acquiring a human face image; determining the human eye area image and human face pose information according to the human face image; The weight of the eye area image; according to the human eye area image and the weight of the human eye area image, determine the human eye feature information; according to the human eye feature information and the human face posture information, determine the human eye gaze information.
  • the detection device in another embodiment of the present application includes a first acquisition module, a first determination module, a second determination module, a third determination module and a fourth determination module.
  • the first acquiring module is used to acquire a human face image;
  • the first determining module is used to determine the human eye region image and facial posture information according to the human face image;
  • the second determining module is used to determine the human face image according to the human face
  • the missing information of the eye area image determines the weight of the human eye area image;
  • the third determining module is used to determine the human eye feature information according to the human eye area image and the weight of the human eye area image;
  • the fourth determination module is configured to determine human eye gaze information according to the human eye feature information and the human facial posture information.
  • An electronic device includes a processor, and the processor is configured to execute a human gaze detection method.
  • the human eye gaze detection method includes acquiring a human face image; determining the human eye area image and human face posture information according to the human face image; determining the weight of the human eye area image according to the missing information of the human eye area image ; determining human eye feature information according to the human eye area image and the weight of the human eye area image; determining human eye gaze information according to the human eye feature information and the human face posture information.
  • the method for controlling an electronic device through human eyes includes acquiring an image of a human eye area; determining human eye gaze information according to the weight of the human eye area image and the human eye area image, wherein the human eye The weight of the area image is determined according to the missing information of the human eye area image; and the electronic device is controlled according to the human eye gaze information.
  • the control device in the embodiment of the present application includes a first acquisition module, a first determination module and a control module.
  • the first acquiring module is used to acquire an image of the human eye area;
  • the first determination module is used to determine the gaze information of the human eye according to the weight of the image of the human eye area and the image of the human eye area, wherein the human eye
  • the weight of the eye area image is determined according to the missing information of the human eye area image;
  • the control module is used to control the electronic device according to the human eye gaze information.
  • An electronic device in still another embodiment of the present application includes a processor, and the processor is configured to execute a method for controlling the electronic device through human eyes.
  • the method for controlling an electronic device through human eyes includes acquiring an image of a human eye region; determining human eye gaze information according to the weight of the human eye region image and the human eye region image, wherein the weight of the human eye region image determining according to the missing information of the human eye area image; and controlling the electronic device according to the human eye gaze information.
  • the processors execute the human eye gaze detection method or pass the human eye gaze detection method.
  • the human eye gaze detection method includes acquiring a human eye area image; determining the weight of the human eye area image according to missing information of the human eye area image; Weight, which determines the gaze information of the human eye.
  • the method for controlling an electronic device with human eyes includes acquiring an image of a human eye region; determining human eye gaze information according to the weight of the human eye region image and the human eye region image, wherein the weight of the human eye region image is based on Determining missing information of the human eye area image; and controlling the electronic device according to the human eye gaze information.
  • FIG. 1 is a schematic flow diagram of a human eye gaze detection method in some embodiments of the present application
  • FIG. 2 is a block diagram of a detection device in some embodiments of the present application.
  • FIG. 3 is a schematic plan view of an electronic device in some embodiments of the present application.
  • Fig. 4 is a schematic diagram of connection between an electronic device and a cloud server in some embodiments of the present application
  • 5 to 8 are schematic flowcharts of the human eye gaze detection method in some embodiments of the present application.
  • FIG. 9 is a schematic structural diagram of a human eye detection model in some embodiments of the present application.
  • Fig. 10 is a schematic flow chart of a human eye gaze detection method in some embodiments of the present application.
  • Figure 11 is a block diagram of a detection device in some embodiments of the present application.
  • Fig. 12 is a schematic flow chart of a human eye gaze detection method in some embodiments of the present application.
  • Fig. 13 is a schematic flowchart of a method for controlling an electronic device through human eyes in some embodiments of the present application
  • Fig. 14 is a block diagram of a control device in some embodiments of the present application.
  • 15 to 18 are schematic diagrams of scenarios of a method for controlling an electronic device through human eyes in some embodiments of the present application.
  • 19 to 23 are schematic flowcharts of a method for controlling an electronic device through human eyes in some embodiments of the present application.
  • FIG. 24 and FIG. 25 are schematic diagrams of scenes of a method for controlling an electronic device through human eyes in some embodiments of the present application.
  • Fig. 26 is a schematic flowchart of a method for controlling an electronic device through human eyes in some embodiments of the present application.
  • Fig. 27 is a schematic flowchart of a training method of a human eye detection model in some embodiments of the present application.
  • Figure 28 is a schematic block diagram of a training device according to some embodiments of the present application.
  • Fig. 29 is a schematic diagram of connection between a processor and a computer-readable storage medium in some embodiments of the present application.
  • the human eye gaze detection method of the present application includes obtaining the human eye area image; determining the weight of the human eye area image according to the missing information of the human eye area image; determining the human eye gaze information according to the human eye area image and the weight of the human eye area image .
  • the human eye gaze detection method also includes: acquiring face posture information; determining the human eye gaze information according to the human eye area image and the weight of the human eye area image, including: according to the human face posture information, human eye The weight of the area image and the human eye area image determines the gaze information of the human eye.
  • the human eye area image includes a left eye area image and a right eye area image
  • determining the weight of the human eye area image according to the missing information of the human eye area image includes: according to the first missing information of the left eye area image The information determines the first weight of the image of the left eye area, and the second weight of the image of the right eye area is determined according to the second missing information of the image of the right eye area.
  • the human eye gaze detection method also includes: acquiring a face image, and the face image includes a face mask; calculating the position information of the face relative to the electronic device according to the face mask; according to the human eye area image and The weight of the human eye region image determines the human eye gaze information, including: determining the human eye gaze information according to the position information, the human eye region image, and the weight of the human eye region image.
  • the human eye gaze detection method also includes: obtaining a training sample set, the training sample set includes a plurality of human eye area images; determining the occlusion area and/or image offset parameters according to the human eye area images; Image, occlusion area, and image offset parameters to train the human eye detection model; according to the weight of the human eye area image and the human eye area image, determine the human eye gaze information, including: based on the human eye detection model, according to the human eye area image and the human eye area image The weight of the eye area image determines the gaze information of the human eye.
  • training the human eye detection model according to the human eye area image, the occlusion area, and the image offset parameters includes: inputting the human eye area image, the occlusion area, and the image offset parameters into the human eye detection model to output Training coordinates; based on the preset loss function, calculate the loss value according to the preset coordinates corresponding to the human eye area image and the training coordinates; adjust the human eye detection model according to the loss value until the human eye detection model converges.
  • the occlusion area is generated based on replacing at least a part of the pixels in the image of the human eye area with pixels of predetermined pixel values; the image offset parameter is generated based on image offset of the feature points of the human eye area in the image of the human eye area .
  • the human eye gaze detection method of the present application includes obtaining a human face image; determining the human eye area image and human face posture information according to the human face image; determining the weight of the human eye area image according to the missing information of the human eye area image; The weight of the image and the image of the human eye area determines the characteristic information of the human eye; according to the characteristic information of the human eye and the posture information of the human face, the gaze information of the human eye is determined.
  • the face image includes a face mask
  • determining the gaze information of the human eye according to the feature information of the human eye and the posture information of the human face includes: calculating the position information of the human face relative to the electronic device according to the face mask; According to position information, human eye feature information, and human face posture information, human eye gaze information is determined.
  • the method for controlling an electronic device through human eyes of the present application includes acquiring an image of a human eye region; determining human eye gaze information according to the weight of the human eye region image Determining the missing information of ; and controlling electronic equipment according to the gaze information of human eyes.
  • the method for controlling an electronic device through human eyes further includes: obtaining face posture information; determining human eye gaze information according to the human eye area image and the weight of the human eye area image, including: according to the human face posture information , the human eye area image, and the weight of the human eye area image to determine the gaze information of the human eye.
  • the human eye area image includes a left eye area image and a right eye area image
  • the first weight of the left eye area image is determined according to the first missing information of the left eye area image
  • the second weight of the right eye area image Determined according to the second missing information of the right-eye region image.
  • the method for controlling an electronic device through human eyes further includes: acquiring a face image, and the face image includes a face mask; calculating the position information of the face relative to the electronic device according to the face mask; The weight of the area image and the human eye area image determines the human eye gaze information, including: determining the human eye gaze information according to the position information, the human eye area image, and the weight of the human eye area image.
  • the method for controlling an electronic device through human eyes further includes: obtaining a training sample set, the training sample set includes a plurality of human eye area images; determining the occlusion area and/or image offset parameters according to the human eye area images; Human eye area image, occlusion area, and image offset parameters train the human eye detection model; according to the human eye area image and the weight of the human eye area image, determine the human eye gaze information, including: based on the human eye detection model, according to the human eye area The weight of the image and the image of the human eye area determines the gaze information of the human eye.
  • training the human eye detection model according to the human eye area image, the occlusion area, and the image offset parameters includes: inputting the human eye area image, the occlusion area, and the image offset parameters into the human eye detection model to output Training coordinates; based on the preset loss function, calculate the loss value according to the preset coordinates corresponding to the human eye area image and the training coordinates; adjust the human eye detection model according to the loss value until the human eye detection model converges.
  • the occlusion area is generated based on replacing at least a part of the pixels in the image of the human eye area with pixels of predetermined pixel values; the image offset parameter is generated based on image offset of the feature points of the human eye area in the image of the human eye area .
  • the gaze information of the human eye includes the coordinates of the gaze point.
  • the method of controlling the electronic device through the human eye further includes: acquiring the captured image within the first predetermined time period before the screen is off. ; in response to a human face being included in the photographed image; controlling the electronic device according to the gaze information of the human eyes, further comprising, in response to the gaze point coordinates being located in the display area of the display screen, continuing to brighten the screen for a second predetermined duration.
  • the display area is associated with a preset coordinate range
  • the method for controlling an electronic device through human eyes further includes: when the gaze point coordinates are within the preset coordinate range, determining that the gaze point coordinates are located in the display area.
  • the method for controlling the electronic device through the human eye further includes: acquiring the captured image in response to the fact that the electronic device does not receive an input operation; controlling the electronic device according to the gaze information of the human eye
  • the device includes: adjusting the display brightness of the display screen to a first predetermined brightness in response to the captured image containing a human face and the gaze point coordinates are located in the display area; in response to the captured image not containing a human face, or the captured image containing a human face and The gaze point coordinates are located outside the display area, and the display brightness is adjusted to a second predetermined brightness, and the second predetermined brightness is smaller than the first predetermined brightness.
  • the detection device of the present application includes a first acquisition module, a first determination module and a second determination module.
  • the first acquisition module is used to acquire the image of the human eye region;
  • the first determination module is used to determine the weight of the human eye region image according to the missing information of the human eye region image;
  • the second determination module is used to determine the weight of the human eye region image according to the human eye region image and
  • the weight of the image of the human eye area determines the gaze information of the human eye.
  • the detection device of the present application includes a first acquisition module, a first determination module, a second determination module, a third determination module and a fourth determination module.
  • the first acquisition module is used to acquire the image of the human eye region;
  • the first determination module is used to determine the image of the human eye region and the facial posture information according to the face image;
  • the second determination module is used to determine the missing information of the human eye region image , to determine the weight of the human eye area image;
  • the third determination module is used to determine the human eye feature information according to the human eye area image and the weight of the human eye area image;
  • the fourth determination module is used to determine the human eye feature information according to the human eye feature information and the face Posture information, to determine the gaze information of human eyes.
  • the control device of the present application includes a first acquisition module, a first determination module and a control module.
  • the first acquisition module is used to acquire the human eye area image;
  • the first determination module is used to determine the human eye gaze information according to the human eye area image and the weight of the human eye area image, wherein the weight of the human eye area image is based on the human eye area The missing information of the image is determined; and
  • the control module is used to control the electronic equipment according to the gaze information of human eyes.
  • the electronic device of the present application includes a processor, and the processor is configured to execute the human gaze detection method in any one of the foregoing implementation manners.
  • the electronic device of the present application includes a processor, and the processor is configured to execute the method for controlling an electronic device through human eyes in any one of the foregoing implementation manners.
  • the non-transitory computer-readable storage medium of the present application includes a computer program.
  • the processor executes the human eye gaze detection method of any of the above embodiments; or the method of controlling an electronic device through human eyes of any of the above embodiments.
  • the human eye fixation detection method of the embodiment of the present application comprises the following steps:
  • 015 According to the weight of the human eye area image and the human eye area image, determine the human eye gaze information.
  • the detection device 10 in the embodiment of the present application includes a first acquisition module 11 , a first determination module 12 and a second determination module 13 .
  • the first acquiring module 11 is used to acquire the human eye region image;
  • the first determining module 12 is used to determine the weight of the human eye region image according to the missing information of the human eye region image;
  • the second determining module 13 is used to determine the weight of the human eye region image according to the human eye region image and
  • the weight of the image of the human eye area determines the gaze information of the human eye. That is to say, step 011 can be implemented by the first acquisition module 11 , step 013 can be performed by the first determination module 12 and step 015 can be performed by the second determination module 13 .
  • the electronic device 100 in the embodiment of the present application includes a processor 60 and a collection device 30 .
  • Acquisition device 30 is used for collecting face information by predetermined frame rate (face information comprises people's face image, as the visible light image of people's face, infrared image, depth image etc.);
  • Acquisition device 30 can be visible light camera, infrared camera, depth camera One or more of them, wherein the visible light camera can collect visible light face images, the infrared camera can collect infrared face images, and the depth camera can collect depth face images.
  • the collection device 30 includes a visible light camera, an infrared face image camera and depth camera, the acquisition device 30 simultaneously visible light face image, infrared face image and depth face image.
  • the processor 60 may include an image processor (Image Signal Processor, ISP), a neural network processor (Neural-Network Processing Unit, NPU) and an application processor (Application Processor, AP), and the detection device 10 is arranged in the electronic device 100,
  • the first acquisition module 11 can be arranged in the ISP, and the processor 60 is connected to the acquisition device 30.
  • the ISP can process the face image to obtain the human eye area image
  • the first The determination module 12 can also be set at the ISP
  • the second determination module 13 can be set at the NPU.
  • the processor 60 (specifically, it can be an ISP) is used to determine the weight of the human eye region image according to the missing information of the human eye region image; the processor 60 (specifically, it can be an NPU) is also used to The weight of is used to determine the gaze information of human eyes. That is to say, step 011 can be executed by the collection device 30 in cooperation with the processor 60 , and steps 013 and 015 can be executed by the processor 60 .
  • the electronic device 100 may be a mobile phone, a smart watch, a tablet computer, a display device, a notebook computer, a teller machine, a gate, a head-mounted display device, a game machine, and the like. As shown in FIG. 3 , the embodiment of the present application is described by taking the electronic device 100 as a mobile phone as an example. It can be understood that the specific form of the electronic device 100 is not limited to the mobile phone.
  • the collection device 30 can collect the user's face information once at a predetermined time interval, and continue to perform gaze detection on the user while ensuring that the power consumption of the electronic device 100 is small, or, when the user When using applications that require gaze detection (such as browser software, post bar software, video software, etc.), collect face information according to a predetermined number of frames (such as 10 frames per second), so that human face information is only performed when there is a gaze detection requirement. Face information collection minimizes the power consumption of gaze detection.
  • applications that require gaze detection such as browser software, post bar software, video software, etc.
  • the processor 60 can identify the face image, for example, the processor 60 can compare the face image with the preset face template , so as to determine the image area where the face in the face image and different parts of the face (such as eyes, nose, etc.) are located, to identify the eye area in the face image, thereby obtaining the eye area image, wherein
  • the face template can be stored in the memory of the electronic device 100, and the processor 60 can perform face recognition in a trusted execution environment (Trusted Execution Environment, TEE) to ensure the privacy of the user; or, the preset face template can be stored
  • the electronic device 100 then sends the face image to the cloud server 200 for comparison to determine the image of the human eye area, and the face recognition is handed over to the cloud server 200 for processing, which can reduce the processing capacity of the electronic device 100 and Improving image processing efficiency; then, the processor 60 can identify the image of the human eye area to determine the missing information of the human eye.
  • TEE Truste Execution Environment
  • the human eye is relatively smooth and has a high reflectivity to light, compared to other parts of the human face. Therefore, by setting the detection threshold, it can be determined whether the pixel is located in the human eye (for example, when the pixel value of the pixel is greater than the detection threshold, it is determined that the pixel is located in the human eye), so as to determine whether the pixel is located in the human eye.
  • the image part of the human eye, and the shape of the human eye is basically determined as an approximate ellipse. According to the recognized image part of the human eye and the preset shape of the human eye, the missing part of the human eye can be determined. The missing information is thus determined, and the missing information may include the proportion of the missing part of the human eye to the human eye.
  • the processor 60 can determine the weight of the human eye area image according to the missing information. For example, the larger the proportion of the missing part of the human eye to the human eye, the smaller the weight of the human eye area image; it can be understood that the missing part of the human eye. The larger the proportion of the human eye, the greater the degree of occlusion of the human eye, and the worse the accuracy of the human eye area image. Therefore, giving a smaller weight can reduce the impact of the human eye area image on the subsequent calculation of human eye gaze information. The influence of accuracy, improve the accuracy of gaze detection.
  • the human eye area image includes a left eye area image and a right eye area image
  • the processor 60 can respectively determine the first weight of the left eye area image according to the first missing information of the left eye area image, and the first weight of the left eye area image according to the right eye area image.
  • the second missing information of the region image is used to determine the second weight of the right-eye region image, thereby respectively determining the first weight of the left-eye region image and the second weight of the right-eye region image.
  • the first weight is negatively correlated with the first missing information (such as the proportion of the missing part of the left eye to the left eye)
  • the second weight is negatively correlated with the second missing information (such as the proportion of the missing part of the right eye to the right eye).
  • Negative correlation when the first weight of the left-eye region image is small (such as 0.6), it can reduce the impact of the left-eye region image on the calculation of human gaze information (such as by reducing the number of feature points from the left-eye region image to reduce the impact).
  • the gaze information of the human eye can be calculated according to the image of the human eye region and its weight.
  • the gaze information includes the gaze direction and the coordinates of the gaze point
  • the processor 60 performs feature extraction on the left eye area and the right eye area in the human eye area image, thereby determining the gaze direction of the human eye and the display of the human eye on the electronic device 100
  • the electronic device 100 can be controlled according to the gaze direction and gaze point coordinates. If it is detected that the gaze point coordinates are located in the display area of the display screen 40, keep the screen always on, and when it is detected that the gaze point coordinates are located outside the display area of the display screen 40, a predetermined duration (such as 10S, 20S, etc.), then Turn off the screen.
  • a predetermined duration such as 10S, 20S, etc.
  • the image of the eye area may be incomplete due to reasons such as occlusion, thereby affecting the accuracy of gaze point detection.
  • the human eye gaze detection method, detection device 10, and electronic device 100 of the present application determine the weight of the human eye area image by acquiring the human eye area image and the missing information of the human eye area image.
  • the weight of the image of the human eye area is considered as a factor, which is beneficial to reduce the impact of the lack of image of the human eye area caused by the occlusion of the human eye, and the impact on the accuracy of the calculation of the gaze information of the human eye, which can improve the accuracy of human eye gaze information.
  • the human eye gaze detection method also includes:
  • Step 015 includes:
  • 0151 Determine human eye gaze information based on face posture information, human eye area images, and weights of human eye area images.
  • the detection device 10 further includes a second acquisition module 14, which can also be set in the ISP to acquire face pose information.
  • the second determining module 13 is further configured to determine human eye gaze information according to human face posture information, human eye region images, and weights of human eye region images. That is to say, step 0141 may be performed by the second obtaining module 14 , and step 0151 may be performed by the second determining module 13 .
  • the processor 60 is further configured to acquire face pose information, and determine human eye gaze information according to the face pose information, the human eye region image, and the weight of the human eye region image. That is to say, step 0141 and step 0151 can be executed by the processor 60 .
  • the processor 60 can also obtain face posture information, and the face posture information can be calculated according to the position coordinates of the extracted feature points by performing feature extraction on the face image.
  • Posture information it can be understood that different postures of the face (such as establishing a three-dimensional coordinate system with the tip of the nose as the origin, and the pitch angle, horizontal rotation angle, and tilt angle of the face represent the rotation of the face relative to the three coordinate axes of the three-dimensional coordinate system Angle, etc.), will affect the user's gaze direction and gaze point coordinates. Therefore, when calculating the gaze information of the human eye, in addition to obtaining the image of the human eye area and its weight, it will also combine the facial posture information to more accurately calculate the gaze direction and gaze point coordinates.
  • the human eye gaze detection method also includes:
  • 0142 Obtain a face image, where the face image includes a face mask
  • 0143 Calculate the position information of the face relative to the electronic device 100 according to the face mask
  • Step 015 includes:
  • 0152 Determine the gaze information of the human eye according to the position information, the human eye area image, and the weight of the human eye area image.
  • the detection device 10 also includes a third acquisition module 15 and a calculation module 16, both of the third acquisition module 15 and the calculation module 16 can be set at the ISP, and the third acquisition module 15 is used to acquire a face image, calculate The module 16 is used for calculating the position information of the face relative to the electronic device 100 according to the face mask. That is to say, step 0142 can be performed by the third acquisition module 15 , step 0143 can be performed by the calculation module 16 , and step 0152 can be performed by the second determination module 13 .
  • the processor 60 is also used to acquire a face image, and the face image includes a face mask; calculate the position information of the face relative to the electronic device 100 according to the face mask; The weight of the image and the image of the human eye area determines the gaze information of the human eye. . That is to say, step 0142 , step 0143 and step 0152 may be executed by the processor 60 .
  • the processor 60 may also obtain a face image, and determine a face mask of the face image, where the face mask is used to characterize the position of the face in the face image,
  • the face mask can be determined by identifying the position of the face in the face image, and the processor 60 can calculate the position information of the face relative to the electronic device 100 according to the face mask (such as according to the ratio of the face mask to the face image) , can calculate the distance between the human face and the electronic device 100), it can be understood that when the distance between the human face and the electronic device 100 changes, even if the gaze direction of the human eye does not change, the gaze point coordinates of the human eye will still change. Therefore, in When calculating the gaze information of the human eye, in addition to obtaining the image of the human eye area and its weight, it will also combine the position information to calculate the coordinates of the gaze point more accurately.
  • the gaze information of the human eye in addition to acquiring the image of the eye region and its weight, it may also be combined with facial posture information and position information, so as to calculate the gaze information of the human eye more accurately.
  • the human eye gaze detection method also includes:
  • 0101 Obtain a training sample set, the training sample set includes multiple human eye area images;
  • 0102 Determine the occlusion area and/or image offset parameters according to the human eye area image
  • 0103 Train the human eye detection model according to the human eye area image, occlusion area, and image offset parameters.
  • Step 015 includes:
  • 0153 Based on the human eye detection model, determine the human eye gaze information according to the human eye area image and the weight of the human eye area image.
  • the detection device 10 further includes a fourth acquisition module 17 , a third determination module 18 and a training module 19 .
  • the fourth acquiring module 17, the third determining module 18 and the training module 19 can all be set in the NPU to train the human eye detection model.
  • the fourth acquisition module 17 is used to obtain the training sample set
  • the third determination module 18 is used to determine the occlusion area and/or image offset parameters according to the human eye area image
  • the training module 19 is used to determine the human eye area image, the occlusion area, and Image offset parameters to train the human eye detection model.
  • the second determining module 13 may be configured to determine human eye gaze information based on the human eye detection model and according to the human eye region image and the weight of the human eye region image. That is to say, step 0101 can be performed by the fourth acquisition module 17 , step 0102 can be performed by the third determination module 18 , step 0103 can be performed by the training module 19 , and step 0153 can be performed by the second determination module 13 .
  • the processor 60 is further configured to obtain a training sample set, the training sample set includes a plurality of human eye area images; determine the occlusion area and/or image offset parameters according to the human eye area images; according to the human eye area images, The occlusion area and image offset parameters train the human eye detection model; based on the human eye detection model, the human eye gaze information is determined according to the weight of the human eye area image and the human eye area image. That is to say, step 0101 , step 0102 , step 0103 and step 0153 may be executed by the processor 60 .
  • this application can realize the calculation of human eye gaze information through the preset human eye detection model, that is, based on the human eye detection model, determine the human eye gaze information according to the weight of the human eye area image and the human eye area image, in order to ensure that people To ensure the accuracy of eye gaze information, it is necessary to train the human eye detection model first, so that the human eye detection model converges.
  • the area image may include an occlusion area and/or image offset parameters, wherein the occlusion area is generated by replacing at least a part of pixels in the human eye area image with pixels of a predetermined pixel value (such as 0), and the occlusion area is used for the human eye area image
  • the occluded area should not block the eyebrows, eyes, mouth, nose and other related parts of the face;
  • the image offset generation is performed on the point, and the image offset parameter is used to indicate the deviation of the detection of the feature points of the human eye (such as the deviation of the coordinates of the feature points of the human eye).
  • the human eye detection model is trained by using the human eye area image with the occlusion area and/or image offset parameters, so that the human eye detection model trained to convergence can minimize the reduction in the human eye gaze information detection.
  • the impact of the occlusion of the human eye and the deviation of the detection of the feature points of the human eye can ensure the accuracy of gaze detection.
  • step 0103 includes:
  • 01031 Input the human eye area image, occlusion area, and image offset parameters into the human eye detection model to output training coordinates;
  • 01032 Based on the preset loss function, calculate the loss value according to the preset coordinates and training coordinates corresponding to the human eye area image;
  • 01033 Adjust the eye detection model according to the loss value until the eye detection model converges.
  • the training module 19 is also used to input the human eye area image, occlusion area, and image offset parameters into the human eye detection model to output training coordinates; based on the preset loss function, according to the human eye area image Calculate the loss value for the corresponding preset coordinates and training coordinates; adjust the human eye detection model according to the loss value until the human eye detection model converges. That is to say, Step 01031 to Step 01033 can be executed by the training module 19 .
  • the processor 60 is further configured to input the human eye region image, occlusion region, and image offset parameters into the human eye detection model to output training coordinates; based on a preset loss function, according to the human eye region image Calculate the loss value for the corresponding preset coordinates and training coordinates; adjust the human eye detection model according to the loss value until the human eye detection model converges. That is to say, Step 01031 to Step 01033 may be executed by the processor 60 .
  • the face detection model 50 includes a first feature extraction module 51 , a second feature extraction module 52 , a first weight module 53 , a second weight module 54 and a feature fusion module 55 .
  • the human eye area image is input into the human eye detection model, and the human eye area image includes a left eye area image and a right eye area image, and the first feature extraction module 51 can use the left eye area image ( Or the feature points of the left eye area image) are extracted, the second feature extraction module 52 can extract the right eye area image (or the feature points of the right eye area image) in the human eye area image, and then the first weight module 53 can be The first missing information is determined according to the occlusion area of the left-eye area image, thereby determining the first weight, and the second weight module 54 can determine the second missing information according to the occlusion area of the right-eye area image, thereby determining the second weight, and then the left-eye
  • the region image, the right-eye region image, the first weight and the second weight are input into the feature fusion module for calculation, and the specific calculation method may be to weight the left-eye region image by the first weight (such as first weight * left-eye region image), weight the right eye area image by the second weight (such as the second
  • the face detection model 50 also includes a third feature extraction module 56, the third feature extraction module 56 can be used to extract feature points in the face image, so as to output the face pose information to the feature fusion module, thereby Calculating human eye gaze information according to the face posture information, the left-eye area image, the right-eye area image, the first weight and the second weight.
  • the output human eye gaze information is the training coordinates, and there are preset coordinates as the human eye region image of the training sample, and the preset coordinates are the real human eye gaze information (such as the human eye gaze direction and gaze point coordinates)
  • processor 60 calculates the loss value based on the preset loss function, the training coordinates and the preset coordinates, and the loss function is as follows: Among them, loss is the loss value, N is the number of training samples contained in each training sample set, X and Y are the training coordinates, Gx and Gy are the preset coordinates, when the training coordinates are the gaze direction, X and Y represent pitch respectively Angle and yaw angle, when the training coordinates are the gaze point coordinates, X and Y represent the coordinates of the gaze point on the plane where the display screen 40 is located, respectively, thereby calculating the loss value of the gaze direction and the loss value of the gaze point coordinates respectively.
  • the processor 60 can adjust the human eye detection model according to the loss value of the gaze direction and the loss value of the gaze point coordinates, so that the gradient of the human eye detection model continues to decrease, so that the training coordinates are getting closer and closer to the preset coordinates, and finally the human eye
  • the detection model is trained to convergence.
  • the human eye detection model is trained through the human eye area image with occlusion area and/or image offset parameters, and the human eye detection model is continuously adjusted to convergence based on the loss value, which can minimize the human eye being occluded and The impact of human eye feature point detection offset on gaze detection improves the accuracy of gaze detection.
  • the detection method of the embodiment of the present application includes the following steps:
  • the detection device 20 in the embodiment of the present application includes a first acquisition module 21 , a first determination module 22 , a second determination module 23 , a third determination module 24 and a fourth determination module 25 .
  • the first acquiring module 21 is used to acquire the human face image;
  • the first determining module 22 is used to determine the human eye region image and the facial posture information according to the human face image;
  • the second determining module 23 is used to determine the missing information of the human eye region image, Determine the weight of the human eye area image;
  • the third determination module 24 is used to determine the human eye feature information according to the human eye area image and the weight of the human eye area image; Information, to determine the human eye gaze information.
  • step 021 can be implemented by the first acquisition module 11, step 022 can be performed by the first determination module 12, step 023 can be performed by the second determination module 23, step 024 can be performed by the third determination module 24, step 025 It may be executed by the fourth determining module 25 .
  • the electronic device 100 in the embodiment of the present application includes a processor 60 and a collection device 30 .
  • Acquisition device 30 is used for collecting face information by predetermined frame rate (face information comprises people's face image, as the visible light image of people's face, infrared image, depth image etc.);
  • Acquisition device 30 can be visible light camera, infrared camera, depth camera One or more of them, wherein the visible light camera can collect visible light face images, the infrared camera can collect infrared face images, and the depth camera can collect depth face images.
  • the collection device 30 includes a visible light camera, an infrared face image camera and depth camera, the acquisition device 30 simultaneously visible light face image, infrared face image and depth face image.
  • the detection device 20 is arranged in the electronic equipment 100, and the processor 60 may include an ISP, an NPU, and an AP.
  • the first acquisition module 21 may be arranged in the acquisition device 30 to obtain a face image.
  • the first determination module 22 and the second determination module 23 and the third determination module 24 may be set in the ISP, and the fourth determination module 25 may be set in the NPU.
  • Acquisition device 30 is used for obtaining human face image;
  • Processor 60 (specifically can be ISP) is used for determining human eye area image and human face posture information according to human face image; According to the missing information of human eye area image, determine human eye area image weight; according to the weight of the human eye area image and the human eye area image, determine the human eye feature information;
  • processor 60 (specifically can be NPU) is also used for determining the human eye gaze information according to the human eye feature information and the facial posture information . That is to say, step 021 may be executed by the collection device 30 , and steps 022 to 025 may be executed by the processor 60 .
  • the collection device 30 can collect the user's face information once at a predetermined time interval, and continue to perform gaze detection on the user while ensuring that the power consumption of the electronic device 100 is small, or, when the user When using applications that require gaze detection (such as browser software, post bar software, video software, etc.), the face information is collected according to the predetermined number of frames, so that face information is collected only when gaze detection is required, maximizing Reduced power consumption for gaze detection.
  • applications that require gaze detection such as browser software, post bar software, video software, etc.
  • the processor 60 can identify the face image, for example, the processor 60 can compare the face image with the preset face template , so as to determine the image area where the face and different parts of the face (such as glasses, nose, etc.)
  • the face template can be stored in the memory of the electronic device 100, and the processor 60 can perform face recognition in a trusted execution environment (Trusted Execution Environment, TEE) to ensure the privacy of the user; or, the preset face template can be stored
  • TEE Truste Execution Environment
  • the electronic device 100 then sends the face image to the cloud server 200 for comparison to determine the image of the human eye area, and the face recognition is handed over to the cloud server 200 for processing, which can reduce the processing capacity of the electronic device 100 and Improve image processing efficiency.
  • the processor 60 can also perform feature extraction on the face image, and calculate the face posture information according to the position coordinates of the extracted feature points.
  • the pitch angle, horizontal rotation angle, and tilt angle represent the rotation angles of the face relative to the three coordinate axes of the three-dimensional coordinate system, etc.), which will affect the user's gaze direction and gaze point coordinates. Therefore, when calculating human eye gaze information When , in addition to obtaining the image of the human eye area, it will also combine the facial posture information to more accurately calculate the gaze direction and gaze point coordinates.
  • the processor 60 can identify the image of the human eye area to determine the missing information of the human eye.
  • the human eye is relatively smooth and has a high reflectivity to light. Compared with other parts of the human face, the human eye is The pixel value in the image will be larger, therefore, by setting the detection threshold, it can be determined whether the pixel is located in the human eye (for example, when the pixel value of the pixel is greater than the detection threshold, it is determined that the pixel is located in the human eye), so as to determine the human eye region image.
  • the image part of the human eye, and the shape of the human eye is basically determined and approximately elliptical. According to the recognized image part of the human eye and the preset shape of the human eye, the missing part of the human eye can be determined, thereby determining the missing information.
  • the missing information may include the ratio of the missing part of the human eye to the human eye.
  • the processor 60 can determine the weight of the human eye area image according to the missing information. For example, the larger the proportion of the missing part of the human eye to the human eye, the smaller the weight of the human eye area image; it can be understood that the missing part of the human eye. The larger the proportion of the human eye, the greater the degree of occlusion of the human eye, and the worse the accuracy of the human eye area image. Therefore, giving a smaller weight can reduce the impact of the human eye area image on the subsequent calculation of human eye gaze information. The influence of accuracy, improve the accuracy of gaze detection.
  • the human eye area image includes a left eye area image and a right eye area image
  • the processor 60 can respectively determine the first weight of the left eye area image according to the first missing information of the left eye area image, and the first weight of the left eye area image according to the right eye area image.
  • the second missing information of the region image is used to determine the second weight of the right-eye region image, thereby respectively determining the first weight of the left-eye region image and the second weight of the right-eye region image.
  • the first weight is negatively correlated with the first missing information (such as the proportion of the missing part of the left eye to the left eye)
  • the second weight is negatively correlated with the second missing information (such as the proportion of the missing part of the right eye to the right eye).
  • Negative correlation when the first weight of the left-eye region image is small (for example, 0.6), the influence of the left-eye region image on the calculation of human gaze information can be reduced (such as by extracting fewer features of the left-eye region image point to reduce the impact).
  • the feature information of the human eye can be determined according to the image of the human eye region and its weight, for example, the weights corresponding to the image of the face region and the image of the human eye region are directly As the human eye feature information, or first extract the human eye feature points from the human eye area image according to the weight of the human eye area image, and then use the extracted human eye feature points as the human eye feature information.
  • the processor 60 determines the gaze information of the human eye according to the characteristic information of the human eye and the posture information of the human face.
  • the gaze information includes gaze direction and gaze point coordinates
  • processor 60 can perform feature extraction on the left eye area and right eye area in the human eye area image respectively, and then combine the facial posture information to determine the gaze direction of the human eye and The gaze point coordinates of the human eyes on the plane where the display screen 40 of the electronic device 100 is located.
  • the electronic device 100 can be controlled according to the gaze direction and gaze point coordinates. If it is detected that the gaze point coordinates are located in the display area of the display screen 40, keep the screen always on, and when it is detected that the gaze point coordinates are located outside the display area of the display screen 40, a predetermined duration (such as 10S, 20S, etc.), then Turn off the screen.
  • a predetermined duration such as 10S, 20S, etc.
  • the human eye gaze detection method, detection device 20, and electronic device 100 of the present application determine the weight of the human eye area image by acquiring the human eye area image and the missing information of the human eye area image.
  • the weight of the image of the human eye area is considered as a factor, which is beneficial to reduce the impact of the lack of image of the human eye area caused by the occlusion of the human eye, and the impact on the accuracy of the calculation of the gaze information of the human eye, which can improve the accuracy of human eye gaze information.
  • the human eye gaze information can be accurately calculated through the face posture information, which can improve the accuracy of the human eye gaze information.
  • face image comprises face mask
  • step 025 comprises:
  • the fourth determination module 25 is also used to calculate the position information of the human face relative to the electronic device 100 according to the face mask; determine the gaze information of the human eye according to the position information, human eye feature information and human face posture information . That is to say, step 0251 and step 0252 can be executed by the fourth determination module 25 .
  • the processor 60 is further configured to calculate the position information of the face relative to the electronic device 100 according to the face mask; and determine the gaze information of the human eye according to the position information, the feature information of the human eyes and the posture information of the human face. That is to say, step 0251 and step 0252 can be executed by the processor 60 .
  • the processor 60 can also determine the face mask of the face image, which is used to represent the position of the face in the face image, and the face mask can be obtained by Identify the position of the human face in the human face image, and the processor 60 can calculate the position information of the human face relative to the electronic device 100 (such as the distance between the human face and the electronic device 100) according to the face mask.
  • the human face and the electronic device 100 When the distance of the device 100 changes, even if the gaze direction of the human eye does not change, the coordinates of the gaze point of the human eye will still change. Therefore, when calculating the gaze information of the human eye, in addition to obtaining the image of the human eye region and its weight, and the human face In addition to attitude information, position information will also be combined to more accurately calculate the coordinates of the gaze point.
  • the method for controlling the electronic device 100 through human eyes includes the following steps:
  • the control device 30 in the embodiment of the present application includes a first acquisition module 31 , a first determination module 32 and a control module 33 .
  • the first acquisition module 31 is used to obtain the human eye region image;
  • the first determination module 32 is used to determine the human eye gaze information according to the human eye region image and the weight of the human eye region image;
  • the control module 33 is used to control the human eye gaze information according to the human eye region image.
  • Electronic device 100 That is to say, step 031 can be implemented by the first acquisition module 31 , step 033 can be performed by the first determination module 32 and step 035 can be performed by the control module 33 .
  • the electronic device 100 in the embodiment of the present application includes a processor 60 and a collection device 30 .
  • Acquisition device 30 is used for collecting face information by predetermined frame rate (face information comprises people's face image, as the visible light image of people's face, infrared image, depth image etc.);
  • Acquisition device 30 can be visible light camera, infrared camera, depth camera One or more of them, wherein the visible light camera can collect visible light face images, the infrared camera can collect infrared face images, and the depth camera can collect depth face images.
  • the collection device 30 includes a visible light camera, an infrared face image camera and depth camera, the acquisition device 30 simultaneously visible light face image, infrared face image and depth face image.
  • Processor 60 may include ISP, NPU and AP, such as control device 30 is arranged in electronic equipment 100, the first acquisition module 11 is arranged in ISP, processor 60 is connected with acquisition device 30, after acquisition device 30 collects the facial image
  • the ISP can process the face image to obtain the image of the human eye area
  • the first determination module 12 can be set in the NPU
  • the control module 13 can be set in the AP.
  • the processor 60 (specifically, it may be an ISP) is used to acquire the image of the human eye area; the processor 60 (specifically, it may be an NPU) is also used to determine the human eye gaze information according to the weight of the human eye area image and the human eye area image.
  • the processor 60 (specifically, it may be an AP) can also be used to control the electronic device 100 according to the gaze information of human eyes. That is to say, step 031 can be executed by the collection device 30 in cooperation with the processor 60 , and steps 032 and 033 can be executed by the processor 60 .
  • the collection device 30 can collect the user's face information once at a predetermined time interval, and continue to perform gaze detection on the user while ensuring that the power consumption of the electronic device 100 is small, or, when the user When using applications that require gaze detection (such as browser software, post bar software, video software, etc.), the face information is collected according to the predetermined number of frames, so that face information is collected only when gaze detection is required, maximizing Reduced power consumption for gaze detection.
  • applications that require gaze detection such as browser software, post bar software, video software, etc.
  • the processor 60 can identify the face image, for example, the processor 60 can compare the face image with the preset face template , so as to determine the image area where the face and different parts of the face (such as glasses, nose, etc.)
  • the face template can be stored in the memory of the electronic device 100, and the processor 60 can perform face recognition in a trusted execution environment (Trusted Execution Environment, TEE) to ensure the privacy of the user; or, the preset face template can be stored In the cloud server 200, the electronic device 100 then sends the face image to the cloud server 200 for comparison to determine the image of the human eye area, and the face recognition is handed over to the cloud server 200 for processing, which can reduce the processing capacity of the electronic device 100 and Improve image processing efficiency;
  • TEE Truste Execution Environment
  • the processor 60 can identify the image of the human eye area to determine the missing information of the human eye.
  • the human eye is relatively smooth and has a high reflectivity to light. Compared with other parts of the human face, the human eye is The pixel value in the image will be larger, therefore, by setting the detection threshold, it can be determined whether the pixel is located in the human eye (for example, when the pixel value of the pixel is greater than the detection threshold, it is determined that the pixel is located in the human eye), so as to determine the human eye region image.
  • the image part of the human eye, and the shape of the human eye is basically determined and approximately elliptical. According to the recognized image part of the human eye and the preset shape of the human eye, the missing part of the human eye can be determined, thereby determining the missing information.
  • the missing information may include the ratio of the missing part of the human eye to the human eye.
  • the processor 60 can determine the weight of the human eye area image according to the missing information. For example, the larger the proportion of the missing part of the human eye to the human eye, the smaller the weight of the human eye area image; it can be understood that the missing part of the human eye. The larger the proportion of the human eye, the greater the degree of occlusion of the human eye, and the worse the accuracy of the human eye area image. Therefore, giving a smaller weight can reduce the impact of the human eye area image on the subsequent calculation of human eye gaze information. The influence of accuracy, improve the accuracy of gaze detection.
  • the human eye area image includes a left eye area image and a right eye area image
  • the processor 60 can respectively determine the first weight of the left eye area image according to the first missing information of the left eye area image, and the first weight of the left eye area image according to the right eye area image.
  • the second missing information of the region image is used to determine the second weight of the right-eye region image, thereby respectively determining the first weight of the left-eye region image and the second weight of the right-eye region image.
  • the first weight is negatively correlated with the first missing information (such as the proportion of the missing part of the left eye to the left eye)
  • the second weight is negatively correlated with the second missing information (such as the proportion of the missing part of the right eye to the right eye).
  • Negative correlation when the first weight of the left-eye region image is small (for example, 0.6), the influence of the left-eye region image on the calculation of human gaze information can be reduced (such as by extracting fewer features of the left-eye region image point to reduce the impact).
  • the gaze information of the human eye can be calculated according to the image of the human eye region and its weight.
  • the gaze information includes the gaze direction and the coordinates of the gaze point
  • the processor 60 performs feature extraction on the left eye area and the right eye area in the human eye area image, thereby determining the gaze direction of the human eye and the display of the human eye on the electronic device 100
  • the electronic device 100 can be controlled according to the gaze direction and gaze point coordinates.
  • a three-dimensional coordinate system is established with the midpoint of the eyes as the origin O1
  • the X1 axis is parallel to the direction of the line connecting the centers of the eyes
  • the Y1 axis is located on the horizontal plane and perpendicular to the X1 axis
  • the Z1 axis is perpendicular to the X1 axis and Y1 axis.
  • the three-axis rotation angle of the line of sight S and the three-dimensional coordinate system indicates the user's gaze direction.
  • the gaze direction includes pitch angle, roll angle and yaw angle respectively.
  • the pitch angle represents the rotation angle around the X1 axis
  • the roll angle represents the rotation angle around the Y1 axis.
  • the rotation angle of the axis, the yaw angle represents the rotation angle around the Z1 axis
  • the processor 60 can realize the page turning or sliding operation of the display content of the electronic device 100 according to the gaze direction, for example, according to the determination of continuous multiple frames of human eye area images (such as 10 consecutive frames) of the gaze direction, the change of the gaze direction can be determined, for example, please combine Figure 15 and Figure 16, when the pitch angle gradually increases (that is, the line of sight S is tilted), it can be determined that the user wants the displayed content to slide up or Turning the page down. For another example, please refer to FIG. 15 and FIG.
  • the pitch angle gradually decreases (that is, the line of sight S is tilted), then it can be determined that the user wants to slide the displayed content down or turn the page up.
  • the electronic device 100 can also be slid or page-turned.
  • the center of the display screen 40 can be used as the coordinate origin O2 to establish a plane coordinate system
  • the width direction parallel to the electronic device 100 is used as the X2 axis
  • the length direction parallel to the electronic device 100 is used as the Y2 axis
  • the gaze point coordinates include the abscissa (corresponding to the position on the X2 axis) and the ordinate (corresponding to the position on the Y2 axis).
  • the ordinate gradually increases, it means that the gaze point M moves up. It can be determined that the user wants to slide up or turn the page down, and then For example, if the ordinate gradually decreases, it means that the gaze point M moves down, and it can be determined that the user wants to slide the displayed content down or turn the page up.
  • the processor 60 can also obtain 10 consecutive frames according to the change speed of the gaze direction (such as the difference between the pitch angles of the first frame and the tenth frame (or the difference between the vertical coordinates of the gaze point M) and The duration is determined), the faster the change speed, the more new display content will be displayed after sliding.
  • the predetermined time length (such as 10S, 20S, etc.) after the user does not check the display screen 40 can be Turn off the screen again.
  • the method for controlling the electronic device 100 through human eyes, the control device 30 and the electronic device 100 of the present application determine the weight of the human eye region image by acquiring the human eye region image and the missing information of the human eye region image.
  • the weight of the human eye area image is considered as a factor, which is beneficial to reduce the impact of the human eye area image being missing due to the occlusion of the human eye, and the accuracy of the calculation of the human eye gaze information.
  • the method for controlling the electronic device 100 through human eyes further includes:
  • Step 033 includes:
  • 0331 Determine the human eye gaze information according to the face posture information, the human eye area image, and the weight of the human eye area image.
  • control device 30 further includes a second acquisition module 34, which can also be set in the ISP to acquire facial posture information.
  • the first determining module 32 is further configured to determine human eye gaze information according to the human face posture information, the human eye area image, and the weight of the human eye area image. That is to say, step 0321 can be performed by the second obtaining module 34 , and step 0331 can be performed by the first determining module 32 .
  • the processor 60 is further configured to acquire face pose information, and determine human eye gaze information according to the face pose information, the human eye region image, and the weight of the human eye region image. That is to say, step 0321 and step 0331 can be executed by the processor 60 .
  • step 0321 For the specific description of step 0321, please refer to step 0141, and for the specific description of step 0331, please refer to step 0151, which will not be repeated here.
  • the method for controlling the electronic device 100 through human eyes further includes:
  • Step 033 includes:
  • 0332 Determine the gaze information of the human eye according to the position information, the image of the human eye area, and the weight of the image of the human eye area.
  • control device 30 also includes a third acquisition module 35 and a calculation module 36, both of the third acquisition module 35 and the calculation module 36 can be set at the ISP, and the third acquisition module 35 is used to acquire a face image, calculate The module 36 is used for calculating the position information of the face relative to the electronic device 100 according to the face mask. That is to say, step 0322 can be performed by the third acquisition module 35 , step 0332 can be performed by the calculation module 16 , and step 0332 can be performed by the first determination module 32 .
  • the processor 60 is further configured to acquire face pose information, and determine human eye gaze information according to the face pose information, the human eye region image, and the weight of the human eye region image. That is to say, step 0322 , step 323 and step 0332 may be executed by the processor 60 .
  • Step 0322, Step 0323, and Step 0332 please refer to Step 0142, Step 0143, and Step 0152, respectively, and details are not repeated here.
  • the method for controlling the electronic device 100 through human eyes further includes:
  • 0303 Train the human eye detection model according to the human eye area image, occlusion area, and image offset parameters.
  • Step 033 includes:
  • 0333 Based on the human eye detection model, determine the human eye gaze information according to the human eye area image and the weight of the human eye area image.
  • the control device 30 further includes a fourth acquisition module 37 , a second determination module 38 and a training module 39 .
  • the fourth acquiring module 37, the second determining module 38 and the training module 39 can all be set in the NPU to train the human eye detection model.
  • the fourth acquisition module 37 is used to obtain the training sample set
  • the second determination module 38 is used to determine the occlusion area and/or image offset parameters according to the human eye area image; Image offset parameters to train the human eye detection model.
  • the first determining module 32 may be configured to determine human eye gaze information based on the human eye detection model and according to the human eye region image and the weight of the human eye region image. That is to say, step 0301 can be performed by the fourth acquisition module 37 , step 0302 can be performed by the second determination module 38 , step 0103 can be performed by the training module 39 , and step 0333 can be performed by the first determination module 32 .
  • the processor 60 is further configured to obtain a training sample set, the training sample set includes a plurality of human eye area images; determine the occlusion area and/or image offset parameters according to the human eye area images; according to the human eye area images, The occlusion area and image offset parameters train the human eye detection model; based on the human eye detection model, the human eye gaze information is determined according to the weight of the human eye area image and the human eye area image. That is to say, step 0301 , step 0302 , step 0303 and step 0333 may be executed by the processor 60 .
  • Step 0301 for specific descriptions of Step 0301, Step 0302, Step 0303, and Step 0333, please refer to Step 0101, Step 0102, Step 0103, and Step 0153, respectively, and details are not repeated here.
  • step 0303 includes:
  • 03031 Input the human eye area image, occlusion area, and image offset parameters into the human eye detection model to output training coordinates;
  • 03032 Based on the preset loss function, calculate the loss value according to the preset coordinates and training coordinates corresponding to the human eye area image;
  • the training module 39 is also used to input the human eye area image, occlusion area, and image offset parameters into the human eye detection model to output training coordinates; based on a preset loss function, according to the human eye area image Calculate the loss value for the corresponding preset coordinates and training coordinates; adjust the human eye detection model according to the loss value until the human eye detection model converges. That is to say, Step 03031 to Step 03033 can be executed by the training module 39 .
  • the processor 60 is further configured to input the human eye region image, occlusion region, and image offset parameters into the human eye detection model to output training coordinates; based on a preset loss function, according to the human eye region image Calculate the loss value for the corresponding preset coordinates and training coordinates; adjust the human eye detection model according to the loss value until the human eye detection model converges. That is to say, Step 03031 to Step 03033 may be executed by the processor 60 .
  • Step 03031, Step 03032, and Step 03033 please refer to Step 01031, Step 01032, and Step 01033, respectively, and details are not repeated here.
  • the gaze information of the human eye includes gaze point coordinates.
  • the method for controlling the electronic device 100 through the human eye further includes:
  • Step 035 includes:
  • control module 33 is also configured to acquire a captured image within the first predetermined time before the screen is off; in response to the captured image containing a human face; in response to the gaze point coordinates being located in the display area of the display screen 40, Keep the screen on for a second predetermined duration. That is to say, step 0301 , step 0302 and step 0351 can be executed by the control module 33 .
  • the processor 60 is further configured to acquire a captured image within the first predetermined time period before the screen turns off; in response to the captured image containing a human face; in response to the gaze point coordinates being located in the display area of the display screen 40, Keep the screen on for a second predetermined duration. That is to say, step 0351 and step 0352 can be executed by the processor 60 .
  • the human eye gaze information can be used to realize off-screen control. Before the screen is off, gaze detection is first performed. For example, the processor 60 first obtains a captured image. If there is a human face in the captured image, the human eye gaze information is performed according to the captured image. Of course, in order to ensure that there is enough time to acquire the captured image and calculate the gaze information before the screen is closed, it is necessary to acquire the captured image within the first predetermined time period (such as 5 seconds, 10 seconds, etc.) before the screen is closed.
  • the first predetermined time period such as 5 seconds, 10 seconds, etc.
  • the gaze point M when the gaze point M is located in the display area of the display screen 40, it can be determined that the user is watching the display screen 40, so that the display screen 40 remains on for a second predetermined duration, and the second predetermined duration can be greater than the first predetermined time length, and within the first predetermined time length before the screen is turned off again, the captured image is acquired again, so that when the user looks at the display screen 40, the screen remains bright, and when the user no longer looks at the display screen 40, the screen is turned off again. Screen.
  • the center of the display area can be used as the coordinate origin O2 to establish a two-dimensional coordinate system parallel to the display screen 40, and the display area is associated with a preset coordinate range, that is, the display area is in the horizontal direction of the two-dimensional coordinate system.
  • the coordinate range and the ordinate range can be determined when the gaze point coordinates are within the preset coordinate range (that is, the abscissa of the gaze point coordinates is within the abscissa range and the ordinate is within the ordinate range).
  • the gaze point coordinates are located in the display area, so it is relatively simple to determine whether the user gazes at the display screen 40 .
  • the gaze information of the human eye includes the gaze point coordinates.
  • the method for controlling the electronic device 100 through the human eye further includes:
  • Step 035 includes:
  • control module 33 is further configured to acquire a captured image in response to the fact that the electronic device 100 does not receive an input operation, and adjust the display screen 40 in response to the captured image containing a human face and the coordinates of the gaze point located in the display area. Adjust the display brightness to the first predetermined brightness, and adjust the display brightness to the second predetermined brightness in response to the fact that the captured image does not contain a human face, or the captured image contains a human face and the gaze point coordinates are outside the display area, and the second predetermined brightness less than the first predetermined brightness. That is to say, step 0303 , step 0352 and step 0353 can be executed by the control module 33 .
  • the processor 60 is further configured to acquire a captured image in response to the fact that the electronic device 100 does not receive an input operation, and adjust the display screen 40 in response to the captured image containing a human face and the coordinates of the gaze point located in the display area. Adjust the display brightness to the first predetermined brightness, and adjust the display brightness to the second predetermined brightness in response to the fact that the captured image does not contain a human face, or the captured image contains a human face and the gaze point coordinates are outside the display area, and the second predetermined brightness less than the first predetermined brightness. That is to say, step 0303 , step 0352 and step 0353 can be executed by the processor 60 .
  • the human eye gaze information can also be used to realize intelligent brightening of the screen.
  • the electronic device 100 will generally reduce the display brightness first after a certain period of time when the screen is bright, and then turn on the screen with a low brightness. After a certain period of time, the screen will stop.
  • the processor 60 can obtain the captured image. If the image contains a human face, the gaze information of the human eye is calculated according to the captured image.
  • the display brightness is adjusted to the first predetermined brightness at this time.
  • the first predetermined brightness may be the brightness set by the user when the display screen 40 is normally displayed, or it may be changed in real time according to the brightness of the ambient light to adapt to the brightness of the ambient light, so as to ensure that the user can still brighten the electronic device 100 even if the user does not operate the electronic device 100. screen, so as to prevent the situation that the user does not operate the electronic device 100 but suddenly turns off the screen when viewing the displayed content and affects the user experience.
  • the display brightness can be adjusted to a second predetermined brightness, which is smaller than the first predetermined brightness, so as to prevent unnecessary power consumption.
  • the display brightness is adjusted to the first predetermined brightness again, so as to ensure the normal viewing experience of the user. In this way, it can be realized that when the user does not operate the electronic device 100, the user looks at the display area, and the display area is displayed at normal brightness; Save battery.
  • the training method of the human eye detection model of the embodiment of the present application includes:
  • the training device 40 in the embodiment of the present application includes an acquisition module 41 , a determination module 42 and a training module 43 .
  • the acquiring module 41, the determining module 42 and the training module 43 can all be set in the NPU to train the human eye detection model.
  • the obtaining module 41 is used to obtain the training sample set, and the determining module 42 is used to determine the occlusion area and/or image offset parameters according to the human eye area image;
  • the training module 43 is used to determine the human eye area image, the occlusion area, and the image offset parameters Train the human eye detection model. That is to say, step 041 may be performed by the acquisition module 41 , step 042 may be performed by the determination module 42 , and step 043 may be performed by the training module 43 .
  • the processor 60 is further configured to obtain a training sample set, the training sample set includes a plurality of human eye area images; determine the occlusion area and/or image offset parameters according to the human eye area images; according to the human eye area images, The occlusion area and image offset parameters are used to train the human eye detection model. That is to say, step 041 , step 042 and step 043 may be executed by the processor 60 .
  • step 0101 please refer to step 0101, step 0102, and step 0103 for specific descriptions of step 041, step 042, and step 043, and details are not repeated here.
  • one or more non-transitory computer-readable storage media 300 containing a computer program 302 when the computer program 302 is executed by one or more processors 60, the processors 60 can Execute the human eye gaze detection method or the method for controlling the electronic device 100 through human eyes in any one of the above embodiments.
  • the processors 60 are made to perform the following steps:
  • 013 Determine the weight of the human eye area image according to the missing information of the human eye area image
  • 015 According to the weight of the human eye area image and the human eye area image, determine the human eye gaze information.
  • processors 60 when the computer program 302 is executed by one or more processors 60, the processors 60 may also perform the following steps:
  • processors 60 when the computer program 302 is executed by one or more processors 60, the processors 60 may also perform the following steps:

Abstract

A human eye gaze detection method, a method for controlling an electronic device (100) by means of eyes, a detection apparatus (10), a control apparatus (30), an electronic device (100), and a non-volatile computer-readable storage medium (300). The human eye gaze detection method comprises: (011) acquiring a human eye area image; (013) determining a weighting of the human eye area image according to missing information of the human eye area image; (015) determining human eye gaze information according to the human eye area image and the weighting of the human eye area image.

Description

人眼注视检测方法、控制方法及相关设备Human gaze detection method, control method and related equipment
优先权信息priority information
本申请请求2021年10月29日向中国国家知识产权局提交的、专利申请号为202111274110.3的专利申请的优先权和权益,并且通过参照将其全文并入此处。This application claims the priority and benefit of the patent application No. 202111274110.3 filed with the State Intellectual Property Office of China on October 29, 2021, which is hereby incorporated by reference in its entirety.
技术领域technical field
本申请涉及消费性电子产品技术领域,特别涉及一种人眼注视检测方法、通过人眼控制电子设备的方法、检测装置、控制装置、电子设备和非易失性计算机可读存储介质。The present application relates to the technical field of consumer electronics products, and in particular to a human eye gaze detection method, a method for controlling electronic equipment through human eyes, a detection device, a control device, electronic equipment, and a non-volatile computer-readable storage medium.
背景技术Background technique
目前,电子设备可通过采集人脸图像来估计用户的注视点。Currently, electronic devices can estimate a user's gaze point by collecting face images.
发明内容Contents of the invention
本申请提供了一种人眼注视检测方法、通过人眼控制电子设备的方法、检测装置、控制装置、电子设备和非易失性计算机可读存储介质。The present application provides a human eye gaze detection method, a method for controlling electronic equipment through human eyes, a detection device, a control device, electronic equipment and a non-volatile computer-readable storage medium.
本申请一个实施方式的人眼注视检测方法包括获取人眼区域图像;根据所述人眼区域图像的缺失信息,确定所述人眼区域图像的权重;根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼注视信息。The human eye gaze detection method in one embodiment of the present application includes acquiring an image of the human eye area; determining the weight of the image of the human eye area according to the missing information of the image of the human eye area; The weight of the eye area image determines the gaze information of the human eye.
本申请一个实施方式的检测装置包括第一获取模块、第一确定模块和第二确定模块。所述第一获取模块用于获取人眼区域图像;所述第一确定模块用于根据所述人眼区域图像的缺失信息,确定所述人眼区域图像的权重;所述第二确定模块用于根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼注视信息。A detection device according to an embodiment of the present application includes a first acquisition module, a first determination module, and a second determination module. The first acquisition module is used to acquire the human eye area image; the first determination module is used to determine the weight of the human eye area image according to the missing information of the human eye area image; the second determination module uses The human eye gaze information is determined according to the human eye area image and the weight of the human eye area image.
本申请一个实施方式的电子设备包括处理器,所述处理器用于执行人眼注视检测方法。所述人眼注视检测方法包括获取人眼区域图像;根据所述人眼区域图像的缺失信息,确定所述人眼区域图像的权重;根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼注视信息。An electronic device according to an embodiment of the present application includes a processor, and the processor is configured to execute a human gaze detection method. The human eye gaze detection method includes acquiring a human eye area image; determining the weight of the human eye area image according to missing information of the human eye area image; Weight, which determines the gaze information of the human eye.
本申请另一实施方式的人眼注视检测方法包括获取人脸图像;根据所述人脸图像确定人眼区域图像以及人脸姿态信息;根据所述人眼区域图像的缺失信息,确定所述人眼区域图像的权重;根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼特征信息;根据所述人眼特征信息以及所述人脸姿态信息,确定人眼注视信息。The human eye gaze detection method according to another embodiment of the present application includes acquiring a human face image; determining the human eye area image and human face pose information according to the human face image; The weight of the eye area image; according to the human eye area image and the weight of the human eye area image, determine the human eye feature information; according to the human eye feature information and the human face posture information, determine the human eye gaze information.
本申请另一实施方式的检测装置包括第一获取模块、第一确定模块、第二确定模块、第三确定模块和第四确定模块。所述第一获取模块用于获取人脸图像;所述第一确定模块用于根据所述人脸图像确定人眼区域图像以及人脸姿态信息;所述第二确定模块用于根据所述人眼区域图像的缺失信息,确定所述人眼区域图像的权重;所述第三确定模块用于根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼特征信息;所述第四确定模块用于根据所述人眼特征信息以及所述人脸姿态信息,确定人眼注视信息。The detection device in another embodiment of the present application includes a first acquisition module, a first determination module, a second determination module, a third determination module and a fourth determination module. The first acquiring module is used to acquire a human face image; the first determining module is used to determine the human eye region image and facial posture information according to the human face image; the second determining module is used to determine the human face image according to the human face The missing information of the eye area image determines the weight of the human eye area image; the third determining module is used to determine the human eye feature information according to the human eye area image and the weight of the human eye area image; The fourth determination module is configured to determine human eye gaze information according to the human eye feature information and the human facial posture information.
本申请另一实施方式的电子设备包括处理器,所述处理器用于执行人眼注视检测方法。所述人眼注视检测方法包括获取人脸图像;根据所述人脸图像确定人眼区域图像以及人脸姿态信息;根据所述人眼区域图像的缺失信息,确定所述人眼区域图像的权重;根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼特征信息;根据所述人眼特征信息以及所述人脸姿态信息,确定人眼注视信息。An electronic device according to another embodiment of the present application includes a processor, and the processor is configured to execute a human gaze detection method. The human eye gaze detection method includes acquiring a human face image; determining the human eye area image and human face posture information according to the human face image; determining the weight of the human eye area image according to the missing information of the human eye area image ; determining human eye feature information according to the human eye area image and the weight of the human eye area image; determining human eye gaze information according to the human eye feature information and the human face posture information.
本申请一个实施方式的通过人眼控制电子设备的方法包括获取人眼区域图像;根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼注视信息,其中,所述人眼区域图像的权重根据所述人眼区域图像的缺失信息确定;及根据所述人眼注视信息控制所述电子设备。According to an embodiment of the present application, the method for controlling an electronic device through human eyes includes acquiring an image of a human eye area; determining human eye gaze information according to the weight of the human eye area image and the human eye area image, wherein the human eye The weight of the area image is determined according to the missing information of the human eye area image; and the electronic device is controlled according to the human eye gaze information.
本申请实施方式的控制装置包括第一获取模块、第一确定模块和控制模块。所述第一获取模块用于获取人眼区域图像;所述第一确定模块用于根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼注视信息,其中,所述人眼区域图像的权重根据所述人眼区域图像的缺失信息确定;及所述控制模块用于根据所述人眼注视信息控制所述电子设备。The control device in the embodiment of the present application includes a first acquisition module, a first determination module and a control module. The first acquiring module is used to acquire an image of the human eye area; the first determination module is used to determine the gaze information of the human eye according to the weight of the image of the human eye area and the image of the human eye area, wherein the human eye The weight of the eye area image is determined according to the missing information of the human eye area image; and the control module is used to control the electronic device according to the human eye gaze information.
本申请再一实施方式的电子设备包括处理器,所述处理器用于执行通过人眼控制电子设备的方法。所述通过人眼控制电子设备的方法包括获取人眼区域图像;根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼注视信息,其中,所述人眼区域图像的权重根据所述人眼区域图像的缺失信息确定;及根据所述人眼注视信息控制所述电子设备。An electronic device in still another embodiment of the present application includes a processor, and the processor is configured to execute a method for controlling the electronic device through human eyes. The method for controlling an electronic device through human eyes includes acquiring an image of a human eye region; determining human eye gaze information according to the weight of the human eye region image and the human eye region image, wherein the weight of the human eye region image determining according to the missing information of the human eye area image; and controlling the electronic device according to the human eye gaze information.
本申请实施方式的一种包含计算机程序的非易失性计算机可读存储介质,当所述计算机程序被一个或多个处理器执行时,使得所述处理器执行人眼注视检测方法或通过人眼控制电子设备的方法。所述人眼注视检测方法包括获取人眼区域图像;根据所述人眼区域图像的缺失信息,确定所述人眼区域图像的权重;根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼注视信息。所述人眼控制电子设备的方法包括获取人眼区域图像;根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼注视信息,其中,所述人眼区域图像的权重根据所述人眼区域图像的缺失信息确定;及根据所述人眼注视信息控制所述电子设备。A non-transitory computer-readable storage medium containing a computer program according to an embodiment of the present application. When the computer program is executed by one or more processors, the processors execute the human eye gaze detection method or pass the human eye gaze detection method. A method of eye-controlling electronic devices. The human eye gaze detection method includes acquiring a human eye area image; determining the weight of the human eye area image according to missing information of the human eye area image; Weight, which determines the gaze information of the human eye. The method for controlling an electronic device with human eyes includes acquiring an image of a human eye region; determining human eye gaze information according to the weight of the human eye region image and the human eye region image, wherein the weight of the human eye region image is based on Determining missing information of the human eye area image; and controlling the electronic device according to the human eye gaze information.
本申请的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。Additional aspects and advantages of the application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the application.
附图说明Description of drawings
为了更清楚地说明本申请实施方式或现有技术中的技术方案,下面将对实施方式或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施方式,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some implementations of the present application. For those skilled in the art, other drawings can also be obtained according to these drawings without creative work.
图1是本申请某些实施方式的人眼注视检测方法的流程示意图;FIG. 1 is a schematic flow diagram of a human eye gaze detection method in some embodiments of the present application;
图2是本申请某些实施方式的检测装置的模块示意图;FIG. 2 is a block diagram of a detection device in some embodiments of the present application;
图3是本申请某些实施方式的电子设备的平面示意图;3 is a schematic plan view of an electronic device in some embodiments of the present application;
图4是本申请某些实施方式的电子设备和云端服务器的连接示意图;Fig. 4 is a schematic diagram of connection between an electronic device and a cloud server in some embodiments of the present application;
图5至图8是本申请某些实施方式的人眼注视检测方法的流程示意图;5 to 8 are schematic flowcharts of the human eye gaze detection method in some embodiments of the present application;
图9是本申请某些实施方式的人眼检测模型的结构示意图;9 is a schematic structural diagram of a human eye detection model in some embodiments of the present application;
图10是本申请某些实施方式的人眼注视检测方法的流程示意图;Fig. 10 is a schematic flow chart of a human eye gaze detection method in some embodiments of the present application;
图11是本申请某些实施方式的检测装置的模块示意图;Figure 11 is a block diagram of a detection device in some embodiments of the present application;
图12是本申请某些实施方式的人眼注视检测方法的流程示意图;Fig. 12 is a schematic flow chart of a human eye gaze detection method in some embodiments of the present application;
图13是本申请某些实施方式的通过人眼控制电子设备的方法的流程示意图;Fig. 13 is a schematic flowchart of a method for controlling an electronic device through human eyes in some embodiments of the present application;
图14是本申请某些实施方式的控制装置的模块示意图;Fig. 14 is a block diagram of a control device in some embodiments of the present application;
图15至图18是本申请某些实施方式的通过人眼控制电子设备的方法的场景示意图;15 to 18 are schematic diagrams of scenarios of a method for controlling an electronic device through human eyes in some embodiments of the present application;
图19至图23是本申请某些实施方式的通过人眼控制电子设备的方法的流程示意图;19 to 23 are schematic flowcharts of a method for controlling an electronic device through human eyes in some embodiments of the present application;
图24和图25是本申请某些实施方式的通过人眼控制电子设备的方法的场景示意图;FIG. 24 and FIG. 25 are schematic diagrams of scenes of a method for controlling an electronic device through human eyes in some embodiments of the present application;
图26是本申请某些实施方式的通过人眼控制电子设备的方法的流程示意图;Fig. 26 is a schematic flowchart of a method for controlling an electronic device through human eyes in some embodiments of the present application;
图27是本申请某些实施方式的人眼检测模型的训练方法的流程示意图;Fig. 27 is a schematic flowchart of a training method of a human eye detection model in some embodiments of the present application;
图28是本申请某些实施方式的训练装置的模块示意图;及Figure 28 is a schematic block diagram of a training device according to some embodiments of the present application; and
图29是本申请某些实施方式的处理器和计算机可读存储介质的连接示意图。Fig. 29 is a schematic diagram of connection between a processor and a computer-readable storage medium in some embodiments of the present application.
具体实施方式Detailed ways
以下结合附图对本申请的实施方式作进一步说明。附图中相同或类似的标号自始至终表示相同或类似的元件或具有相同或类似功能的元件。另外,下面结合附图描述的本申请的实施方式是示例性的,仅用于解释本申请的实施方式,而不能理解为对本申请的限制。Embodiments of the present application will be further described below in conjunction with the accompanying drawings. The same or similar reference numerals in the drawings represent the same or similar elements or elements having the same or similar functions throughout. In addition, the embodiments of the present application described below in conjunction with the accompanying drawings are exemplary, and are only used to explain the embodiments of the present application, and should not be construed as limiting the present application.
本申请的人眼注视检测方法包括获取人眼区域图像;根据人眼区域图像的缺失信息,确定人眼区域图像的权重;根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息。The human eye gaze detection method of the present application includes obtaining the human eye area image; determining the weight of the human eye area image according to the missing information of the human eye area image; determining the human eye gaze information according to the human eye area image and the weight of the human eye area image .
在某些实施方式中,人眼注视检测方法还包括:获取人脸姿态信息;根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息,包括:根据人脸姿态信息、人眼区域图像、人眼区域图像的权重,确定人眼注视信息。In some implementations, the human eye gaze detection method also includes: acquiring face posture information; determining the human eye gaze information according to the human eye area image and the weight of the human eye area image, including: according to the human face posture information, human eye The weight of the area image and the human eye area image determines the gaze information of the human eye.
在某些实施方式中,人眼区域图像包括左眼区域图像和右眼区域图像,根据人眼区域图像的缺失信息,确定人眼区域图像的权重,包括:根据左眼区域图像的第一缺失信息确定左眼区域图像的第一权重,以及根据右眼区域图像的第二缺失信息确定右眼区域图像的第二权重。In some embodiments, the human eye area image includes a left eye area image and a right eye area image, and determining the weight of the human eye area image according to the missing information of the human eye area image includes: according to the first missing information of the left eye area image The information determines the first weight of the image of the left eye area, and the second weight of the image of the right eye area is determined according to the second missing information of the image of the right eye area.
在某些实施方式中,人眼注视检测方法还包括:获取人脸图像,人脸图像包括人脸掩码;根据人脸掩码计算人脸相对电子设备的位置信息;根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息,包括:根据位置信息、人眼区域图像和人眼区域图像的权重,确定人眼注视信息。In some implementations, the human eye gaze detection method also includes: acquiring a face image, and the face image includes a face mask; calculating the position information of the face relative to the electronic device according to the face mask; according to the human eye area image and The weight of the human eye region image determines the human eye gaze information, including: determining the human eye gaze information according to the position information, the human eye region image, and the weight of the human eye region image.
在某些实施方式中,人眼注视检测方法还包括:获取训练样本集,训练样本集包括多个人眼区域图像;根据人眼区域图像确定遮挡区域和/或图像偏移参数;根据人眼区域图像、遮挡区域、及图像偏移参数训练人眼检测模型;根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息,包括:基于人眼检测模型,根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息。In some embodiments, the human eye gaze detection method also includes: obtaining a training sample set, the training sample set includes a plurality of human eye area images; determining the occlusion area and/or image offset parameters according to the human eye area images; Image, occlusion area, and image offset parameters to train the human eye detection model; according to the weight of the human eye area image and the human eye area image, determine the human eye gaze information, including: based on the human eye detection model, according to the human eye area image and the human eye area image The weight of the eye area image determines the gaze information of the human eye.
在某些实施方式中,根据人眼区域图像、遮挡区域、图像偏移参数训练人眼检测模型,包括:将人眼区域图像、遮挡区域、及图像偏移参数输入人眼检测模型,以输出训练坐标;基于预设的损失函数,根据人眼区域图像对应的预设坐标和训练坐标,计算损失值;根据损失值调整人眼检测模型,直至人眼检测模型收敛。In some embodiments, training the human eye detection model according to the human eye area image, the occlusion area, and the image offset parameters includes: inputting the human eye area image, the occlusion area, and the image offset parameters into the human eye detection model to output Training coordinates; based on the preset loss function, calculate the loss value according to the preset coordinates corresponding to the human eye area image and the training coordinates; adjust the human eye detection model according to the loss value until the human eye detection model converges.
在某些实施方式中,遮挡区域根据将人眼区域图像中的至少一部分像素替换为预定像素值的像素生成;图像偏移参数根据对人眼区域图像中的人眼特征点进行图像偏移生成。In some embodiments, the occlusion area is generated based on replacing at least a part of the pixels in the image of the human eye area with pixels of predetermined pixel values; the image offset parameter is generated based on image offset of the feature points of the human eye area in the image of the human eye area .
本申请的人眼注视检测方法包括获取人脸图像;根据人脸图像确定人眼区域图像以及人脸姿态信息;根据人眼区域图像的缺失信息,确定人眼区域图像的权重;根据人眼区域图像和人眼区域图像的权重,确定人眼特征信息;根据人眼特征信息以及人脸姿态信息,确定人眼注视信息。The human eye gaze detection method of the present application includes obtaining a human face image; determining the human eye area image and human face posture information according to the human face image; determining the weight of the human eye area image according to the missing information of the human eye area image; The weight of the image and the image of the human eye area determines the characteristic information of the human eye; according to the characteristic information of the human eye and the posture information of the human face, the gaze information of the human eye is determined.
在某些实施方式中,人脸图像包括人脸掩码,根据人眼特征信息以及人脸姿态信息,确定人眼注视信息,包括:根据人脸掩码计算人脸相对电子设备的位置信息;根据位置信息、人眼特征信息以及人脸姿态信息,确定人眼注视信息。In some embodiments, the face image includes a face mask, and determining the gaze information of the human eye according to the feature information of the human eye and the posture information of the human face includes: calculating the position information of the human face relative to the electronic device according to the face mask; According to position information, human eye feature information, and human face posture information, human eye gaze information is determined.
本申请的通过人眼控制电子设备的方法包括获取人眼区域图像;根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息,其中,人眼区域图像的权重根据人眼区域图像的缺失信息确定;及根据人眼注视信息控制电子设备。The method for controlling an electronic device through human eyes of the present application includes acquiring an image of a human eye region; determining human eye gaze information according to the weight of the human eye region image Determining the missing information of ; and controlling electronic equipment according to the gaze information of human eyes.
在某些实施方式中,通过人眼控制电子设备的方法还包括:获取人脸姿态信息;根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息,包括:根据人脸姿态信息、人眼区域图像、人眼区域图像的权重,确定人眼注视信息。In some implementations, the method for controlling an electronic device through human eyes further includes: obtaining face posture information; determining human eye gaze information according to the human eye area image and the weight of the human eye area image, including: according to the human face posture information , the human eye area image, and the weight of the human eye area image to determine the gaze information of the human eye.
在某些实施方式中,人眼区域图像包括左眼区域图像和右眼区域图像,左眼区域图像的第一权重根据左眼区域图像的第一缺失信息确定,右眼区域图像的第二权重根据右眼区域图像的第二缺失信息确定。In some embodiments, the human eye area image includes a left eye area image and a right eye area image, the first weight of the left eye area image is determined according to the first missing information of the left eye area image, and the second weight of the right eye area image Determined according to the second missing information of the right-eye region image.
在某些实施方式中,通过人眼控制电子设备的方法还包括:获取人脸图像,人脸图像包括人脸掩码;根据人脸掩码计算人脸相对电子设备的位置信息;根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息,包括:根据位置信息、人眼区域图像和人眼区域图像的权重,确定人眼注视信息。In some embodiments, the method for controlling an electronic device through human eyes further includes: acquiring a face image, and the face image includes a face mask; calculating the position information of the face relative to the electronic device according to the face mask; The weight of the area image and the human eye area image determines the human eye gaze information, including: determining the human eye gaze information according to the position information, the human eye area image, and the weight of the human eye area image.
在某些实施方式中,通过人眼控制电子设备的方法还包括:获取训练样本集,训练样本集包括多个人眼区域图像;根据人眼区域图像确定遮挡区域和/或图像偏移参数;根据人眼区域图像、遮挡区域、及图像偏移参数训练人眼检测模型;根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息,包括:基于人眼检测模型,根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息。In some embodiments, the method for controlling an electronic device through human eyes further includes: obtaining a training sample set, the training sample set includes a plurality of human eye area images; determining the occlusion area and/or image offset parameters according to the human eye area images; Human eye area image, occlusion area, and image offset parameters train the human eye detection model; according to the human eye area image and the weight of the human eye area image, determine the human eye gaze information, including: based on the human eye detection model, according to the human eye area The weight of the image and the image of the human eye area determines the gaze information of the human eye.
在某些实施方式中,根据人眼区域图像、遮挡区域、图像偏移参数训练人眼检测模型,包括:将人眼区域图像、遮挡区域、及图像偏移参数输入人眼检测模型,以输出训练坐标;基于预设的损失函数,根据人眼区域图像对应的预设坐标和训练坐标,计算损失值;根据损失值调整人眼检测模型,直至人眼检测模型收敛。In some embodiments, training the human eye detection model according to the human eye area image, the occlusion area, and the image offset parameters includes: inputting the human eye area image, the occlusion area, and the image offset parameters into the human eye detection model to output Training coordinates; based on the preset loss function, calculate the loss value according to the preset coordinates corresponding to the human eye area image and the training coordinates; adjust the human eye detection model according to the loss value until the human eye detection model converges.
在某些实施方式中,遮挡区域根据将人眼区域图像中的至少一部分像素替换为预定像素值的像素生成;图像偏移参数根据对人眼区域图像中的人眼特征点进行图像偏移生成。In some embodiments, the occlusion area is generated based on replacing at least a part of the pixels in the image of the human eye area with pixels of predetermined pixel values; the image offset parameter is generated based on image offset of the feature points of the human eye area in the image of the human eye area .
在某些实施方式中,人眼注视信息包括注视点坐标,在获取人眼区域图像之前,通过人眼控制电子设备的方法,还包括:在息屏前的第一预定时长内,获取拍摄图像;响应于拍摄图像中包含人脸;根据人眼注视信息控制电子设备,还 包括响应于注视点坐标位于显示屏的显示区域,持续亮屏第二预定时长。In some implementations, the gaze information of the human eye includes the coordinates of the gaze point. Before acquiring the image of the human eye area, the method of controlling the electronic device through the human eye further includes: acquiring the captured image within the first predetermined time period before the screen is off. ; in response to a human face being included in the photographed image; controlling the electronic device according to the gaze information of the human eyes, further comprising, in response to the gaze point coordinates being located in the display area of the display screen, continuing to brighten the screen for a second predetermined duration.
在某些实施方式中,显示区域与预设坐标范围相关联,通过人眼控制电子设备的方法还包括:在注视点坐标位于预设坐标范围内时,确定注视点坐标位于显示区域。In some implementations, the display area is associated with a preset coordinate range, and the method for controlling an electronic device through human eyes further includes: when the gaze point coordinates are within the preset coordinate range, determining that the gaze point coordinates are located in the display area.
在某些实施方式中,在获取人眼区域图像之前,通过人眼控制电子设备的方法,还包括:响应于电子设备未接收到输入操作的情况,获取拍摄图像;根据人眼注视信息控制电子设备,包括:响应于拍摄图像中包含人脸且注视点坐标位于显示区域,调节显示屏的显示亮度至第一预定亮度;响应于拍摄图像中不包含人脸、或拍摄图像中包含人脸且注视点坐标位于显示区域之外,调节显示亮度至第二预定亮度,第二预定亮度小于第一预定亮度。In some implementations, before acquiring the image of the human eye region, the method for controlling the electronic device through the human eye further includes: acquiring the captured image in response to the fact that the electronic device does not receive an input operation; controlling the electronic device according to the gaze information of the human eye The device includes: adjusting the display brightness of the display screen to a first predetermined brightness in response to the captured image containing a human face and the gaze point coordinates are located in the display area; in response to the captured image not containing a human face, or the captured image containing a human face and The gaze point coordinates are located outside the display area, and the display brightness is adjusted to a second predetermined brightness, and the second predetermined brightness is smaller than the first predetermined brightness.
本申请的检测装置包括第一获取模块、第一确定模块和第二确定模块。第一获取模块,用于获取人眼区域图像;第一确定模块,用于根据人眼区域图像的缺失信息,确定人眼区域图像的权重;第二确定模块,用于根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息。The detection device of the present application includes a first acquisition module, a first determination module and a second determination module. The first acquisition module is used to acquire the image of the human eye region; the first determination module is used to determine the weight of the human eye region image according to the missing information of the human eye region image; the second determination module is used to determine the weight of the human eye region image according to the human eye region image and The weight of the image of the human eye area determines the gaze information of the human eye.
本申请的检测装置包括第一获取模块、第一确定模块、第二确定模块、第三确定模块和第四确定模块。第一获取模块,用于获取人眼区域图像;第一确定模块,用于根据人脸图像确定人眼区域图像以及人脸姿态信息;第二确定模块,用于根据人眼区域图像的缺失信息,确定人眼区域图像的权重;第三确定模块,用于根据人眼区域图像和人眼区域图像的权重,确定人眼特征信息;第四确定模块,用于根据人眼特征信息以及人脸姿态信息,确定人眼注视信息。The detection device of the present application includes a first acquisition module, a first determination module, a second determination module, a third determination module and a fourth determination module. The first acquisition module is used to acquire the image of the human eye region; the first determination module is used to determine the image of the human eye region and the facial posture information according to the face image; the second determination module is used to determine the missing information of the human eye region image , to determine the weight of the human eye area image; the third determination module is used to determine the human eye feature information according to the human eye area image and the weight of the human eye area image; the fourth determination module is used to determine the human eye feature information according to the human eye feature information and the face Posture information, to determine the gaze information of human eyes.
本申请的控制装置包括第一获取模块、第一确定模块和控制模块。第一获取模块用于获取人眼区域图像;第一确定模块,用于根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息,其中,人眼区域图像的权重根据人眼区域图像的缺失信息确定;及控制模块用于根据人眼注视信息控制电子设备。The control device of the present application includes a first acquisition module, a first determination module and a control module. The first acquisition module is used to acquire the human eye area image; the first determination module is used to determine the human eye gaze information according to the human eye area image and the weight of the human eye area image, wherein the weight of the human eye area image is based on the human eye area The missing information of the image is determined; and the control module is used to control the electronic equipment according to the gaze information of human eyes.
本申请的电子设备包括处理器,处理器用于执行上述任一实施方式的人眼注视检测方法。The electronic device of the present application includes a processor, and the processor is configured to execute the human gaze detection method in any one of the foregoing implementation manners.
本申请的电子设备包括处理器,处理器用于执行上述任一实施方式的通过人眼控制电子设备的方法。The electronic device of the present application includes a processor, and the processor is configured to execute the method for controlling an electronic device through human eyes in any one of the foregoing implementation manners.
本申请的非易失性计算机可读存储介质包括计算机程序。计算机程序被处理器执行时,使得处理器执行上述任一实施方式的人眼注视检测方法;或上述任一实施方式的通过人眼控制电子设备的方法。The non-transitory computer-readable storage medium of the present application includes a computer program. When the computer program is executed by the processor, the processor executes the human eye gaze detection method of any of the above embodiments; or the method of controlling an electronic device through human eyes of any of the above embodiments.
请参阅图1至图3,本申请实施方式的人眼注视检测方法包括以下步骤:Please refer to Fig. 1 to Fig. 3, the human eye fixation detection method of the embodiment of the present application comprises the following steps:
011:获取人眼区域图像;011: Obtain the image of the human eye area;
013:根据人眼区域图像的缺失信息,确定人眼区域图像的权重;013: According to the missing information of the human eye area image, determine the weight of the human eye area image;
015:根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息。015: According to the weight of the human eye area image and the human eye area image, determine the human eye gaze information.
本申请实施方式的检测装置10包括第一获取模块11、第一确定模块12和第二确定模块13。第一获取模块11用于获取人眼区域图像;第一确定模块12用于根据人眼区域图像的缺失信息,确定人眼区域图像的权重;第二确定模块13用于根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息。也即是说,步骤011可以由第一获取模块11实现、步骤013可以由第一确定模块12执行和步骤015可以由第二确定模块13执行。The detection device 10 in the embodiment of the present application includes a first acquisition module 11 , a first determination module 12 and a second determination module 13 . The first acquiring module 11 is used to acquire the human eye region image; the first determining module 12 is used to determine the weight of the human eye region image according to the missing information of the human eye region image; the second determining module 13 is used to determine the weight of the human eye region image according to the human eye region image and The weight of the image of the human eye area determines the gaze information of the human eye. That is to say, step 011 can be implemented by the first acquisition module 11 , step 013 can be performed by the first determination module 12 and step 015 can be performed by the second determination module 13 .
本申请实施方式的电子设备100包括处理器60和采集装置30。采集装置30用于按预定帧率采集人脸信息(人脸信息包括人脸图像,如人脸的可见光图像、红外图像、深度图像等);采集装置30可以是可见光相机、红外相机、深度相机中的一种或多种,其中,可见光相机可采集可见光人脸图像、红外相机可采集红外人脸图像、深度相机可采集深度人脸图像,本实施方式中,采集装置30包括可见光相机、红外相机和深度相机,采集装置30同时可见光人脸图像、红外人脸图像和深度人脸图像。处理器60可包括图像处理器(Image Signal Processor,ISP),神经网络处理器(Neural-Network Processing Unit,NPU)和应用处理器(Application Processor,AP),检测装置10设置在电子设备100内,其中,第一获取模块11可设置在ISP,处理器60与采集装置30连接,在采集装置30采集到人脸图像后,ISP可对人脸图像进行处理,以获取人眼区域图像,第一确定模块12也可设置在ISP,第二确定模块13可设置在NPU。处理器60(具体可以是ISP)用于根据人眼区域图像的缺失信息,确定人眼区域图像的权重;处理器60(具体可以是NPU)还用于根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息。也即是说,步骤011可以由采集装置30配合处理器60执行、步骤013和步骤015可以由处理器60执行。The electronic device 100 in the embodiment of the present application includes a processor 60 and a collection device 30 . Acquisition device 30 is used for collecting face information by predetermined frame rate (face information comprises people's face image, as the visible light image of people's face, infrared image, depth image etc.); Acquisition device 30 can be visible light camera, infrared camera, depth camera One or more of them, wherein the visible light camera can collect visible light face images, the infrared camera can collect infrared face images, and the depth camera can collect depth face images. In this embodiment, the collection device 30 includes a visible light camera, an infrared face image camera and depth camera, the acquisition device 30 simultaneously visible light face image, infrared face image and depth face image. The processor 60 may include an image processor (Image Signal Processor, ISP), a neural network processor (Neural-Network Processing Unit, NPU) and an application processor (Application Processor, AP), and the detection device 10 is arranged in the electronic device 100, Wherein, the first acquisition module 11 can be arranged in the ISP, and the processor 60 is connected to the acquisition device 30. After the acquisition device 30 acquires the face image, the ISP can process the face image to obtain the human eye area image, the first The determination module 12 can also be set at the ISP, and the second determination module 13 can be set at the NPU. The processor 60 (specifically, it can be an ISP) is used to determine the weight of the human eye region image according to the missing information of the human eye region image; the processor 60 (specifically, it can be an NPU) is also used to The weight of is used to determine the gaze information of human eyes. That is to say, step 011 can be executed by the collection device 30 in cooperation with the processor 60 , and steps 013 and 015 can be executed by the processor 60 .
电子设备100可以是手机、智能手表、平板电脑、显示设备、笔记本电脑、柜员机、闸机、头显设备、游戏机等。如图3所示,本申请实施方式以电子设备100是手机为例进行说明,可以理解,电子设备100的具体形式并不限于手机。The electronic device 100 may be a mobile phone, a smart watch, a tablet computer, a display device, a notebook computer, a teller machine, a gate, a head-mounted display device, a game machine, and the like. As shown in FIG. 3 , the embodiment of the present application is described by taking the electronic device 100 as a mobile phone as an example. It can be understood that the specific form of the electronic device 100 is not limited to the mobile phone.
具体地,在用户使用电子设备100时,采集装置30可间隔预定时长采集一次用户的人脸信息,在保证电子设备100的功耗较小的情况,持续对用户进行注视检测,或者,在用户使用需要进行注视检测的应用程序(如浏览器软件、贴吧软件、视频软件等)时,再按预定帧数(如每秒10帧)采集人脸信息,从而在有注视检测需求时才进行人脸信息采集,最大化的降低了注视检测的功耗。Specifically, when the user uses the electronic device 100, the collection device 30 can collect the user's face information once at a predetermined time interval, and continue to perform gaze detection on the user while ensuring that the power consumption of the electronic device 100 is small, or, when the user When using applications that require gaze detection (such as browser software, post bar software, video software, etc.), collect face information according to a predetermined number of frames (such as 10 frames per second), so that human face information is only performed when there is a gaze detection requirement. Face information collection minimizes the power consumption of gaze detection.
请参阅图4,在获取到人脸信息(以人脸图像为例)后,处理器60可对人脸图像进行识别,例如处理器60可将人 脸图像和预设人脸模板进行比对,从而确定人脸图像中的人脸及人脸的不同部位(如眼睛、鼻子等)所在的图像区域,以识别人脸图像中的人眼区域,从而获取人眼区域图像,其中,预设人脸模板可存储在电子设备100的存储器内,处理器60可在可信执行环境(Trusted Execution Environment,TEE)内进行人脸识别,以保证用户的隐私;或者,预设人脸模板可存储在云端服务器200,然后由电子设备100将人脸图像发送到云端服务器200进行比对以确定人眼区域图像,将人脸识别交给云端服务器200进行处理,可降低电子设备100的处理量并提升图像处理效率;然后,处理器60可对人眼区域图像进行识别,以确定人眼的缺失信息,具体地,人眼较为光滑,对光线的反射率较高,相较于人脸的其他部位,人眼在图像中的像素值会较大,因此,可通过设置检测阈值,来确定像素是否位于人眼(如像素的像素值大于检测阈值时确定像素位于人眼),从而确定人眼区域图像中,人眼的图像部分,而人眼的形状也是基本确定的近似椭圆形,根据对识别到的人眼的图像部分和人眼的预设形状,即可确定人眼缺失的部分,从而确定缺失信息,缺失信息可包括人眼缺失的部分占人眼的比例。Please refer to Fig. 4, after obtaining the face information (taking the face image as an example), the processor 60 can identify the face image, for example, the processor 60 can compare the face image with the preset face template , so as to determine the image area where the face in the face image and different parts of the face (such as eyes, nose, etc.) are located, to identify the eye area in the face image, thereby obtaining the eye area image, wherein The face template can be stored in the memory of the electronic device 100, and the processor 60 can perform face recognition in a trusted execution environment (Trusted Execution Environment, TEE) to ensure the privacy of the user; or, the preset face template can be stored In the cloud server 200, the electronic device 100 then sends the face image to the cloud server 200 for comparison to determine the image of the human eye area, and the face recognition is handed over to the cloud server 200 for processing, which can reduce the processing capacity of the electronic device 100 and Improving image processing efficiency; then, the processor 60 can identify the image of the human eye area to determine the missing information of the human eye. Specifically, the human eye is relatively smooth and has a high reflectivity to light, compared to other parts of the human face. Therefore, by setting the detection threshold, it can be determined whether the pixel is located in the human eye (for example, when the pixel value of the pixel is greater than the detection threshold, it is determined that the pixel is located in the human eye), so as to determine whether the pixel is located in the human eye. In the regional image, the image part of the human eye, and the shape of the human eye is basically determined as an approximate ellipse. According to the recognized image part of the human eye and the preset shape of the human eye, the missing part of the human eye can be determined. The missing information is thus determined, and the missing information may include the proportion of the missing part of the human eye to the human eye.
处理器60根据缺失信息,即可确定人眼区域图像的权重,例如,人眼缺失的部分占人眼的比例越大,则人眼区域图像的权重越小;可以理解,人眼缺失的部分占人眼的比例越大,则表示人眼被遮挡的程度越大,人眼区域图像的准确性就越差,因此,给予较小的权重可降低人眼区域图像对后续计算人眼注视信息的准确性的影响,提升注视检测准确性。The processor 60 can determine the weight of the human eye area image according to the missing information. For example, the larger the proportion of the missing part of the human eye to the human eye, the smaller the weight of the human eye area image; it can be understood that the missing part of the human eye The larger the proportion of the human eye, the greater the degree of occlusion of the human eye, and the worse the accuracy of the human eye area image. Therefore, giving a smaller weight can reduce the impact of the human eye area image on the subsequent calculation of human eye gaze information. The influence of accuracy, improve the accuracy of gaze detection.
在一个实施方式中,人眼区域图像包括左眼区域图像和右眼区域图像,处理器60可分别根据左眼区域图像的第一缺失信息来确定左眼区域图像的第一权重,根据右眼区域图像的第二缺失信息来确定右眼区域图像的第二权重,从而分别确定左眼区域图像的第一权重和右眼区域图像的第二权重。例如,第一权重和第一缺失信息(如左眼缺失的部分占左眼的比例)呈负相关关系,第二权重和第二缺失信息(如右眼缺失的部分占右眼的比例)呈负相关关系,在左眼区域图像的第一权重较小(如为0.6)时,可降低左眼区域图像对人眼注视信息计算的影响(如通过减少从左眼区域图像的特征点数量来降低影响)。In one embodiment, the human eye area image includes a left eye area image and a right eye area image, and the processor 60 can respectively determine the first weight of the left eye area image according to the first missing information of the left eye area image, and the first weight of the left eye area image according to the right eye area image. The second missing information of the region image is used to determine the second weight of the right-eye region image, thereby respectively determining the first weight of the left-eye region image and the second weight of the right-eye region image. For example, the first weight is negatively correlated with the first missing information (such as the proportion of the missing part of the left eye to the left eye), and the second weight is negatively correlated with the second missing information (such as the proportion of the missing part of the right eye to the right eye). Negative correlation, when the first weight of the left-eye region image is small (such as 0.6), it can reduce the impact of the left-eye region image on the calculation of human gaze information (such as by reducing the number of feature points from the left-eye region image to reduce the impact).
在获取到人眼区域图像,并确定了人眼区域图像的权重后,即可根据人眼区域图像及其权重计算人眼注视信息。例如,注视信息包括注视方向和注视点坐标,处理器60通过对人眼区域图像中左眼区域和右眼区域分别进行特征提取,从而确定人眼的注视方向以及人眼在电子设备100的显示屏40所在的平面的注视点坐标。After the image of the human eye region is acquired and the weight of the image of the human eye region is determined, the gaze information of the human eye can be calculated according to the image of the human eye region and its weight. For example, the gaze information includes the gaze direction and the coordinates of the gaze point, and the processor 60 performs feature extraction on the left eye area and the right eye area in the human eye area image, thereby determining the gaze direction of the human eye and the display of the human eye on the electronic device 100 The gaze point coordinates of the plane where the screen 40 is located.
在得到注视方向和注视点坐标后,即可根据注视方向和注视点坐标实现电子设备100的控制。如在检测到注视点坐标位于显示屏40的显示区域时,保持屏幕始终点亮,而在检测到注视点坐标位于显示屏40的显示区域之外时预定时长(如10S、20S等),则关闭屏幕。After the gaze direction and gaze point coordinates are obtained, the electronic device 100 can be controlled according to the gaze direction and gaze point coordinates. If it is detected that the gaze point coordinates are located in the display area of the display screen 40, keep the screen always on, and when it is detected that the gaze point coordinates are located outside the display area of the display screen 40, a predetermined duration (such as 10S, 20S, etc.), then Turn off the screen.
电子设备100采集的人脸图像中,可能因遮挡等原因,使得眼部区域图像不完整,从而影响了注视点的检测准确性。In the face image collected by the electronic device 100 , the image of the eye area may be incomplete due to reasons such as occlusion, thereby affecting the accuracy of gaze point detection.
本申请的人眼注视检测方法、检测装置10和电子设备100,通过获取人眼区域图像,并通过人眼区域图像的缺失信息,来确定人眼区域图像所占的权重,在根据人眼区域图像确定人眼注视信息时,将人眼区域图像的权重作为考虑因素,从而有利于降低人眼被遮挡导致人眼区域图像出现缺失,对计算人眼注视信息的准确性的影响,可提升人眼区域图像缺失的情况下,人眼注视检测的准确性。The human eye gaze detection method, detection device 10, and electronic device 100 of the present application determine the weight of the human eye area image by acquiring the human eye area image and the missing information of the human eye area image. When the image determines the gaze information of the human eye, the weight of the image of the human eye area is considered as a factor, which is beneficial to reduce the impact of the lack of image of the human eye area caused by the occlusion of the human eye, and the impact on the accuracy of the calculation of the gaze information of the human eye, which can improve the accuracy of human eye gaze information. Accuracy of human eye gaze detection in the absence of eye region images.
请参阅图2、图3和图5,在某些实施方式中,人眼注视检测方法还包括:Please refer to Fig. 2, Fig. 3 and Fig. 5, in some embodiments, the human eye gaze detection method also includes:
0141:获取人脸姿态信息。0141: Obtain face pose information.
步骤015包括:Step 015 includes:
0151:根据人脸姿态信息、人眼区域图像、人眼区域图像的权重,确定人眼注视信息。0151: Determine human eye gaze information based on face posture information, human eye area images, and weights of human eye area images.
在某些实施方式中,检测装置10还包括第二获取模块14,第二获取模块14同样可设置在ISP,以用于获取人脸姿态信息。第二确定模块13还用于根据人脸姿态信息、人眼区域图像、人眼区域图像的权重,确定人眼注视信息。也即是说,步骤0141可以由第二获取模块14执行,步骤0151可以由第二确定模块13执行。In some implementations, the detection device 10 further includes a second acquisition module 14, which can also be set in the ISP to acquire face pose information. The second determining module 13 is further configured to determine human eye gaze information according to human face posture information, human eye region images, and weights of human eye region images. That is to say, step 0141 may be performed by the second obtaining module 14 , and step 0151 may be performed by the second determining module 13 .
在某些实施方式中,处理器60还用于获取人脸姿态信息、及根据人脸姿态信息、人眼区域图像、人眼区域图像的权重,确定人眼注视信息。也即是说,步骤0141和步骤0151可以由处理器60执行。In some implementations, the processor 60 is further configured to acquire face pose information, and determine human eye gaze information according to the face pose information, the human eye region image, and the weight of the human eye region image. That is to say, step 0141 and step 0151 can be executed by the processor 60 .
具体地,在计算得到人眼注视信息之前,处理器60还可获取人脸姿态信息,人脸姿态信息可通过对人脸图像进行特征提取,根据提取得到的特征点的位置坐标来计算人脸姿态信息,可以理解,人脸的不同姿态(如以鼻尖为原点建立三维坐标系,人脸的俯仰角、水平转动角、倾斜角分别表示人脸相对于三维坐标系的三个坐标轴的旋转角度等),均会影响用户的注视方向和注视点坐标。因此,在计算人眼注视信息时,除了获取人眼区域图像及其权重外,还会结合人脸姿态信息,从而更为准确地计算注视方向和注视点坐标。Specifically, before calculating the gaze information of the human eyes, the processor 60 can also obtain face posture information, and the face posture information can be calculated according to the position coordinates of the extracted feature points by performing feature extraction on the face image. Posture information, it can be understood that different postures of the face (such as establishing a three-dimensional coordinate system with the tip of the nose as the origin, and the pitch angle, horizontal rotation angle, and tilt angle of the face represent the rotation of the face relative to the three coordinate axes of the three-dimensional coordinate system Angle, etc.), will affect the user's gaze direction and gaze point coordinates. Therefore, when calculating the gaze information of the human eye, in addition to obtaining the image of the human eye area and its weight, it will also combine the facial posture information to more accurately calculate the gaze direction and gaze point coordinates.
请参阅图2、图3和图6,在某些实施方式中,人眼注视检测方法还包括:Please refer to Fig. 2, Fig. 3 and Fig. 6, in some embodiments, the human eye gaze detection method also includes:
0142:获取人脸图像,人脸图像包括人脸掩码;0142: Obtain a face image, where the face image includes a face mask;
0143:根据人脸掩码计算人脸相对电子设备100的位置信息;0143: Calculate the position information of the face relative to the electronic device 100 according to the face mask;
步骤015包括:Step 015 includes:
0152:根据位置信息、人眼区域图像和人眼区域图像的权重,确定人眼注视信息。0152: Determine the gaze information of the human eye according to the position information, the human eye area image, and the weight of the human eye area image.
在某些实施方式中,检测装置10还包括第三获取模块15和计算模块16,第三获取模块15和计算模块16可均设置在ISP,第三获取模块15用于获取人脸图像,计算模块16用于根据人脸掩码计算人脸相对电子设备100的位置信息。也即是说,步骤0142可以由第三获取模块15执行,步骤0143可以由计算模块16执行,步骤0152可以由第二确定模块13执行。In some embodiments, the detection device 10 also includes a third acquisition module 15 and a calculation module 16, both of the third acquisition module 15 and the calculation module 16 can be set at the ISP, and the third acquisition module 15 is used to acquire a face image, calculate The module 16 is used for calculating the position information of the face relative to the electronic device 100 according to the face mask. That is to say, step 0142 can be performed by the third acquisition module 15 , step 0143 can be performed by the calculation module 16 , and step 0152 can be performed by the second determination module 13 .
在某些实施方式中,处理器60还用于获取人脸图像,人脸图像包括人脸掩码;根据人脸掩码计算人脸相对电子设备100的位置信息;根据位置信息、人眼区域图像和人眼区域图像的权重,确定人眼注视信息。。也即是说,步骤0142、步骤0143和步骤0152可以由处理器60执行。In some implementations, the processor 60 is also used to acquire a face image, and the face image includes a face mask; calculate the position information of the face relative to the electronic device 100 according to the face mask; The weight of the image and the image of the human eye area determines the gaze information of the human eye. . That is to say, step 0142 , step 0143 and step 0152 may be executed by the processor 60 .
具体地,在计算得到人眼注视信息之前,处理器60还可获取人脸图像,并确定人脸图像的人脸掩码,人脸掩码用于表征人脸在人脸图像中的位置,人脸掩码可通过识别人脸图像中的人脸的位置确定,处理器60根据人脸掩码可计算人脸相对电子设备100的位置信息(如根据人脸掩码占人脸图像的比例,可计算人脸和电子设备100的距离),可以理解,人脸和电子设备100的距离变化时,即使人眼注视方向未发生改变,人眼的注视点坐标依旧会发生变化,因此,在计算人眼注视信息时,除了获取人眼区域图像及其权重外,还会结合位置信息,从而更为准确地计算注视点坐标。Specifically, before calculating the gaze information of the human eyes, the processor 60 may also obtain a face image, and determine a face mask of the face image, where the face mask is used to characterize the position of the face in the face image, The face mask can be determined by identifying the position of the face in the face image, and the processor 60 can calculate the position information of the face relative to the electronic device 100 according to the face mask (such as according to the ratio of the face mask to the face image) , can calculate the distance between the human face and the electronic device 100), it can be understood that when the distance between the human face and the electronic device 100 changes, even if the gaze direction of the human eye does not change, the gaze point coordinates of the human eye will still change. Therefore, in When calculating the gaze information of the human eye, in addition to obtaining the image of the human eye area and its weight, it will also combine the position information to calculate the coordinates of the gaze point more accurately.
在其他实施方式中,在计算人眼注视信息时,除了获取人眼区域图像及其权重外,还可同时结合人脸姿态信息及位置信息,从而更为准确地计算人眼注视信息。In other implementations, when calculating the gaze information of the human eye, in addition to acquiring the image of the eye region and its weight, it may also be combined with facial posture information and position information, so as to calculate the gaze information of the human eye more accurately.
请参阅图2、图3和图7,在某些实施方式中,人眼注视检测方法还包括:Please refer to Fig. 2, Fig. 3 and Fig. 7, in some embodiments, the human eye gaze detection method also includes:
0101:获取训练样本集,训练样本集包括多个人眼区域图像;0101: Obtain a training sample set, the training sample set includes multiple human eye area images;
0102:根据人眼区域图像确定遮挡区域和/或图像偏移参数;0102: Determine the occlusion area and/or image offset parameters according to the human eye area image;
0103:根据人眼区域图像、遮挡区域、及图像偏移参数训练人眼检测模型。0103: Train the human eye detection model according to the human eye area image, occlusion area, and image offset parameters.
步骤015包括:Step 015 includes:
0153:基于人眼检测模型,根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息。0153: Based on the human eye detection model, determine the human eye gaze information according to the human eye area image and the weight of the human eye area image.
在某些实施方式中,检测装置10还包括第四获取模块17、第三确定模块18和训练模块19。第四获取模块17、第三确定模块18和训练模块19均可设置在NPU,以进行人眼检测模型的训练。第四获取模块17用于获取训练样本集、第三确定模块18用于根据人眼区域图像确定遮挡区域和/或图像偏移参数;训练模块19用于根据人眼区域图像、遮挡区域、及图像偏移参数训练人眼检测模型。第二确定模块13可用于基于人眼检测模型,根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息。也即是说,步骤0101可以由第四获取模块17执行、步骤0102可以由第三确定模块18执行、步骤0103可以由训练模块19执行,步骤0153可以由第二确定模块13执行。In some embodiments, the detection device 10 further includes a fourth acquisition module 17 , a third determination module 18 and a training module 19 . The fourth acquiring module 17, the third determining module 18 and the training module 19 can all be set in the NPU to train the human eye detection model. The fourth acquisition module 17 is used to obtain the training sample set, the third determination module 18 is used to determine the occlusion area and/or image offset parameters according to the human eye area image; the training module 19 is used to determine the human eye area image, the occlusion area, and Image offset parameters to train the human eye detection model. The second determining module 13 may be configured to determine human eye gaze information based on the human eye detection model and according to the human eye region image and the weight of the human eye region image. That is to say, step 0101 can be performed by the fourth acquisition module 17 , step 0102 can be performed by the third determination module 18 , step 0103 can be performed by the training module 19 , and step 0153 can be performed by the second determination module 13 .
在某些实施方式中,处理器60还用于获取训练样本集,训练样本集包括多个人眼区域图像;根据人眼区域图像确定遮挡区域和/或图像偏移参数;根据人眼区域图像、遮挡区域、及图像偏移参数训练人眼检测模型;基于人眼检测模型,根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息。也即是说,步骤0101、步骤0102、步骤0103和步骤0153可以由处理器60执行。In some embodiments, the processor 60 is further configured to obtain a training sample set, the training sample set includes a plurality of human eye area images; determine the occlusion area and/or image offset parameters according to the human eye area images; according to the human eye area images, The occlusion area and image offset parameters train the human eye detection model; based on the human eye detection model, the human eye gaze information is determined according to the weight of the human eye area image and the human eye area image. That is to say, step 0101 , step 0102 , step 0103 and step 0153 may be executed by the processor 60 .
具体的,本申请可通过预设的人眼检测模型实现人眼注视信息的计算,即基于人眼检测模型,根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息,为了保证人眼注视信息的准确性,需要先对人眼检测模型进行训练,使得人眼检测模型收敛。Specifically, this application can realize the calculation of human eye gaze information through the preset human eye detection model, that is, based on the human eye detection model, determine the human eye gaze information according to the weight of the human eye area image and the human eye area image, in order to ensure that people To ensure the accuracy of eye gaze information, it is necessary to train the human eye detection model first, so that the human eye detection model converges.
在训练时,为了使得人眼检测模型能够在人眼区域图像被遮挡的情况仍准确地的计算出人眼注视信息,因此,可预先选取多个人眼区域图像作为训练样本集,选取的人眼区域图像可包括遮挡区域和/或图像偏移参数,其中,遮挡区域通过将人眼区域图像中的至少一部分像素替换为预定像素值(如0)的像素生成,遮挡区域用于人眼区域图像被遮挡的情况,当然,为了保证人脸姿态信息的计算准确性,遮挡区域应不遮挡眉毛、眼睛、嘴巴、鼻子等人脸相关部位;图像偏移参数通过对人眼区域图像中的人眼特征点进行图像偏移生成,图像偏移参数用于表示对人眼特征点检测出现偏差(如人眼特征点的坐标存在偏差)的情况。During training, in order to enable the human eye detection model to accurately calculate the gaze information of the human eye even when the image of the human eye area is occluded, multiple images of the human eye area can be selected in advance as the training sample set, and the selected human eye area The area image may include an occlusion area and/or image offset parameters, wherein the occlusion area is generated by replacing at least a part of pixels in the human eye area image with pixels of a predetermined pixel value (such as 0), and the occlusion area is used for the human eye area image In the case of being occluded, of course, in order to ensure the accuracy of the calculation of the face pose information, the occluded area should not block the eyebrows, eyes, mouth, nose and other related parts of the face; The image offset generation is performed on the point, and the image offset parameter is used to indicate the deviation of the detection of the feature points of the human eye (such as the deviation of the coordinates of the feature points of the human eye).
如此,通过具有遮挡区域和/或图像偏移参数的人眼区域图像来对人眼检测模型进行训练,可使得训练至收敛的人眼检测模型在进行人眼注视信息检测时,最大化的降低人眼被遮挡以及人眼特征点检测偏移带来的影响,可保证注视检测的准确性。In this way, the human eye detection model is trained by using the human eye area image with the occlusion area and/or image offset parameters, so that the human eye detection model trained to convergence can minimize the reduction in the human eye gaze information detection. The impact of the occlusion of the human eye and the deviation of the detection of the feature points of the human eye can ensure the accuracy of gaze detection.
请参阅图2、图3和图8,在某些实施方式中,步骤0103包括:Referring to Fig. 2, Fig. 3 and Fig. 8, in some embodiments, step 0103 includes:
01031:将人眼区域图像、遮挡区域、及图像偏移参数输入人眼检测模型,以输出训练坐标;01031: Input the human eye area image, occlusion area, and image offset parameters into the human eye detection model to output training coordinates;
01032:基于预设的损失函数,根据人眼区域图像对应的预设坐标和训练坐标,计算损失值;01032: Based on the preset loss function, calculate the loss value according to the preset coordinates and training coordinates corresponding to the human eye area image;
01033:根据损失值调整人眼检测模型,直至人眼检测模型收敛。01033: Adjust the eye detection model according to the loss value until the eye detection model converges.
在某些实施方式中,训练模块19还用于将人眼区域图像、遮挡区域、及图像偏移参数输入人眼检测模型,以输出训练坐标;基于预设的损失函数,根据人眼区域图像对应的预设坐标和训练坐标,计算损失值;根据损失值调整人眼检测模型,直至人眼检测模型收敛。也即是说,步骤01031至步骤01033可以由训练模块19执行。In some embodiments, the training module 19 is also used to input the human eye area image, occlusion area, and image offset parameters into the human eye detection model to output training coordinates; based on the preset loss function, according to the human eye area image Calculate the loss value for the corresponding preset coordinates and training coordinates; adjust the human eye detection model according to the loss value until the human eye detection model converges. That is to say, Step 01031 to Step 01033 can be executed by the training module 19 .
在某些实施方式中,处理器60还用于将人眼区域图像、遮挡区域、及图像偏移参数输入人眼检测模型,以输出训练坐标;基于预设的损失函数,根据人眼区域图像对应的预设坐标和训练坐标,计算损失值;根据损失值调整人眼检测模型,直至人眼检测模型收敛。也即是说,步骤01031至步骤01033可以由处理器60执行。In some embodiments, the processor 60 is further configured to input the human eye region image, occlusion region, and image offset parameters into the human eye detection model to output training coordinates; based on a preset loss function, according to the human eye region image Calculate the loss value for the corresponding preset coordinates and training coordinates; adjust the human eye detection model according to the loss value until the human eye detection model converges. That is to say, Step 01031 to Step 01033 may be executed by the processor 60 .
具体的,请参阅图9,人脸检测模型50包括第一特征提取模块51、第二特征提取模块52、第一权重模块53和第二权重模块54和特征融合模块55。Specifically, referring to FIG. 9 , the face detection model 50 includes a first feature extraction module 51 , a second feature extraction module 52 , a first weight module 53 , a second weight module 54 and a feature fusion module 55 .
在进行训练时,将人眼区域图像输入人眼检测模型,人眼区域图像包括左眼区域图像和右眼区域图像,第一特征提取模块51可将人眼区域图像中的左眼区域图像(或者左眼区域图像的特征点)提取出来,第二特征提取模块52可将人眼区域图像中的右眼区域图像(或者右眼区域图像的特征点)提取出来,然后第一权重模块53可根据左眼区域图像的遮挡区域确定第一缺失信息,从而确定第一权重,第二权重模块54可根据右眼区域图像的遮挡区域确定第二缺失信息,从而确定第二权重,然后将左眼区域图像、右眼区域图像、第一权重和第二权重输入到特征融合模块里进行计算,具体计算方式可以是,通过第一权重对左眼区域图像进行加权(如第一权重*左眼区域图像),通过第二权重对右眼区域图像进行加权(如第二权重*右眼区域图像),然后将两者加权后的特征相加,以得到融合后的人眼特征,然后将融合后的人眼特性输入到特征融合模块55中,从而输出人眼注视信息。When training, the human eye area image is input into the human eye detection model, and the human eye area image includes a left eye area image and a right eye area image, and the first feature extraction module 51 can use the left eye area image ( Or the feature points of the left eye area image) are extracted, the second feature extraction module 52 can extract the right eye area image (or the feature points of the right eye area image) in the human eye area image, and then the first weight module 53 can be The first missing information is determined according to the occlusion area of the left-eye area image, thereby determining the first weight, and the second weight module 54 can determine the second missing information according to the occlusion area of the right-eye area image, thereby determining the second weight, and then the left-eye The region image, the right-eye region image, the first weight and the second weight are input into the feature fusion module for calculation, and the specific calculation method may be to weight the left-eye region image by the first weight (such as first weight * left-eye region image), weight the right eye area image by the second weight (such as the second weight * right eye area image), and then add the weighted features of the two to obtain the fused human eye feature, and then combine the fused The characteristics of the human eye are input into the feature fusion module 55, thereby outputting the gaze information of the human eye.
在其他实施方式中,人脸检测模型50还包括第三特征提取模块56,第三特征提取模块56可用于提取人脸图像的中的特征点,以输出人脸姿态信息至特征融合模块,从而根据人脸姿态信息、左眼区域图像、右眼区域图像、第一权重和第二权重计算人眼注视信息。In other embodiments, the face detection model 50 also includes a third feature extraction module 56, the third feature extraction module 56 can be used to extract feature points in the face image, so as to output the face pose information to the feature fusion module, thereby Calculating human eye gaze information according to the face posture information, the left-eye area image, the right-eye area image, the first weight and the second weight.
在训练时,输出的人眼注视信息为训练坐标,而作为训练样本的人眼区域图像存在预设坐标,预设坐标为该人眼区域图像真实的人眼注视信息(如人眼注视方向和注视点坐标),然后处理器60基于预设的损失函数,训练坐标和预设坐标,来计算损失值,损失函数如下:
Figure PCTCN2022126122-appb-000001
其中,loss为损失值,N为每个训练样本集包含的训练样本的数量,X和Y为训练坐标,Gx和Gy为预设坐标,在训练坐标为注视方向时,X和Y分别表示俯仰角和偏航角,在训练坐标为注视点坐标时,X和Y分别表示注视点在显示屏40所在平面的坐标,从而分别计算注视方向的损失值和注视点坐标的损失值。
When training, the output human eye gaze information is the training coordinates, and there are preset coordinates as the human eye region image of the training sample, and the preset coordinates are the real human eye gaze information (such as the human eye gaze direction and gaze point coordinates), then processor 60 calculates the loss value based on the preset loss function, the training coordinates and the preset coordinates, and the loss function is as follows:
Figure PCTCN2022126122-appb-000001
Among them, loss is the loss value, N is the number of training samples contained in each training sample set, X and Y are the training coordinates, Gx and Gy are the preset coordinates, when the training coordinates are the gaze direction, X and Y represent pitch respectively Angle and yaw angle, when the training coordinates are the gaze point coordinates, X and Y represent the coordinates of the gaze point on the plane where the display screen 40 is located, respectively, thereby calculating the loss value of the gaze direction and the loss value of the gaze point coordinates respectively.
然后,处理器60可根据注视方向的损失值和注视点坐标的损失值调整人眼检测模型,使得人眼检测模型的梯度不断下降,使得训练坐标越来越接近预设坐标,最终使得人眼检测模型训练至收敛。如此,通过具有遮挡区域和/或图像偏移参数的人眼区域图像来对人眼检测模型进行训练,并基于损失值不断调整人眼检测模型至收敛,可最大化的降低人眼被遮挡以及人眼特征点检测偏移对注视检测带来的影响,提升注视检测的准确性。Then, the processor 60 can adjust the human eye detection model according to the loss value of the gaze direction and the loss value of the gaze point coordinates, so that the gradient of the human eye detection model continues to decrease, so that the training coordinates are getting closer and closer to the preset coordinates, and finally the human eye The detection model is trained to convergence. In this way, the human eye detection model is trained through the human eye area image with occlusion area and/or image offset parameters, and the human eye detection model is continuously adjusted to convergence based on the loss value, which can minimize the human eye being occluded and The impact of human eye feature point detection offset on gaze detection improves the accuracy of gaze detection.
请参阅图3、图10和图11,本申请实施方式的检测方法包括以下步骤:Please refer to Figure 3, Figure 10 and Figure 11, the detection method of the embodiment of the present application includes the following steps:
021:获取人脸图像;021: Obtain a face image;
022:根据人脸图像确定人眼区域图像以及人脸姿态信息;022: Determine the human eye area image and face posture information according to the face image;
023:根据人眼区域图像的缺失信息,确定人眼区域图像的权重;023: Determine the weight of the human eye area image according to the missing information of the human eye area image;
024:根据人眼区域图像和人眼区域图像的权重,确定人眼特征信息;024: Determine the human eye feature information according to the human eye area image and the weight of the human eye area image;
025:根据人眼特征信息以及人脸姿态信息,确定人眼注视信息。025: Determine the gaze information of the human eye based on the feature information of the human eye and the posture information of the human face.
本申请实施方式的检测装置20包括第一获取模块21、第一确定模块22、第二确定模块23、第三确定模块24和第四确定模块25。第一获取模块21用于获取人脸图像;第一确定模块22用于根据人脸图像确定人眼区域图像以及人脸姿态信息;第二确定模块23用于根据人眼区域图像的缺失信息,确定人眼区域图像的权重;第三确定模块24用于根据人眼区域图像和人眼区域图像的权重,确定人眼特征信息;第四确定模块25用于根据人眼特征信息以及人脸姿态信息,确定人眼注视信息。也即是说,步骤021可以由第一获取模块11实现、步骤022可以由第一确定模块12执行、步骤023可以由第二确定模块23、步骤024可以由第三确定模块24执行、步骤025可以由第四确定模块25执行。The detection device 20 in the embodiment of the present application includes a first acquisition module 21 , a first determination module 22 , a second determination module 23 , a third determination module 24 and a fourth determination module 25 . The first acquiring module 21 is used to acquire the human face image; the first determining module 22 is used to determine the human eye region image and the facial posture information according to the human face image; the second determining module 23 is used to determine the missing information of the human eye region image, Determine the weight of the human eye area image; the third determination module 24 is used to determine the human eye feature information according to the human eye area image and the weight of the human eye area image; Information, to determine the human eye gaze information. That is to say, step 021 can be implemented by the first acquisition module 11, step 022 can be performed by the first determination module 12, step 023 can be performed by the second determination module 23, step 024 can be performed by the third determination module 24, step 025 It may be executed by the fourth determining module 25 .
本申请实施方式的电子设备100包括处理器60和采集装置30。采集装置30用于按预定帧率采集人脸信息(人脸信息包括人脸图像,如人脸的可见光图像、红外图像、深度图像等);采集装置30可以是可见光相机、红外相机、深度相机中的一种或多种,其中,可见光相机可采集可见光人脸图像、红外相机可采集红外人脸图像、深度相机可采集深度人脸图像,本实施方式中,采集装置30包括可见光相机、红外相机和深度相机,采集装置30同时可见光人脸图像、红外人脸图像和深度人脸图像。检测装置20设置在电子设备100内,处理器60可包括ISP、NPU和AP,如第一获取模 块21可设置在采集装置30,以获取人脸图像,第一确定模块22、第二确定模块23和第三确定模块24可设置在ISP中,第四确定模块25可设置在NPU中。采集装置30用于获取人脸图像;处理器60(具体可以是ISP)用于根据人脸图像确定人眼区域图像以及人脸姿态信息;根据人眼区域图像的缺失信息,确定人眼区域图像的权重;根据人眼区域图像和人眼区域图像的权重,确定人眼特征信息;处理器60(具体可以是NPU)还用于根据人眼特征信息以及人脸姿态信息,确定人眼注视信息。也即是说,步骤021可以由采集装置30执行,步骤022至步骤025可以由处理器60执行。The electronic device 100 in the embodiment of the present application includes a processor 60 and a collection device 30 . Acquisition device 30 is used for collecting face information by predetermined frame rate (face information comprises people's face image, as the visible light image of people's face, infrared image, depth image etc.); Acquisition device 30 can be visible light camera, infrared camera, depth camera One or more of them, wherein the visible light camera can collect visible light face images, the infrared camera can collect infrared face images, and the depth camera can collect depth face images. In this embodiment, the collection device 30 includes a visible light camera, an infrared face image camera and depth camera, the acquisition device 30 simultaneously visible light face image, infrared face image and depth face image. The detection device 20 is arranged in the electronic equipment 100, and the processor 60 may include an ISP, an NPU, and an AP. For example, the first acquisition module 21 may be arranged in the acquisition device 30 to obtain a face image. The first determination module 22 and the second determination module 23 and the third determination module 24 may be set in the ISP, and the fourth determination module 25 may be set in the NPU. Acquisition device 30 is used for obtaining human face image; Processor 60 (specifically can be ISP) is used for determining human eye area image and human face posture information according to human face image; According to the missing information of human eye area image, determine human eye area image weight; according to the weight of the human eye area image and the human eye area image, determine the human eye feature information; processor 60 (specifically can be NPU) is also used for determining the human eye gaze information according to the human eye feature information and the facial posture information . That is to say, step 021 may be executed by the collection device 30 , and steps 022 to 025 may be executed by the processor 60 .
具体地,在用户使用电子设备100时,采集装置30可间隔预定时长采集一次用户的人脸信息,在保证电子设备100的功耗较小的情况,持续对用户进行注视检测,或者,在用户使用需要进行注视检测的应用程序(如浏览器软件、贴吧软件、视频软件等)时,再按预定帧数采集人脸信息,从而在有注视检测需求时才进行人脸信息采集,最大化的降低了注视检测的功耗。Specifically, when the user uses the electronic device 100, the collection device 30 can collect the user's face information once at a predetermined time interval, and continue to perform gaze detection on the user while ensuring that the power consumption of the electronic device 100 is small, or, when the user When using applications that require gaze detection (such as browser software, post bar software, video software, etc.), the face information is collected according to the predetermined number of frames, so that face information is collected only when gaze detection is required, maximizing Reduced power consumption for gaze detection.
请参阅图4,在获取到人脸信息(以人脸图像为例)后,处理器60可对人脸图像进行识别,例如处理器60可将人脸图像和预设人脸模板进行比对,从而确定人脸图像中的人脸及人脸的不同部位(如眼镜、鼻子等)所在的图像区域,以识别人脸图像中的人眼区域,从而获取人眼区域图像,其中,预设人脸模板可存储在电子设备100的存储器内,处理器60可在可信执行环境(Trusted Execution Environment,TEE)内进行人脸识别,以保证用户的隐私;或者,预设人脸模板可存储在云端服务器200,然后由电子设备100将人脸图像发送到云端服务器200进行比对以确定人眼区域图像,将人脸识别交给云端服务器200进行处理,可降低电子设备100的处理量并提升图像处理效率。Please refer to Fig. 4, after obtaining the face information (taking the face image as an example), the processor 60 can identify the face image, for example, the processor 60 can compare the face image with the preset face template , so as to determine the image area where the face and different parts of the face (such as glasses, nose, etc.) The face template can be stored in the memory of the electronic device 100, and the processor 60 can perform face recognition in a trusted execution environment (Trusted Execution Environment, TEE) to ensure the privacy of the user; or, the preset face template can be stored In the cloud server 200, the electronic device 100 then sends the face image to the cloud server 200 for comparison to determine the image of the human eye area, and the face recognition is handed over to the cloud server 200 for processing, which can reduce the processing capacity of the electronic device 100 and Improve image processing efficiency.
处理器60还可对人脸图像进行特征提取,根据提取得到的特征点的位置坐标来计算人脸姿态信息,可以理解,人脸的不同姿态(如以鼻尖为原点建立三维坐标系,人脸的俯仰角、水平转动角、倾斜角分别表示人脸相对于三维坐标系的三个坐标轴的旋转角度等),均会影响用户的注视方向和注视点坐标,因此,在计算人眼注视信息时,除了获取人眼区域图像外,还会结合人脸姿态信息,从而更为准确地计算注视方向和注视点坐标。The processor 60 can also perform feature extraction on the face image, and calculate the face posture information according to the position coordinates of the extracted feature points. The pitch angle, horizontal rotation angle, and tilt angle represent the rotation angles of the face relative to the three coordinate axes of the three-dimensional coordinate system, etc.), which will affect the user's gaze direction and gaze point coordinates. Therefore, when calculating human eye gaze information When , in addition to obtaining the image of the human eye area, it will also combine the facial posture information to more accurately calculate the gaze direction and gaze point coordinates.
然后,处理器60可对人眼区域图像进行识别,以确定人眼的缺失信息,具体地,人眼较为光滑,对光线的反射率较高,相较于人脸的其他部位,人眼在图像中的像素值会较大,因此,可通过设置检测阈值,来确定像素是否位于人眼(如像素的像素值大于检测阈值时确定像素位于人眼),从而确定人眼区域图像中,人眼的图像部分,而人眼的形状也是基本确定的近似椭圆形,根据对识别到的人眼的图像部分和人眼的预设形状,即可确定人眼缺失的部分,从而确定缺失信息,缺失信息可包括人眼缺失的部分占人眼的比例。Then, the processor 60 can identify the image of the human eye area to determine the missing information of the human eye. Specifically, the human eye is relatively smooth and has a high reflectivity to light. Compared with other parts of the human face, the human eye is The pixel value in the image will be larger, therefore, by setting the detection threshold, it can be determined whether the pixel is located in the human eye (for example, when the pixel value of the pixel is greater than the detection threshold, it is determined that the pixel is located in the human eye), so as to determine the human eye region image. The image part of the human eye, and the shape of the human eye is basically determined and approximately elliptical. According to the recognized image part of the human eye and the preset shape of the human eye, the missing part of the human eye can be determined, thereby determining the missing information. The missing information may include the ratio of the missing part of the human eye to the human eye.
处理器60根据缺失信息,即可确定人眼区域图像的权重,例如,人眼缺失的部分占人眼的比例越大,则人眼区域图像的权重越小;可以理解,人眼缺失的部分占人眼的比例越大,则表示人眼被遮挡的程度越大,人眼区域图像的准确性就越差,因此,给予较小的权重可降低人眼区域图像对后续计算人眼注视信息的准确性的影响,提升注视检测准确性。The processor 60 can determine the weight of the human eye area image according to the missing information. For example, the larger the proportion of the missing part of the human eye to the human eye, the smaller the weight of the human eye area image; it can be understood that the missing part of the human eye The larger the proportion of the human eye, the greater the degree of occlusion of the human eye, and the worse the accuracy of the human eye area image. Therefore, giving a smaller weight can reduce the impact of the human eye area image on the subsequent calculation of human eye gaze information. The influence of accuracy, improve the accuracy of gaze detection.
在一个实施方式中,人眼区域图像包括左眼区域图像和右眼区域图像,处理器60可分别根据左眼区域图像的第一缺失信息来确定左眼区域图像的第一权重,根据右眼区域图像的第二缺失信息来确定右眼区域图像的第二权重,从而分别确定左眼区域图像的第一权重和右眼区域图像的第二权重。例如,第一权重和第一缺失信息(如左眼缺失的部分占左眼的比例)呈负相关关系,第二权重和第二缺失信息(如右眼缺失的部分占右眼的比例)呈负相关关系,在左眼区域图像的第一权重较小(如为0.6)时,则可降低左眼区域图像对人眼注视信息计算的影响(如通过提取左眼区域图像较更少的特征点来降低影响)。In one embodiment, the human eye area image includes a left eye area image and a right eye area image, and the processor 60 can respectively determine the first weight of the left eye area image according to the first missing information of the left eye area image, and the first weight of the left eye area image according to the right eye area image. The second missing information of the region image is used to determine the second weight of the right-eye region image, thereby respectively determining the first weight of the left-eye region image and the second weight of the right-eye region image. For example, the first weight is negatively correlated with the first missing information (such as the proportion of the missing part of the left eye to the left eye), and the second weight is negatively correlated with the second missing information (such as the proportion of the missing part of the right eye to the right eye). Negative correlation, when the first weight of the left-eye region image is small (for example, 0.6), the influence of the left-eye region image on the calculation of human gaze information can be reduced (such as by extracting fewer features of the left-eye region image point to reduce the impact).
在获取到人眼区域图像,并确定了人眼区域图像的权重后,即可根据人眼区域图像及其权重确定人眼特征信息,例如将人脸区域图像和人眼区域图像对应的权重直接作为人眼特征信息,或者先根据人眼区域图像的权重对人眼区域图像进行人眼特征点提取,然后将提取的人眼特征点作为人眼特征信息。After the image of the human eye region is obtained and the weight of the image of the human eye region is determined, the feature information of the human eye can be determined according to the image of the human eye region and its weight, for example, the weights corresponding to the image of the face region and the image of the human eye region are directly As the human eye feature information, or first extract the human eye feature points from the human eye area image according to the weight of the human eye area image, and then use the extracted human eye feature points as the human eye feature information.
最后,处理器60根据人眼特征信息和人脸姿态信息来确定人眼注视信息。例如,注视信息包括注视方向和注视点坐标,处理器60可通过对人眼区域图像中左眼区域和右眼区域分别进行特征提取,然后结合人脸姿态信息,从而确定人眼的注视方向以及人眼在电子设备100的显示屏40所在的平面的注视点坐标。Finally, the processor 60 determines the gaze information of the human eye according to the characteristic information of the human eye and the posture information of the human face. For example, the gaze information includes gaze direction and gaze point coordinates, processor 60 can perform feature extraction on the left eye area and right eye area in the human eye area image respectively, and then combine the facial posture information to determine the gaze direction of the human eye and The gaze point coordinates of the human eyes on the plane where the display screen 40 of the electronic device 100 is located.
在得到注视方向和注视点坐标后,即可根据注视方向和注视点坐标实现电子设备100的控制。如在检测到注视点坐标位于显示屏40的显示区域时,保持屏幕始终点亮,而在检测到注视点坐标位于显示屏40的显示区域之外时预定时长(如10S、20S等),则关闭屏幕。After the gaze direction and gaze point coordinates are obtained, the electronic device 100 can be controlled according to the gaze direction and gaze point coordinates. If it is detected that the gaze point coordinates are located in the display area of the display screen 40, keep the screen always on, and when it is detected that the gaze point coordinates are located outside the display area of the display screen 40, a predetermined duration (such as 10S, 20S, etc.), then Turn off the screen.
本申请的人眼注视检测方法、检测装置20和电子设备100,通过获取人眼区域图像,并通过人眼区域图像的缺失信息,来确定人眼区域图像所占的权重,在根据人眼区域图像确定人眼注视信息时,将人眼区域图像的权重作为考虑因素,从而有利于降低人眼被遮挡导致人眼区域图像出现缺失,对计算人眼注视信息的准确性的影响,可提升人眼区域图像缺失的情况下,人眼注视检测的准确性。且结合人脸姿态信息共同确定人眼注视信息,即使人眼区域图像存在缺失,也可通过人脸姿态信息准确地的计算得到人眼注视信息,可提升人眼注视信息的准确性。The human eye gaze detection method, detection device 20, and electronic device 100 of the present application determine the weight of the human eye area image by acquiring the human eye area image and the missing information of the human eye area image. When the image determines the gaze information of the human eye, the weight of the image of the human eye area is considered as a factor, which is beneficial to reduce the impact of the lack of image of the human eye area caused by the occlusion of the human eye, and the impact on the accuracy of the calculation of the gaze information of the human eye, which can improve the accuracy of human eye gaze information. Accuracy of human eye gaze detection in the absence of eye region images. And combined with the face posture information to jointly determine the human eye gaze information, even if the human eye area image is missing, the human eye gaze information can be accurately calculated through the face posture information, which can improve the accuracy of the human eye gaze information.
请参阅图3、图11和图12,在某些实施方式中,人脸图像包括人脸掩码,步骤025包括:Please refer to Fig. 3, Fig. 11 and Fig. 12, in some embodiments, face image comprises face mask, and step 025 comprises:
0251:根据人脸掩码计算人脸相对电子设备100的位置信息;0251: Calculate the position information of the face relative to the electronic device 100 according to the face mask;
0252:根据位置信息、人眼特征信息以及人脸姿态信息,确定人眼注视信息。0252: Determine eye gaze information based on position information, eye feature information, and face posture information.
在某些实施方式中,第四确定模块25还用于根据人脸掩码计算人脸相对电子设备100的位置信息;根据位置信息、人眼特征信息以及人脸姿态信息,确定人眼注视信息。也即是说,步骤0251和步骤0252可以由第四确定模块25执行。In some embodiments, the fourth determination module 25 is also used to calculate the position information of the human face relative to the electronic device 100 according to the face mask; determine the gaze information of the human eye according to the position information, human eye feature information and human face posture information . That is to say, step 0251 and step 0252 can be executed by the fourth determination module 25 .
在某些实施方式中,处理器60还用于根据人脸掩码计算人脸相对电子设备100的位置信息;根据位置信息、人眼特征信息以及人脸姿态信息,确定人眼注视信息。也即是说,步骤0251和步骤0252可以由处理器60执行。In some implementations, the processor 60 is further configured to calculate the position information of the face relative to the electronic device 100 according to the face mask; and determine the gaze information of the human eye according to the position information, the feature information of the human eyes and the posture information of the human face. That is to say, step 0251 and step 0252 can be executed by the processor 60 .
具体地,在计算得到人眼注视信息之前,处理器60还可确定人脸图像的人脸掩码,人脸掩码用于表征人脸在人脸图像中的位置,人脸掩码可通过识别人脸图像中的人脸的位置确定,处理器60根据人脸掩码可计算人脸相对电子设备100的位置信息(如人脸和电子设备100的距离),可以理解,人脸和电子设备100的距离变化时,即使人眼注视方向未发生改变,人眼的注视点坐标依旧会发生变化,因此,在计算人眼注视信息时,除了获取人眼区域图像及其权重、和人脸姿态信息外,还会结合位置信息,从而更为准确地计算注视点坐标。Specifically, before calculating the gaze information of human eyes, the processor 60 can also determine the face mask of the face image, which is used to represent the position of the face in the face image, and the face mask can be obtained by Identify the position of the human face in the human face image, and the processor 60 can calculate the position information of the human face relative to the electronic device 100 (such as the distance between the human face and the electronic device 100) according to the face mask. It can be understood that the human face and the electronic device 100 When the distance of the device 100 changes, even if the gaze direction of the human eye does not change, the coordinates of the gaze point of the human eye will still change. Therefore, when calculating the gaze information of the human eye, in addition to obtaining the image of the human eye region and its weight, and the human face In addition to attitude information, position information will also be combined to more accurately calculate the coordinates of the gaze point.
请参阅图3、图13和图14,本申请实施方式的通过人眼控制电子设备100的方法包括以下步骤:Please refer to FIG. 3 , FIG. 13 and FIG. 14 , the method for controlling the electronic device 100 through human eyes according to the embodiment of the present application includes the following steps:
031:获取人眼区域图像;031: Obtain the image of the human eye area;
033:根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息,其中,人眼区域图像的权重根据人眼区域图像的缺失信息确定;及033: Determine the gaze information of the human eye according to the human eye area image and the weight of the human eye area image, wherein the weight of the human eye area image is determined according to the missing information of the human eye area image; and
035:根据人眼注视信息控制电子设备100。035: Control the electronic device 100 according to the gaze information of human eyes.
本申请实施方式的控制装置30包括第一获取模块31、第一确定模块32和控制模块33。第一获取模块31用于获取人眼区域图像;第一确定模块32用于根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息;控制模块33用于根据人眼注视信息控制电子设备100。也即是说,步骤031可以由第一获取模块31实现、步骤033可以由第一确定模块32执行和步骤035可以由控制模块33执行。The control device 30 in the embodiment of the present application includes a first acquisition module 31 , a first determination module 32 and a control module 33 . The first acquisition module 31 is used to obtain the human eye region image; the first determination module 32 is used to determine the human eye gaze information according to the human eye region image and the weight of the human eye region image; the control module 33 is used to control the human eye gaze information according to the human eye region image. Electronic device 100. That is to say, step 031 can be implemented by the first acquisition module 31 , step 033 can be performed by the first determination module 32 and step 035 can be performed by the control module 33 .
本申请实施方式的电子设备100包括处理器60和采集装置30。采集装置30用于按预定帧率采集人脸信息(人脸信息包括人脸图像,如人脸的可见光图像、红外图像、深度图像等);采集装置30可以是可见光相机、红外相机、深度相机中的一种或多种,其中,可见光相机可采集可见光人脸图像、红外相机可采集红外人脸图像、深度相机可采集深度人脸图像,本实施方式中,采集装置30包括可见光相机、红外相机和深度相机,采集装置30同时可见光人脸图像、红外人脸图像和深度人脸图像。处理器60可包括ISP、NPU和AP,如控制装置30设置在电子设备100内,第一获取模块11设置在ISP,处理器60与采集装置30连接,在采集装置30采集到人脸图像后,ISP可对人脸图像进行处理,以获取人眼区域图像,第一确定模块12可设置在NPU,控制模块13可设置在AP。处理器60(具体可以是ISP)用于获取人眼区域图像;处理器60(具体可以是NPU)还用于根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息。处理器60(具体可以是AP)还可用于根据人眼注视信息控制电子设备100。也即是说,步骤031可以由采集装置30配合处理器60执行、步骤032和步骤033可以由处理器60执行。The electronic device 100 in the embodiment of the present application includes a processor 60 and a collection device 30 . Acquisition device 30 is used for collecting face information by predetermined frame rate (face information comprises people's face image, as the visible light image of people's face, infrared image, depth image etc.); Acquisition device 30 can be visible light camera, infrared camera, depth camera One or more of them, wherein the visible light camera can collect visible light face images, the infrared camera can collect infrared face images, and the depth camera can collect depth face images. In this embodiment, the collection device 30 includes a visible light camera, an infrared face image camera and depth camera, the acquisition device 30 simultaneously visible light face image, infrared face image and depth face image. Processor 60 may include ISP, NPU and AP, such as control device 30 is arranged in electronic equipment 100, the first acquisition module 11 is arranged in ISP, processor 60 is connected with acquisition device 30, after acquisition device 30 collects the facial image The ISP can process the face image to obtain the image of the human eye area, the first determination module 12 can be set in the NPU, and the control module 13 can be set in the AP. The processor 60 (specifically, it may be an ISP) is used to acquire the image of the human eye area; the processor 60 (specifically, it may be an NPU) is also used to determine the human eye gaze information according to the weight of the human eye area image and the human eye area image. The processor 60 (specifically, it may be an AP) can also be used to control the electronic device 100 according to the gaze information of human eyes. That is to say, step 031 can be executed by the collection device 30 in cooperation with the processor 60 , and steps 032 and 033 can be executed by the processor 60 .
具体地,在用户使用电子设备100时,采集装置30可间隔预定时长采集一次用户的人脸信息,在保证电子设备100的功耗较小的情况,持续对用户进行注视检测,或者,在用户使用需要进行注视检测的应用程序(如浏览器软件、贴吧软件、视频软件等)时,再按预定帧数采集人脸信息,从而在有注视检测需求时才进行人脸信息采集,最大化的降低了注视检测的功耗。Specifically, when the user uses the electronic device 100, the collection device 30 can collect the user's face information once at a predetermined time interval, and continue to perform gaze detection on the user while ensuring that the power consumption of the electronic device 100 is small, or, when the user When using applications that require gaze detection (such as browser software, post bar software, video software, etc.), the face information is collected according to the predetermined number of frames, so that face information is collected only when gaze detection is required, maximizing Reduced power consumption for gaze detection.
请参阅图4,在获取到人脸信息(以人脸图像为例)后,处理器60可对人脸图像进行识别,例如处理器60可将人脸图像和预设人脸模板进行比对,从而确定人脸图像中的人脸及人脸的不同部位(如眼镜、鼻子等)所在的图像区域,以识别人脸图像中的人眼区域,从而获取人眼区域图像,其中,预设人脸模板可存储在电子设备100的存储器内,处理器60可在可信执行环境(Trusted Execution Environment,TEE)内进行人脸识别,以保证用户的隐私;或者,预设人脸模板可存储在云端服务器200,然后由电子设备100将人脸图像发送到云端服务器200进行比对以确定人眼区域图像,将人脸识别交给云端服务器200进行处理,可降低电子设备100的处理量并提升图像处理效率;Please refer to Fig. 4, after obtaining the face information (taking the face image as an example), the processor 60 can identify the face image, for example, the processor 60 can compare the face image with the preset face template , so as to determine the image area where the face and different parts of the face (such as glasses, nose, etc.) The face template can be stored in the memory of the electronic device 100, and the processor 60 can perform face recognition in a trusted execution environment (Trusted Execution Environment, TEE) to ensure the privacy of the user; or, the preset face template can be stored In the cloud server 200, the electronic device 100 then sends the face image to the cloud server 200 for comparison to determine the image of the human eye area, and the face recognition is handed over to the cloud server 200 for processing, which can reduce the processing capacity of the electronic device 100 and Improve image processing efficiency;
然后,处理器60可对人眼区域图像进行识别,以确定人眼的缺失信息,具体地,人眼较为光滑,对光线的反射率较高,相较于人脸的其他部位,人眼在图像中的像素值会较大,因此,可通过设置检测阈值,来确定像素是否位于人眼(如像素的像素值大于检测阈值时确定像素位于人眼),从而确定人眼区域图像中,人眼的图像部分,而人眼的形状也是基本确定的近似椭圆形,根据对识别到的人眼的图像部分和人眼的预设形状,即可确定人眼缺失的部分,从而确定缺失信息,缺失信息可包括人眼缺失的部分占人眼的比例。Then, the processor 60 can identify the image of the human eye area to determine the missing information of the human eye. Specifically, the human eye is relatively smooth and has a high reflectivity to light. Compared with other parts of the human face, the human eye is The pixel value in the image will be larger, therefore, by setting the detection threshold, it can be determined whether the pixel is located in the human eye (for example, when the pixel value of the pixel is greater than the detection threshold, it is determined that the pixel is located in the human eye), so as to determine the human eye region image. The image part of the human eye, and the shape of the human eye is basically determined and approximately elliptical. According to the recognized image part of the human eye and the preset shape of the human eye, the missing part of the human eye can be determined, thereby determining the missing information. The missing information may include the ratio of the missing part of the human eye to the human eye.
处理器60根据缺失信息,即可确定人眼区域图像的权重,例如,人眼缺失的部分占人眼的比例越大,则人眼区域 图像的权重越小;可以理解,人眼缺失的部分占人眼的比例越大,则表示人眼被遮挡的程度越大,人眼区域图像的准确性就越差,因此,给予较小的权重可降低人眼区域图像对后续计算人眼注视信息的准确性的影响,提升注视检测准确性。The processor 60 can determine the weight of the human eye area image according to the missing information. For example, the larger the proportion of the missing part of the human eye to the human eye, the smaller the weight of the human eye area image; it can be understood that the missing part of the human eye The larger the proportion of the human eye, the greater the degree of occlusion of the human eye, and the worse the accuracy of the human eye area image. Therefore, giving a smaller weight can reduce the impact of the human eye area image on the subsequent calculation of human eye gaze information. The influence of accuracy, improve the accuracy of gaze detection.
在一个实施方式中,人眼区域图像包括左眼区域图像和右眼区域图像,处理器60可分别根据左眼区域图像的第一缺失信息来确定左眼区域图像的第一权重,根据右眼区域图像的第二缺失信息来确定右眼区域图像的第二权重,从而分别确定左眼区域图像的第一权重和右眼区域图像的第二权重。例如,第一权重和第一缺失信息(如左眼缺失的部分占左眼的比例)呈负相关关系,第二权重和第二缺失信息(如右眼缺失的部分占右眼的比例)呈负相关关系,在左眼区域图像的第一权重较小(如为0.6)时,则可降低左眼区域图像对人眼注视信息计算的影响(如通过提取左眼区域图像较更少的特征点来降低影响)。In one embodiment, the human eye area image includes a left eye area image and a right eye area image, and the processor 60 can respectively determine the first weight of the left eye area image according to the first missing information of the left eye area image, and the first weight of the left eye area image according to the right eye area image. The second missing information of the region image is used to determine the second weight of the right-eye region image, thereby respectively determining the first weight of the left-eye region image and the second weight of the right-eye region image. For example, the first weight is negatively correlated with the first missing information (such as the proportion of the missing part of the left eye to the left eye), and the second weight is negatively correlated with the second missing information (such as the proportion of the missing part of the right eye to the right eye). Negative correlation, when the first weight of the left-eye region image is small (for example, 0.6), the influence of the left-eye region image on the calculation of human gaze information can be reduced (such as by extracting fewer features of the left-eye region image point to reduce the impact).
在获取到人眼区域图像,并确定了人眼区域图像的权重后,即可根据人眼区域图像及其权重计算人眼注视信息。例如,注视信息包括注视方向和注视点坐标,处理器60通过对人眼区域图像中左眼区域和右眼区域分别进行特征提取,从而确定人眼的注视方向以及人眼在电子设备100的显示屏40所在的平面的注视点坐标。After the image of the human eye region is acquired and the weight of the image of the human eye region is determined, the gaze information of the human eye can be calculated according to the image of the human eye region and its weight. For example, the gaze information includes the gaze direction and the coordinates of the gaze point, and the processor 60 performs feature extraction on the left eye area and the right eye area in the human eye area image, thereby determining the gaze direction of the human eye and the display of the human eye on the electronic device 100 The gaze point coordinates of the plane where the screen 40 is located.
在得到注视方向和注视点坐标后,即可根据注视方向和注视点坐标实现电子设备100的控制。请参阅图15,例如,以双眼的中点为原点O1建立三维坐标系,X1轴平行双眼中心的连线方向,Y1轴位于水平面并垂直X1轴,Z1轴垂直X1轴和Y1轴,通过用户视线S和三维坐标系的三轴的旋转角表示用户的注视方向,如注视方向分别包括俯仰角、横滚角和偏航角,俯仰角表示绕X1轴的旋转角,横滚角表示绕Y1轴的旋转角,偏航角表示绕Z1轴的旋转角,处理器60可根据注视方向实现对电子设备100的显示内容的翻页或者滑动操作,例如根据确定连续多帧人眼区域图像(如连续10帧)的注视方向,可确定注视方向的变化,例如,请结合图15和图16,当俯仰角逐渐增大(即视线S仰)时,则可确定用户想要显示内容向上滑动或向下翻页,再例如,请结合图15和图17,俯仰角逐渐减小(即视线S俯),则可确定用户想要显示内容向下滑动或向上翻页。同样地,通过检测注视点M的移动方向,也可对电子设备100进行滑动或翻页操作。请结合图18,可以显示屏40的中心作为坐标原点O2建立平面坐标系,以平行电子设备100的宽度方向作为X2轴,以平行电子设备100的长度方向作为Y2轴,注视点坐标包括横坐标(对应在X2轴的位置)和纵坐标(对应在Y2轴的位置),若纵坐标逐渐增加,则表示注视点M上移,可确定用户想要显示内容向上滑动或向下翻页,再例如,若纵坐标逐渐减小,则表示注视点M下移,可确定用户想要显示内容向下滑动或向上翻页。After the gaze direction and gaze point coordinates are obtained, the electronic device 100 can be controlled according to the gaze direction and gaze point coordinates. Please refer to Figure 15. For example, a three-dimensional coordinate system is established with the midpoint of the eyes as the origin O1, the X1 axis is parallel to the direction of the line connecting the centers of the eyes, the Y1 axis is located on the horizontal plane and perpendicular to the X1 axis, and the Z1 axis is perpendicular to the X1 axis and Y1 axis. The three-axis rotation angle of the line of sight S and the three-dimensional coordinate system indicates the user's gaze direction. For example, the gaze direction includes pitch angle, roll angle and yaw angle respectively. The pitch angle represents the rotation angle around the X1 axis, and the roll angle represents the rotation angle around the Y1 axis. The rotation angle of the axis, the yaw angle represents the rotation angle around the Z1 axis, the processor 60 can realize the page turning or sliding operation of the display content of the electronic device 100 according to the gaze direction, for example, according to the determination of continuous multiple frames of human eye area images (such as 10 consecutive frames) of the gaze direction, the change of the gaze direction can be determined, for example, please combine Figure 15 and Figure 16, when the pitch angle gradually increases (that is, the line of sight S is tilted), it can be determined that the user wants the displayed content to slide up or Turning the page down. For another example, please refer to FIG. 15 and FIG. 17 , the pitch angle gradually decreases (that is, the line of sight S is tilted), then it can be determined that the user wants to slide the displayed content down or turn the page up. Similarly, by detecting the moving direction of the gaze point M, the electronic device 100 can also be slid or page-turned. Please refer to FIG. 18 , the center of the display screen 40 can be used as the coordinate origin O2 to establish a plane coordinate system, the width direction parallel to the electronic device 100 is used as the X2 axis, the length direction parallel to the electronic device 100 is used as the Y2 axis, and the gaze point coordinates include the abscissa (corresponding to the position on the X2 axis) and the ordinate (corresponding to the position on the Y2 axis). If the ordinate gradually increases, it means that the gaze point M moves up. It can be determined that the user wants to slide up or turn the page down, and then For example, if the ordinate gradually decreases, it means that the gaze point M moves down, and it can be determined that the user wants to slide the displayed content down or turn the page up.
在其他实施方式中,处理器60还可根据注视方向的变化速度(如通过第1帧和第10帧的俯仰角的差值(或注视点M的纵坐标的差值)和获取连续10帧的时长确定),变化速度越快,滑动后显示的新的显示内容越多。In other implementations, the processor 60 can also obtain 10 consecutive frames according to the change speed of the gaze direction (such as the difference between the pitch angles of the first frame and the tenth frame (or the difference between the vertical coordinates of the gaze point M) and The duration is determined), the faster the change speed, the more new display content will be displayed after sliding.
在另一个例子中,在检测到注视点坐标位于显示屏40的显示区域时,说明用户始终在查看显示屏40,则保持屏幕始终点亮,而在检测到注视点坐标位于显示屏40的显示区域之外时,则说明用户未查看显示屏40,但为了防止用户仅是偶尔张望一下显示区域外,导致误判,可在用户未查看显示屏40后预定时长(如10S、20S等),再关闭屏幕。In another example, when it is detected that the coordinates of the gaze point are located in the display area of the display screen 40, it means that the user is always viewing the display screen 40, and the screen is kept on all the time, and when it is detected that the coordinates of the gaze point are located in the display area of the display screen 40 When outside the area, it means that the user has not checked the display screen 40, but in order to prevent the user from looking around outside the display area once in a while, causing a misjudgment, the predetermined time length (such as 10S, 20S, etc.) after the user does not check the display screen 40 can be Turn off the screen again.
本申请的通过人眼控制电子设备100的方法、控制装置30和电子设备100,通过获取人眼区域图像,并通过人眼区域图像的缺失信息,来确定人眼区域图像所占的权重,在根据人眼区域图像确定人眼注视信息时,将人眼区域图像的权重作为考虑因素,从而有利于降低人眼被遮挡导致人眼区域图像出现缺失,对计算人眼注视信息的准确性的影响,可提升人眼区域图像缺失的情况下,人眼注视检测的准确性,然后通过准确地人眼注视信息来对电子设备100进行控制,从而保证了对电子设备100的控制准确性。The method for controlling the electronic device 100 through human eyes, the control device 30 and the electronic device 100 of the present application determine the weight of the human eye region image by acquiring the human eye region image and the missing information of the human eye region image. When determining the human eye gaze information based on the human eye area image, the weight of the human eye area image is considered as a factor, which is beneficial to reduce the impact of the human eye area image being missing due to the occlusion of the human eye, and the accuracy of the calculation of the human eye gaze information. , can improve the accuracy of human eye gaze detection under the condition that the image of the human eye area is missing, and then control the electronic device 100 through accurate human eye gaze information, thereby ensuring the control accuracy of the electronic device 100 .
请参阅图3、图14和图19,在某些实施方式中,通过人眼控制电子设备100的方法还包括:Referring to FIG. 3 , FIG. 14 and FIG. 19 , in some embodiments, the method for controlling the electronic device 100 through human eyes further includes:
0321:获取人脸姿态信息。0321: Obtain face pose information.
步骤033包括:Step 033 includes:
0331:根据人脸姿态信息、人眼区域图像、人眼区域图像的权重,确定人眼注视信息。0331: Determine the human eye gaze information according to the face posture information, the human eye area image, and the weight of the human eye area image.
在某些实施方式中,控制装置30还包括第二获取模块34,第二获取模块34同样可设置在ISP,以用于获取人脸姿态信息。第一确定模块32还用于根据人脸姿态信息、人眼区域图像、人眼区域图像的权重,确定人眼注视信息。也即是说,步骤0321可以由第二获取模块34执行,步骤0331可以由第一确定模块32执行。In some implementations, the control device 30 further includes a second acquisition module 34, which can also be set in the ISP to acquire facial posture information. The first determining module 32 is further configured to determine human eye gaze information according to the human face posture information, the human eye area image, and the weight of the human eye area image. That is to say, step 0321 can be performed by the second obtaining module 34 , and step 0331 can be performed by the first determining module 32 .
在某些实施方式中,处理器60还用于获取人脸姿态信息、及根据人脸姿态信息、人眼区域图像、人眼区域图像的权重,确定人眼注视信息。也即是说,步骤0321和步骤0331可以由处理器60执行。In some implementations, the processor 60 is further configured to acquire face pose information, and determine human eye gaze information according to the face pose information, the human eye region image, and the weight of the human eye region image. That is to say, step 0321 and step 0331 can be executed by the processor 60 .
步骤0321的具体描述请参照步骤0141,步骤0331的具体描述请参照步骤0151,在此不再赘述。For the specific description of step 0321, please refer to step 0141, and for the specific description of step 0331, please refer to step 0151, which will not be repeated here.
请参阅图3、图14和图20,在某些实施方式中,通过人眼控制电子设备100的方法还包括:Please refer to FIG. 3 , FIG. 14 and FIG. 20 , in some embodiments, the method for controlling the electronic device 100 through human eyes further includes:
0322:获取人脸图像,人脸图像包括人脸掩码;0322: Obtain a face image, where the face image includes a face mask;
0323:根据人脸掩码计算人脸相对电子设备100的位置信息;0323: Calculate the position information of the face relative to the electronic device 100 according to the face mask;
步骤033包括:Step 033 includes:
0332:根据位置信息、人眼区域图像和人眼区域图像的权重,确定人眼注视信息。0332: Determine the gaze information of the human eye according to the position information, the image of the human eye area, and the weight of the image of the human eye area.
在某些实施方式中,控制装置30还包括第三获取模块35和计算模块36,第三获取模块35和计算模块36可均设置在ISP,第三获取模块35用于获取人脸图像,计算模块36用于根据人脸掩码计算人脸相对电子设备100的位置信息。也即是说,步骤0322可以由第三获取模块35执行,步骤0332可以由计算模块16执行,步骤0332可以由第一确定模块32执行。In some embodiments, the control device 30 also includes a third acquisition module 35 and a calculation module 36, both of the third acquisition module 35 and the calculation module 36 can be set at the ISP, and the third acquisition module 35 is used to acquire a face image, calculate The module 36 is used for calculating the position information of the face relative to the electronic device 100 according to the face mask. That is to say, step 0322 can be performed by the third acquisition module 35 , step 0332 can be performed by the calculation module 16 , and step 0332 can be performed by the first determination module 32 .
在某些实施方式中,处理器60还用于获取人脸姿态信息、及根据人脸姿态信息、人眼区域图像、人眼区域图像的权重,确定人眼注视信息。也即是说,步骤0322、步骤323和步骤0332可以由处理器60执行。In some implementations, the processor 60 is further configured to acquire face pose information, and determine human eye gaze information according to the face pose information, the human eye region image, and the weight of the human eye region image. That is to say, step 0322 , step 323 and step 0332 may be executed by the processor 60 .
具体地,步骤0322、步骤0323和步骤0332的具体描述请分别参阅步骤0142、步骤0143和步骤0152,在此不再赘述。Specifically, for detailed descriptions of Step 0322, Step 0323, and Step 0332, please refer to Step 0142, Step 0143, and Step 0152, respectively, and details are not repeated here.
请参阅图3、图14和图21,在某些实施方式中,通过人眼控制电子设备100的方法还包括:Please refer to FIG. 3 , FIG. 14 and FIG. 21 , in some embodiments, the method for controlling the electronic device 100 through human eyes further includes:
0301:获取训练样本集,训练样本集包括多个人眼区域图像;0301: Obtain a training sample set, the training sample set includes multiple human eye area images;
0302:根据人眼区域图像确定遮挡区域和/或图像偏移参数;0302: Determine the occlusion area and/or image offset parameters according to the human eye area image;
0303:根据人眼区域图像、遮挡区域、及图像偏移参数训练人眼检测模型。0303: Train the human eye detection model according to the human eye area image, occlusion area, and image offset parameters.
步骤033包括:Step 033 includes:
0333:基于人眼检测模型,根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息。0333: Based on the human eye detection model, determine the human eye gaze information according to the human eye area image and the weight of the human eye area image.
在某些实施方式中,控制装置30还包括第四获取模块37、第二确定模块38和训练模块39。第四获取模块37、第二确定模块38和训练模块39均可设置在NPU,以进行人眼检测模型的训练。第四获取模块37用于获取训练样本集、第二确定模块38用于根据人眼区域图像确定遮挡区域和/或图像偏移参数;训练模块39用于根据人眼区域图像、遮挡区域、及图像偏移参数训练人眼检测模型。第一确定模块32可用于基于人眼检测模型,根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息。也即是说,步骤0301可以由第四获取模块37执行、步骤0302可以由第二确定模块38执行、步骤0103可以由训练模块39执行,步骤0333可以由第一确定模块32执行。In some implementations, the control device 30 further includes a fourth acquisition module 37 , a second determination module 38 and a training module 39 . The fourth acquiring module 37, the second determining module 38 and the training module 39 can all be set in the NPU to train the human eye detection model. The fourth acquisition module 37 is used to obtain the training sample set, the second determination module 38 is used to determine the occlusion area and/or image offset parameters according to the human eye area image; Image offset parameters to train the human eye detection model. The first determining module 32 may be configured to determine human eye gaze information based on the human eye detection model and according to the human eye region image and the weight of the human eye region image. That is to say, step 0301 can be performed by the fourth acquisition module 37 , step 0302 can be performed by the second determination module 38 , step 0103 can be performed by the training module 39 , and step 0333 can be performed by the first determination module 32 .
在某些实施方式中,处理器60还用于获取训练样本集,训练样本集包括多个人眼区域图像;根据人眼区域图像确定遮挡区域和/或图像偏移参数;根据人眼区域图像、遮挡区域、及图像偏移参数训练人眼检测模型;基于人眼检测模型,根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息。也即是说,步骤0301、步骤0302、步骤0303和步骤0333可以由处理器60执行。In some embodiments, the processor 60 is further configured to obtain a training sample set, the training sample set includes a plurality of human eye area images; determine the occlusion area and/or image offset parameters according to the human eye area images; according to the human eye area images, The occlusion area and image offset parameters train the human eye detection model; based on the human eye detection model, the human eye gaze information is determined according to the weight of the human eye area image and the human eye area image. That is to say, step 0301 , step 0302 , step 0303 and step 0333 may be executed by the processor 60 .
具体的,步骤0301、步骤0302、步骤0303和步骤0333的具体描述请分别参阅步骤0101、步骤0102、步骤0103和步骤0153,在此不再赘述。Specifically, for specific descriptions of Step 0301, Step 0302, Step 0303, and Step 0333, please refer to Step 0101, Step 0102, Step 0103, and Step 0153, respectively, and details are not repeated here.
请参阅图3、图14和图22,在某些实施方式中,步骤0303包括:Referring to Fig. 3, Fig. 14 and Fig. 22, in some embodiments, step 0303 includes:
03031:将人眼区域图像、遮挡区域、及图像偏移参数输入人眼检测模型,以输出训练坐标;03031: Input the human eye area image, occlusion area, and image offset parameters into the human eye detection model to output training coordinates;
03032:基于预设的损失函数,根据人眼区域图像对应的预设坐标和训练坐标,计算损失值;03032: Based on the preset loss function, calculate the loss value according to the preset coordinates and training coordinates corresponding to the human eye area image;
03033:根据损失值调整人眼检测模型,直至人眼检测模型收敛。03033: Adjust the eye detection model according to the loss value until the eye detection model converges.
在某些实施方式中,训练模块39还用于将人眼区域图像、遮挡区域、及图像偏移参数输入人眼检测模型,以输出训练坐标;基于预设的损失函数,根据人眼区域图像对应的预设坐标和训练坐标,计算损失值;根据损失值调整人眼检测模型,直至人眼检测模型收敛。也即是说,步骤03031至步骤03033可以由训练模块39执行。In some embodiments, the training module 39 is also used to input the human eye area image, occlusion area, and image offset parameters into the human eye detection model to output training coordinates; based on a preset loss function, according to the human eye area image Calculate the loss value for the corresponding preset coordinates and training coordinates; adjust the human eye detection model according to the loss value until the human eye detection model converges. That is to say, Step 03031 to Step 03033 can be executed by the training module 39 .
在某些实施方式中,处理器60还用于将人眼区域图像、遮挡区域、及图像偏移参数输入人眼检测模型,以输出训练坐标;基于预设的损失函数,根据人眼区域图像对应的预设坐标和训练坐标,计算损失值;根据损失值调整人眼检测模型,直至人眼检测模型收敛。也即是说,步骤03031至步骤03033可以由处理器60执行。In some embodiments, the processor 60 is further configured to input the human eye region image, occlusion region, and image offset parameters into the human eye detection model to output training coordinates; based on a preset loss function, according to the human eye region image Calculate the loss value for the corresponding preset coordinates and training coordinates; adjust the human eye detection model according to the loss value until the human eye detection model converges. That is to say, Step 03031 to Step 03033 may be executed by the processor 60 .
具体的,步骤03031、步骤03032和步骤03033的具体描述请分别参阅步骤01031、步骤01032和步骤01033,在此不再赘述。Specifically, for specific descriptions of Step 03031, Step 03032, and Step 03033, please refer to Step 01031, Step 01032, and Step 01033, respectively, and details are not repeated here.
请参阅图3、图11和图23,在某些实施方式中,人眼注视信息包括注视点坐标,在获取人眼区域图像之前,通过人眼控制电子设备100的方法还包括:Please refer to FIG. 3, FIG. 11 and FIG. 23. In some implementations, the gaze information of the human eye includes gaze point coordinates. Before acquiring the image of the human eye area, the method for controlling the electronic device 100 through the human eye further includes:
0301:在息屏前的第一预定时长内,获取拍摄图像;0301: Obtain the captured image within the first predetermined time period before the screen is off;
0302:响应于拍摄图像中包含人脸;0302: Responding to a captured image containing a human face;
步骤035包括:Step 035 includes:
0351:响应于注视点坐标位于显示屏40的显示区域,持续亮屏第二预定时长。0351: In response to the gaze point coordinates being located in the display area of the display screen 40, keep the screen on for a second predetermined duration.
在某些实施方式中,控制模块33还用于在息屏前的第一预定时长内,获取拍摄图像;响应于拍摄图像中包含人脸;响应于注视点坐标位于显示屏40的显示区域,持续亮屏第二预定时长。也即是说,步骤0301、步骤0302和步骤0351 可以由控制模块33执行。In some implementations, the control module 33 is also configured to acquire a captured image within the first predetermined time before the screen is off; in response to the captured image containing a human face; in response to the gaze point coordinates being located in the display area of the display screen 40, Keep the screen on for a second predetermined duration. That is to say, step 0301 , step 0302 and step 0351 can be executed by the control module 33 .
在某些实施方式中,处理器60还用于在息屏前的第一预定时长内,获取拍摄图像;响应于拍摄图像中包含人脸;响应于注视点坐标位于显示屏40的显示区域,持续亮屏第二预定时长。也即是说,步骤0351和步骤0352可以由处理器60执行。In some implementations, the processor 60 is further configured to acquire a captured image within the first predetermined time period before the screen turns off; in response to the captured image containing a human face; in response to the gaze point coordinates being located in the display area of the display screen 40, Keep the screen on for a second predetermined duration. That is to say, step 0351 and step 0352 can be executed by the processor 60 .
具体的,人眼注视信息可用于实现息屏控制,在息屏前,首先进行注视检测,如处理器60首先获取拍摄图像,若拍摄图像中存在人脸,则根据拍摄图像进行人眼注视信息的确定,当然,为了保证息屏前具有足够时间获取拍摄图像和计算人眼注视信息,需要在息屏前的第一预定时长(如5秒、10秒等)内获取拍摄图像。Specifically, the human eye gaze information can be used to realize off-screen control. Before the screen is off, gaze detection is first performed. For example, the processor 60 first obtains a captured image. If there is a human face in the captured image, the human eye gaze information is performed according to the captured image. Of course, in order to ensure that there is enough time to acquire the captured image and calculate the gaze information before the screen is closed, it is necessary to acquire the captured image within the first predetermined time period (such as 5 seconds, 10 seconds, etc.) before the screen is closed.
请参阅图24和图25,当注视点M位于显示屏40的显示区域内时,则可确定用户正在注视显示屏40,从而使得显示屏40持续亮屏第二预定时长,第二预定时长可大于第一预定时长,而在再次息屏前第一预定时长内,则再次获取拍摄图像,从而实现在用户注视显示屏40时,保持亮屏,在用户不再注视显示屏40时,再息屏。Referring to Fig. 24 and Fig. 25, when the gaze point M is located in the display area of the display screen 40, it can be determined that the user is watching the display screen 40, so that the display screen 40 remains on for a second predetermined duration, and the second predetermined duration can be greater than the first predetermined time length, and within the first predetermined time length before the screen is turned off again, the captured image is acquired again, so that when the user looks at the display screen 40, the screen remains bright, and when the user no longer looks at the display screen 40, the screen is turned off again. Screen.
其中,请再次参阅图18,可以显示区域的中心作为坐标原点O2,建立平行显示屏40的二维坐标系,显示区域与预设坐标范围相关联,即显示区域在该二维坐标系的横坐标范围和纵坐标范围,作为预设坐标范围,当注视点坐标位于预设坐标范围内(即注视点坐标的横坐标位于横坐标范围内且纵坐标位于纵坐标范围内)时,即可确定注视点坐标位于显示区域内,从而较为简单地判断用户是否注视显示屏40。Wherein, please refer to FIG. 18 again, the center of the display area can be used as the coordinate origin O2 to establish a two-dimensional coordinate system parallel to the display screen 40, and the display area is associated with a preset coordinate range, that is, the display area is in the horizontal direction of the two-dimensional coordinate system. The coordinate range and the ordinate range, as the preset coordinate range, can be determined when the gaze point coordinates are within the preset coordinate range (that is, the abscissa of the gaze point coordinates is within the abscissa range and the ordinate is within the ordinate range). The gaze point coordinates are located in the display area, so it is relatively simple to determine whether the user gazes at the display screen 40 .
且由于仅在息屏前的第一预定时长内才进行拍摄图像的获取和人眼注视信息的计算,有利于节省功耗。Moreover, since the acquisition of captured images and the calculation of gaze information of human eyes are performed only within the first predetermined period of time before the screen turns off, it is beneficial to save power consumption.
请参阅图3、图14和图26,在某些实施方式中,人眼注视信息包括注视点坐标,在获取人眼区域图像之前,通过人眼控制电子设备100的方法还包括:Please refer to FIG. 3, FIG. 14 and FIG. 26. In some implementations, the gaze information of the human eye includes the gaze point coordinates. Before acquiring the image of the human eye area, the method for controlling the electronic device 100 through the human eye further includes:
0303:响应于电子设备100未接收到输入操作的情况,获取拍摄图像;0303: Obtain a captured image in response to the fact that the electronic device 100 does not receive an input operation;
步骤035包括:Step 035 includes:
0352:响应于拍摄图像中包含人脸且注视点坐标位于显示区域,调节显示屏40的显示亮度至第一预定亮度;0352: Adjust the display brightness of the display screen 40 to a first predetermined brightness in response to the captured image containing a human face and the gaze point coordinates are located in the display area;
0353:响应于拍摄图像中不包含人脸、或拍摄图像中包含人脸且注视点坐标位于显示区域之外,调节显示亮度至第二预定亮度,第二预定亮度小于第一预定亮度。0353: In response to the fact that the captured image does not contain a human face, or the captured image contains a human face and the gaze point coordinates are outside the display area, adjust the display brightness to a second predetermined brightness, where the second predetermined brightness is smaller than the first predetermined brightness.
在某些实施方式中,控制模块33还用于响应于电子设备100未接收到输入操作的情况,获取拍摄图像、响应于拍摄图像中包含人脸且注视点坐标位于显示区域,调节显示屏40的显示亮度至第一预定亮度、及响应于拍摄图像中不包含人脸、或拍摄图像中包含人脸且注视点坐标位于显示区域之外,调节显示亮度至第二预定亮度,第二预定亮度小于第一预定亮度。也即是说,步骤0303、步骤0352和步骤0353可以由控制模块33执行。In some implementations, the control module 33 is further configured to acquire a captured image in response to the fact that the electronic device 100 does not receive an input operation, and adjust the display screen 40 in response to the captured image containing a human face and the coordinates of the gaze point located in the display area. Adjust the display brightness to the first predetermined brightness, and adjust the display brightness to the second predetermined brightness in response to the fact that the captured image does not contain a human face, or the captured image contains a human face and the gaze point coordinates are outside the display area, and the second predetermined brightness less than the first predetermined brightness. That is to say, step 0303 , step 0352 and step 0353 can be executed by the control module 33 .
在某些实施方式中,处理器60还用于响应于电子设备100未接收到输入操作的情况,获取拍摄图像、响应于拍摄图像中包含人脸且注视点坐标位于显示区域,调节显示屏40的显示亮度至第一预定亮度、及响应于拍摄图像中不包含人脸、或拍摄图像中包含人脸且注视点坐标位于显示区域之外,调节显示亮度至第二预定亮度,第二预定亮度小于第一预定亮度。也即是说,步骤0303、步骤0352和步骤0353可以由处理器60执行。In some implementations, the processor 60 is further configured to acquire a captured image in response to the fact that the electronic device 100 does not receive an input operation, and adjust the display screen 40 in response to the captured image containing a human face and the coordinates of the gaze point located in the display area. Adjust the display brightness to the first predetermined brightness, and adjust the display brightness to the second predetermined brightness in response to the fact that the captured image does not contain a human face, or the captured image contains a human face and the gaze point coordinates are outside the display area, and the second predetermined brightness less than the first predetermined brightness. That is to say, step 0303 , step 0352 and step 0353 can be executed by the processor 60 .
具体的,请再次参阅图24和图25,人眼注视信息还可用于实现智能亮屏,电子设备100为了节省电量,一般在亮屏一定时长后,会先降低显示亮度,然后以低亮度亮屏一定时长后则息屏。本实施方式中,在电子设备100未接收到用户的输入操作的情况下,此时可判断用户可能并未在使用电子设备100或者仅在查看显示内容,处理器60可获取拍摄图像,若拍摄图像包含人脸,则根据拍摄图像计算人眼注视信息,若注视点坐标位于显示区域,则说明用户虽然未操作电子设备100,但在查看显示内容,此时将显示亮度调节到第一预定亮度,第一预定亮度可以是显示屏40正常显示时,由用户自定义设置的亮度,或者根据环境光亮度实时进行变化以适应环境光的亮度,从而保证用户即使不操作电子设备100,仍能够亮屏,以防止在用户未操作电子设备100,但在查看显示内容时突然息屏影响用户体验的情况。Specifically, please refer to Fig. 24 and Fig. 25 again. The human eye gaze information can also be used to realize intelligent brightening of the screen. In order to save power, the electronic device 100 will generally reduce the display brightness first after a certain period of time when the screen is bright, and then turn on the screen with a low brightness. After a certain period of time, the screen will stop. In this embodiment, when the electronic device 100 does not receive the user's input operation, it can be judged that the user may not be using the electronic device 100 or is only viewing the displayed content, and the processor 60 can obtain the captured image. If the image contains a human face, the gaze information of the human eye is calculated according to the captured image. If the coordinates of the gaze point are located in the display area, it means that although the user is not operating the electronic device 100, but is checking the display content, the display brightness is adjusted to the first predetermined brightness at this time. The first predetermined brightness may be the brightness set by the user when the display screen 40 is normally displayed, or it may be changed in real time according to the brightness of the ambient light to adapt to the brightness of the ambient light, so as to ensure that the user can still brighten the electronic device 100 even if the user does not operate the electronic device 100. screen, so as to prevent the situation that the user does not operate the electronic device 100 but suddenly turns off the screen when viewing the displayed content and affects the user experience.
而在电子设备100未接收到输入操作情况下,若拍摄图像中不包含人脸、或者拍摄图像虽然包含人脸,注视点坐标在显示区域之外时(即用户并未查看显示区域),则可确定用户当前并不需要使用电子设备100,因此,此时可将显示亮度调节到第二预定亮度,第二预定亮度小于第一预定亮度,从而防止不必要的电量损耗。在用户再次注视显示区域时,则又将显示亮度调节到第一预定亮度,保证用户正常的观看体验。如此,可实现在用户未操作电子设备100情况下,用户注视显示区域,显示区域以正常亮度显示,用户不注视显示区域,则以低亮度显示,在保证用户观看体验的基础上,最大化的节省电量。However, when the electronic device 100 does not receive an input operation, if the captured image does not contain a human face, or although the captured image contains a human face, the gaze point coordinates are outside the display area (that is, the user does not view the display area), then It can be determined that the user does not need to use the electronic device 100 at present, therefore, at this time, the display brightness can be adjusted to a second predetermined brightness, which is smaller than the first predetermined brightness, so as to prevent unnecessary power consumption. When the user looks at the display area again, the display brightness is adjusted to the first predetermined brightness again, so as to ensure the normal viewing experience of the user. In this way, it can be realized that when the user does not operate the electronic device 100, the user looks at the display area, and the display area is displayed at normal brightness; Save battery.
请参阅图3、图27和图28,本申请实施方式的人眼检测模型的训练方法包括:Please refer to Fig. 3, Fig. 27 and Fig. 28, the training method of the human eye detection model of the embodiment of the present application includes:
041:获取训练样本集,训练样本集包括多个人眼区域图像;041: Obtain a training sample set, the training sample set includes multiple human eye area images;
042:根据人眼区域图像确定遮挡区域和/或图像偏移参数;042: Determine the occlusion area and/or image offset parameters according to the human eye area image;
043:根据人眼区域图像、遮挡区域、及图像偏移参数训练人眼检测模型。043: Train the human eye detection model according to the human eye area image, occlusion area, and image offset parameters.
本申请实施方式的训练装置40包括获取模块41、确定模块42和训练模块43。获取模块41、确定模块42和训练模块43均可设置在NPU,以进行人眼检测模型的训练。获取模块41用于获取训练样本集、确定模块42用于根据人眼区域图像确定遮挡区域和/或图像偏移参数;训练模块43用于根据人眼区域图像、遮挡区域、及图像偏移参数训练人眼检测模型。也即是说,步骤041可以由获取模块41执行、步骤042可以由确定模块42执行、步骤043可以由训练模块43执行。The training device 40 in the embodiment of the present application includes an acquisition module 41 , a determination module 42 and a training module 43 . The acquiring module 41, the determining module 42 and the training module 43 can all be set in the NPU to train the human eye detection model. The obtaining module 41 is used to obtain the training sample set, and the determining module 42 is used to determine the occlusion area and/or image offset parameters according to the human eye area image; the training module 43 is used to determine the human eye area image, the occlusion area, and the image offset parameters Train the human eye detection model. That is to say, step 041 may be performed by the acquisition module 41 , step 042 may be performed by the determination module 42 , and step 043 may be performed by the training module 43 .
在某些实施方式中,处理器60还用于获取训练样本集,训练样本集包括多个人眼区域图像;根据人眼区域图像确定遮挡区域和/或图像偏移参数;根据人眼区域图像、遮挡区域、及图像偏移参数训练人眼检测模型。也即是说,步骤041、步骤042和步骤043可以由处理器60执行。In some embodiments, the processor 60 is further configured to obtain a training sample set, the training sample set includes a plurality of human eye area images; determine the occlusion area and/or image offset parameters according to the human eye area images; according to the human eye area images, The occlusion area and image offset parameters are used to train the human eye detection model. That is to say, step 041 , step 042 and step 043 may be executed by the processor 60 .
具体的,步骤041、步骤042和步骤043的具体描述请分别参照步骤0101、步骤0102和步骤0103,在此不再赘述。Specifically, please refer to step 0101, step 0102, and step 0103 for specific descriptions of step 041, step 042, and step 043, and details are not repeated here.
请参阅图29,本申请实施方式的一个或多个包含计算机程序302的非易失性计算机可读存储介质300,当计算机程序302被一个或多个处理器60执行时,使得处理器60可执行上述任一实施方式的人眼注视检测方法或通过人眼控制电子设备100的方法。Referring to FIG. 29 , one or more non-transitory computer-readable storage media 300 containing a computer program 302 according to an embodiment of the present application, when the computer program 302 is executed by one or more processors 60, the processors 60 can Execute the human eye gaze detection method or the method for controlling the electronic device 100 through human eyes in any one of the above embodiments.
例如,请结合图1至图3,当计算机程序302被一个或多个处理器60执行时,使得处理器60执行以下步骤:For example, referring to FIG. 1 to FIG. 3 , when the computer program 302 is executed by one or more processors 60, the processors 60 are made to perform the following steps:
011:获取人眼区域图像;011: Obtain the image of the human eye area;
013:根据人眼区域图像的缺失信息,确定人眼区域图像的权重;013: Determine the weight of the human eye area image according to the missing information of the human eye area image;
015:根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息。015: According to the weight of the human eye area image and the human eye area image, determine the human eye gaze information.
再例如,请结合图3、图10和图11,当计算机程序302被一个或多个处理器60执行时,处理器60还可以执行以下步骤:For another example, please refer to FIG. 3 , FIG. 10 and FIG. 11 , when the computer program 302 is executed by one or more processors 60, the processors 60 may also perform the following steps:
021:获取人脸图像;021: Obtain a face image;
022:根据人脸图像确定人眼区域图像以及人脸姿态信息;022: Determine the human eye area image and face posture information according to the face image;
023:根据人眼区域图像的缺失信息,确定人眼区域图像的权重;023: Determine the weight of the human eye area image according to the missing information of the human eye area image;
024:根据人眼区域图像和人眼区域图像的权重,确定人眼特征信息;024: Determine the human eye feature information according to the human eye area image and the weight of the human eye area image;
025:根据人眼特征信息以及人脸姿态信息,确定人眼注视信息。025: Determine the gaze information of the human eye based on the feature information of the human eye and the posture information of the human face.
再例如,请结合图3、图13和图14,当计算机程序302被一个或多个处理器60执行时,处理器60还可以执行以下步骤:For another example, please refer to FIG. 3 , FIG. 13 and FIG. 14 , when the computer program 302 is executed by one or more processors 60, the processors 60 may also perform the following steps:
031:获取人眼区域图像;031: Obtain the image of the human eye area;
033:根据人眼区域图像和人眼区域图像的权重,确定人眼注视信息,其中,人眼区域图像的权重根据人眼区域图像的缺失信息确定;及033: Determine the gaze information of the human eye according to the human eye area image and the weight of the human eye area image, wherein the weight of the human eye area image is determined according to the missing information of the human eye area image; and
035:根据人眼注视信息控制电子设备100。035: Control the electronic device 100 according to the gaze information of human eyes.
在本说明书的描述中,参考术语“一个实施方式”、“一些实施方式”、“示意性实施方式”、“示例”、“具体示例”或“一些示例”等的描述意指结合实施方式或示例描述的具体特征、结构、材料或者特点包含于本申请的至少一个实施方式或示例中。在本说明书中,对上述术语的示意性表述不一定指的是相同的实施方式或示例。而且,描述的具体特征、结构、材料或者特点可以在任何的一个或多个实施方式或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施方式或示例以及不同实施方式或示例的特征进行结合和组合。In the description of this specification, descriptions with reference to the terms "one embodiment", "some embodiments", "exemplary embodiments", "example", "specific examples" or "some examples" mean that a combination of the embodiments or Examples describe specific features, structures, materials, or characteristics that are included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the described specific features, structures, materials or characteristics may be combined in any suitable manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine different embodiments or examples and features of different embodiments or examples described in this specification without conflicting with each other.
流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现特定逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本申请的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本申请的实施方式所属技术领域的技术人员所理解。Any process or method descriptions in flowcharts or otherwise described herein may be understood to represent modules, segments or portions of code comprising one or more executable instructions for implementing specific logical functions or steps of the process , and the scope of preferred embodiments of the present application includes additional implementations in which functions may be performed out of the order shown or discussed, including in substantially simultaneous fashion or in reverse order depending on the functions involved, which shall It should be understood by those skilled in the art to which the embodiments of the present application belong.
尽管上面已经示出和描述了本申请的实施方式,可以理解的是,上述实施方式是示例性的,不能理解为对本申请的限制,本领域的普通技术人员在本申请的范围内可以对上述实施方式进行变化、修改、替换和变型。Although the implementation of the present application has been shown and described above, it can be understood that the above-mentioned implementation is exemplary and should not be construed as limiting the application, and those skilled in the art can make the above-mentioned The embodiments are subject to changes, modifications, substitutions and variations.

Claims (26)

  1. 一种人眼注视检测方法,其特征在于,包括:A human eye gaze detection method, characterized in that, comprising:
    获取人眼区域图像;Obtain an image of the human eye area;
    根据所述人眼区域图像的缺失信息,确定所述人眼区域图像的权重;determining the weight of the human eye region image according to the missing information of the human eye region image;
    根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼注视信息。Determine human eye gaze information according to the human eye area image and the weight of the human eye area image.
  2. 根据权利要求1所述的人眼注视检测方法,其特征在于,还包括:The human eye gaze detection method according to claim 1, further comprising:
    获取人脸姿态信息;Obtain face pose information;
    所述根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼注视信息,包括:According to the weight of the human eye area image and the human eye area image, determining the human eye gaze information includes:
    根据所述人脸姿态信息、所述人眼区域图像、所述人眼区域图像的权重,确定人眼注视信息。Determine human eye gaze information according to the human face posture information, the human eye area image, and the weight of the human eye area image.
  3. 根据权利要求1所述的人眼注视检测方法,其特征在于,所述人眼区域图像包括左眼区域图像和右眼区域图像,所述根据所述人眼区域图像的缺失信息,确定所述人眼区域图像的权重,包括:The human eye gaze detection method according to claim 1, wherein the human eye region image comprises a left eye region image and a right eye region image, and the determination of the The weight of the image of the human eye area, including:
    根据所述左眼区域图像的第一缺失信息确定所述左眼区域图像的第一权重,以及determining a first weight of the left-eye region image according to first missing information of the left-eye region image, and
    根据所述右眼区域图像的第二缺失信息确定所述右眼区域图像的第二权重。Determining a second weight of the right eye area image according to the second missing information of the right eye area image.
  4. 根据权利要求1所述的人眼注视检测方法,其特征在于,还包括:The human eye gaze detection method according to claim 1, further comprising:
    获取人脸图像,所述人脸图像包括人脸掩码;Obtain a face image, the face image includes a face mask;
    根据所述人脸掩码计算人脸相对电子设备的位置信息;Calculate the position information of the face relative to the electronic device according to the face mask;
    所述根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼注视信息,包括:According to the weight of the human eye area image and the human eye area image, determining the human eye gaze information includes:
    根据所述位置信息、所述人眼区域图像和所述人眼区域图像的权重,确定人眼注视信息。Determine human eye gaze information according to the position information, the human eye area image, and the weight of the human eye area image.
  5. 根据权利要求1所述的人眼注视检测方法,其特征在于,还包括:The human eye gaze detection method according to claim 1, further comprising:
    获取训练样本集,所述训练样本集包括多个所述人眼区域图像;Obtain a training sample set, the training sample set includes a plurality of images of the human eye region;
    根据所述人眼区域图像确定遮挡区域和/或图像偏移参数;determining an occlusion area and/or an image offset parameter according to the human eye area image;
    根据所述人眼区域图像、所述遮挡区域、及所述图像偏移参数训练人眼检测模型;Training a human eye detection model according to the human eye area image, the occluded area, and the image offset parameters;
    所述根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼注视信息,包括:According to the weight of the human eye area image and the human eye area image, determining the human eye gaze information includes:
    基于所述人眼检测模型,根据所述人眼区域图像和所述人眼区域图像的权重,确定所述人眼注视信息。Based on the human eye detection model, the human eye gaze information is determined according to the human eye area image and the weight of the human eye area image.
  6. 根据权利要求5所述的人眼注视检测方法,其特征在于,所述根据所述人眼区域图像、所述遮挡区域、所述图像偏移参数训练人眼检测模型,包括:The human eye gaze detection method according to claim 5, wherein the human eye detection model is trained according to the human eye area image, the occluded area, and the image offset parameters, comprising:
    将所述人眼区域图像、所述遮挡区域、及所述图像偏移参数输入所述人眼检测模型,以输出训练坐标;inputting the human eye area image, the occluded area, and the image offset parameters into the human eye detection model to output training coordinates;
    基于预设的损失函数,根据所述人眼区域图像对应的预设坐标和所述训练坐标,计算损失值;Based on a preset loss function, calculate a loss value according to preset coordinates corresponding to the human eye area image and the training coordinates;
    根据所述损失值调整所述人眼检测模型,直至所述人眼检测模型收敛。Adjusting the human eye detection model according to the loss value until the human eye detection model converges.
  7. 根据权利要求6所述的人眼注视检测方法,其特征在于,所述遮挡区域根据将所述人眼区域图像中的至少一部分像素替换为预定像素值的像素生成;所述图像偏移参数根据对所述人眼区域图像中的人眼特征点进行图像偏移生成。The human eye gaze detection method according to claim 6, wherein the occlusion region is generated according to pixels that replace at least a part of pixels in the human eye region image with predetermined pixel values; the image offset parameters are based on Image offset generation is performed on the human eye feature points in the human eye area image.
  8. 一种人眼注视检测方法,其特征在于,包括:A human eye gaze detection method, characterized in that, comprising:
    获取人脸图像;Get face image;
    根据所述人脸图像确定人眼区域图像以及人脸姿态信息;Determining the human eye area image and facial posture information according to the human face image;
    根据所述人眼区域图像的缺失信息,确定所述人眼区域图像的权重;determining the weight of the human eye region image according to the missing information of the human eye region image;
    根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼特征信息;determining human eye feature information according to the human eye region image and the weight of the human eye region image;
    根据所述人眼特征信息以及所述人脸姿态信息,确定人眼注视信息。Determine human eye gaze information according to the human eye feature information and the human face posture information.
  9. 根据权利要求8所述的人眼注视检测方法,其特征在于,所述人脸图像包括人脸掩码,所述根据所述人眼特征信息以及所述人脸姿态信息,确定人眼注视信息,包括:The human eye gaze detection method according to claim 8, wherein the human face image comprises a human face mask, and the human eye gaze information is determined according to the human eye feature information and the human face posture information ,include:
    根据所述人脸掩码计算人脸相对电子设备的位置信息;Calculate the position information of the face relative to the electronic device according to the face mask;
    根据所述位置信息、所述人眼特征信息以及所述人脸姿态信息,确定人眼注视信息。Determine human eye gaze information according to the position information, the human eye feature information, and the human face posture information.
  10. 一种通过人眼控制电子设备的方法,其特征在于,包括:A method for controlling an electronic device through human eyes, comprising:
    获取人眼区域图像;Obtain an image of the human eye region;
    根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼注视信息,其中,所述人眼区域图像的权重根据所述人眼区域图像的缺失信息确定;及Determine human eye gaze information according to the human eye region image and the weight of the human eye region image, wherein the weight of the human eye region image is determined according to missing information of the human eye region image; and
    根据所述人眼注视信息控制所述电子设备。The electronic device is controlled according to the gaze information of the human eyes.
  11. 根据权利要求10所述的通过人眼控制电子设备的方法,其特征在于,还包括:The method for controlling an electronic device through human eyes according to claim 10, further comprising:
    获取人脸姿态信息;Obtain face pose information;
    所述根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼注视信息,包括:According to the weight of the human eye area image and the human eye area image, determining the human eye gaze information includes:
    根据所述人脸姿态信息、所述人眼区域图像、所述人眼区域图像的权重,确定人眼注视信息。Determine human eye gaze information according to the human face posture information, the human eye area image, and the weight of the human eye area image.
  12. 根据权利要求10所述的通过人眼控制电子设备的方法,其特征在于,所述人眼区域图像包括左眼区域图像和右眼区域图像,所述左眼区域图像的第一权重根据所述左眼区域图像的第一缺失信息确定,所述右眼区域图像的第二权重根据所述右眼区域图像的第二缺失信息确定。The method for controlling an electronic device through human eyes according to claim 10, wherein the human eye region image includes a left eye region image and a right eye region image, and the first weight of the left eye region image is based on the The first missing information of the left-eye area image is determined, and the second weight of the right-eye area image is determined according to the second missing information of the right-eye area image.
  13. 根据权利要求10所述的通过人眼控制电子设备的方法,其特征在于,还包括:The method for controlling an electronic device through human eyes according to claim 10, further comprising:
    获取人脸图像,所述人脸图像包括人脸掩码;Obtain a face image, the face image includes a face mask;
    根据所述人脸掩码计算人脸相对电子设备的位置信息;Calculate the position information of the face relative to the electronic device according to the face mask;
    所述根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼注视信息,包括:According to the weight of the human eye area image and the human eye area image, determining the human eye gaze information includes:
    根据所述位置信息、所述人眼区域图像和所述人眼区域图像的权重,确定人眼注视信息。Determine human eye gaze information according to the position information, the human eye area image, and the weight of the human eye area image.
  14. 根据权利要求10所述的通过人眼控制电子设备的方法,其特征在于,还包括:The method for controlling an electronic device through human eyes according to claim 10, further comprising:
    获取训练样本集,所述训练样本集包括多个所述人眼区域图像;Obtain a training sample set, the training sample set includes a plurality of images of the human eye region;
    根据所述人眼区域图像确定遮挡区域和/或图像偏移参数;determining an occlusion area and/or an image offset parameter according to the human eye area image;
    根据所述人眼区域图像、所述遮挡区域、及所述图像偏移参数训练人眼检测模型;Training a human eye detection model according to the human eye area image, the occluded area, and the image offset parameters;
    所述根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼注视信息,包括:According to the weight of the human eye area image and the human eye area image, determining the human eye gaze information includes:
    基于所述人眼检测模型,根据所述人眼区域图像和所述人眼区域图像的权重,确定所述人眼注视信息。Based on the human eye detection model, the human eye gaze information is determined according to the human eye area image and the weight of the human eye area image.
  15. 根据权利要求14所述的通过人眼控制电子设备的方法,其特征在于,所述根据所述人眼区域图像、所述遮挡区域、所述图像偏移参数训练人眼检测模型,包括:The method for controlling an electronic device through human eyes according to claim 14, wherein the training of the human eye detection model according to the human eye area image, the occluded area, and the image offset parameters includes:
    将所述人眼区域图像、所述遮挡区域、及所述图像偏移参数输入所述人眼检测模型,以输出训练坐标;inputting the human eye area image, the occluded area, and the image offset parameters into the human eye detection model to output training coordinates;
    基于预设的损失函数,根据所述人眼区域图像对应的预设坐标和所述训练坐标,计算损失值;Based on a preset loss function, calculate a loss value according to preset coordinates corresponding to the human eye area image and the training coordinates;
    根据所述损失值调整所述人眼检测模型,直至所述人眼检测模型收敛。Adjusting the human eye detection model according to the loss value until the human eye detection model converges.
  16. 根据权利要求15所述的通过人眼控制电子设备的方法,其特征在于,所述遮挡区域根据将所述人眼区域图像中的至少一部分像素替换为预定像素值的像素生成;所述图像偏移参数根据对所述人眼区域图像中的人眼特征点进行图像偏移生成。The method for controlling an electronic device through human eyes according to claim 15, wherein the occlusion area is generated by replacing at least a part of pixels in the image of the human eye area with pixels of predetermined pixel values; The shift parameter is generated according to performing image shift on the human eye feature points in the human eye area image.
  17. 根据权利要求10所述的通过人眼控制电子设备的方法,其特征在于,所述人眼注视信息包括注视点坐标,在获取人眼区域图像之前,所述通过人眼控制电子设备的方法,还包括:The method for controlling an electronic device through human eyes according to claim 10, wherein the gaze information of the human eyes includes gaze point coordinates, and before acquiring the image of the human eye area, the method for controlling the electronic device through the human eyes, Also includes:
    在息屏前的第一预定时长内,获取拍摄图像;within the first predetermined period of time before the screen is off, acquire the photographed image;
    响应于所述拍摄图像中包含人脸;In response to the captured image containing a human face;
    所述根据所述人眼注视信息控制所述电子设备,还包括The controlling the electronic device according to the gaze information of the human eyes also includes
    响应于所述注视点坐标位于显示屏的显示区域,持续亮屏第二预定时长。In response to the gaze point coordinates being located in the display area of the display screen, the screen is kept on for a second predetermined duration.
  18. 根据权利要求17所述的通过人眼控制电子设备的方法,其特征在于,所述显示区域与预设坐标范围相关联,所述通过人眼控制电子设备的方法还包括:The method for controlling an electronic device through human eyes according to claim 17, wherein the display area is associated with a preset coordinate range, and the method for controlling an electronic device through human eyes further comprises:
    在所述注视点坐标位于所述预设坐标范围内时,确定所述注视点坐标位于所述显示区域。When the gaze point coordinates are within the preset coordinate range, it is determined that the gaze point coordinates are located in the display area.
  19. 根据权利要求10所述的通过人眼控制电子设备的方法,其特征在于,在获取人眼区域图像之前,所述通过人眼控制电子设备的方法,还包括:The method for controlling an electronic device through human eyes according to claim 10, wherein, before acquiring the image of the human eye area, the method for controlling an electronic device through human eyes further comprises:
    响应于所述电子设备未接收到输入操作的情况,获取拍摄图像;Acquiring a captured image in response to the fact that the electronic device does not receive an input operation;
    所述根据所述人眼注视信息控制所述电子设备,包括:The controlling the electronic device according to the gaze information of the human eyes includes:
    响应于所述拍摄图像中包含人脸且所述注视点坐标位于显示屏的显示区域,调节所述显示屏的显示亮度至第一预定亮度;Adjusting the display brightness of the display screen to a first predetermined brightness in response to the captured image containing a human face and the gaze point coordinates being located in a display area of the display screen;
    响应于所述拍摄图像中不包含人脸、或所述拍摄图像中包含人脸且所述注视点坐标位于所述显示区域之外,调节所述显示亮度至第二预定亮度,所述第二预定亮度小于所述第一预定亮度。In response to the captured image not containing a human face, or the captured image containing a human face and the gaze point coordinates are located outside the display area, adjusting the display brightness to a second predetermined brightness, the second The predetermined brightness is smaller than the first predetermined brightness.
  20. 一种检测装置,其特征在于,包括:A detection device is characterized in that it comprises:
    第一获取模块,用于获取人眼区域图像;The first acquisition module is used to acquire images of the human eye region;
    第一确定模块,用于根据所述人眼区域图像的缺失信息,确定所述人眼区域图像的权重;A first determining module, configured to determine the weight of the human eye region image according to the missing information of the human eye region image;
    第二确定模块,用于根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼注视信息。The second determination module is configured to determine human eye gaze information according to the human eye region image and the weight of the human eye region image.
  21. 一种检测装置,其特征在于,包括:A detection device is characterized in that it comprises:
    第一获取模块,用于获取人脸图像;The first acquisition module is used to acquire face images;
    第一确定模块,用于根据所述人脸图像确定人眼区域图像以及人脸姿态信息;The first determination module is used to determine the human eye area image and the facial posture information according to the human face image;
    第二确定模块,用于根据所述人眼区域图像的缺失信息,确定所述人眼区域图像的权重;The second determination module is used to determine the weight of the human eye area image according to the missing information of the human eye area image;
    第三确定模块,用于根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼特征信息;A third determining module, configured to determine human eye feature information according to the human eye area image and the weight of the human eye area image;
    第四确定模块,用于根据所述人眼特征信息以及所述人脸姿态信息,确定人眼注视信息。The fourth determination module is configured to determine human eye gaze information according to the human eye feature information and the human facial posture information.
  22. 一种控制装置,其特征在于,包括:A control device, characterized in that it comprises:
    第一获取模块,用于获取人眼区域图像;The first acquisition module is used to acquire images of the human eye region;
    第一确定模块,用于根据所述人眼区域图像和所述人眼区域图像的权重,确定人眼注视信息,其中,所述人眼区域图像的权重根据所述人眼区域图像的缺失信息确定;及The first determination module is configured to determine human eye gaze information according to the human eye area image and the weight of the human eye area image, wherein the weight of the human eye area image is based on the missing information of the human eye area image determine; and
    控制模块,用于根据所述人眼注视信息控制电子设备。A control module, configured to control electronic equipment according to the gaze information of human eyes.
  23. 一种电子设备,其特征在于,包括处理器,所述处理器用于执行权利要求1-7任意一项所述的人眼注视检测方法。An electronic device, characterized in that it includes a processor, the processor is configured to execute the human gaze detection method according to any one of claims 1-7.
  24. 一种电子设备,其特征在于,包括处理器,所述处理器用于执行权利要求8或9所述的人眼注视检测方法。An electronic device, characterized by comprising a processor, the processor is configured to execute the human gaze detection method according to claim 8 or 9.
  25. 一种电子设备,其特征在于,包括处理器,所述处理器用执行权利要求10-19任意一项所述的通过人眼控制电子设备的方法。An electronic device is characterized in that it includes a processor, and the processor is used to execute the method for controlling an electronic device through human eyes according to any one of claims 10-19.
  26. 一种包括计算机程序的非易失性计算机可读存储介质,所述计算机程序被处理器执行时,使得所述处理器执行权利要求1-7任意一项所述的人眼注视检测方法、或权利要求8或9所述的人眼注视检测方法、或权利要求10-19任意一项所述的通过人眼控制电子设备的方法。A non-volatile computer-readable storage medium comprising a computer program, when the computer program is executed by a processor, the processor is made to perform the human eye gaze detection method described in any one of claims 1-7, or The human eye gaze detection method described in claim 8 or 9, or the method for controlling electronic equipment through human eyes described in any one of claims 10-19.
PCT/CN2022/126122 2021-10-29 2022-10-19 Human eye gaze detection method, control method and related device WO2023071882A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111274110.3A CN113903078A (en) 2021-10-29 2021-10-29 Human eye gaze detection method, control method and related equipment
CN202111274110.3 2021-10-29

Publications (1)

Publication Number Publication Date
WO2023071882A1 true WO2023071882A1 (en) 2023-05-04

Family

ID=79026982

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/126122 WO2023071882A1 (en) 2021-10-29 2022-10-19 Human eye gaze detection method, control method and related device

Country Status (2)

Country Link
CN (1) CN113903078A (en)
WO (1) WO2023071882A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113903078A (en) * 2021-10-29 2022-01-07 Oppo广东移动通信有限公司 Human eye gaze detection method, control method and related equipment
CN116704589A (en) * 2022-12-01 2023-09-05 荣耀终端有限公司 Gaze point estimation method, electronic device and computer readable storage medium
CN117133043A (en) * 2023-03-31 2023-11-28 荣耀终端有限公司 Gaze point estimation method, electronic device, and computer-readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101489467A (en) * 2006-07-14 2009-07-22 松下电器产业株式会社 Visual axis direction detection device and visual line direction detection method
CN104766059A (en) * 2015-04-01 2015-07-08 上海交通大学 Rapid and accurate human eye positioning method and sight estimation method based on human eye positioning
CN110825220A (en) * 2019-09-29 2020-02-21 深圳市火乐科技发展有限公司 Eyeball tracking control method and device, intelligent projector and storage medium
CN113903078A (en) * 2021-10-29 2022-01-07 Oppo广东移动通信有限公司 Human eye gaze detection method, control method and related equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101489467A (en) * 2006-07-14 2009-07-22 松下电器产业株式会社 Visual axis direction detection device and visual line direction detection method
CN104766059A (en) * 2015-04-01 2015-07-08 上海交通大学 Rapid and accurate human eye positioning method and sight estimation method based on human eye positioning
CN110825220A (en) * 2019-09-29 2020-02-21 深圳市火乐科技发展有限公司 Eyeball tracking control method and device, intelligent projector and storage medium
CN113903078A (en) * 2021-10-29 2022-01-07 Oppo广东移动通信有限公司 Human eye gaze detection method, control method and related equipment

Also Published As

Publication number Publication date
CN113903078A (en) 2022-01-07

Similar Documents

Publication Publication Date Title
WO2023071884A1 (en) Gaze detection method, control method for electronic device, and related devices
WO2023071882A1 (en) Human eye gaze detection method, control method and related device
US9373156B2 (en) Method for controlling rotation of screen picture of terminal, and terminal
US9696859B1 (en) Detecting tap-based user input on a mobile device based on motion sensor data
US8942434B1 (en) Conflict resolution for pupil detection
US11715231B2 (en) Head pose estimation from local eye region
EP2634727B1 (en) Method and portable terminal for correcting gaze direction of user in image
WO2017113668A1 (en) Method and device for controlling terminal according to eye movement
CN104679225B (en) Screen adjustment method, screen adjustment device and the mobile terminal of mobile terminal
CN109375765B (en) Eyeball tracking interaction method and device
KR20190129947A (en) Methods and apparatus for determining facial image quality, electronic devices and computer storage media
US20150109204A1 (en) Human-machine interaction method and apparatus
US20160078680A1 (en) Technologies for adjusting a perspective of a captured image for display
WO2020042542A1 (en) Method and apparatus for acquiring eye movement control calibration data
TWI631506B (en) Method and system for whirling view on screen
WO2019062056A1 (en) Smart projection method and system, and smart terminal
CN104574321A (en) Image correction method and device and video system
CN108090463B (en) Object control method, device, storage medium and computer equipment
WO2018078857A1 (en) Line-of-sight estimation device, line-of-sight estimation method, and program recording medium
WO2021197466A1 (en) Eyeball detection method, apparatus and device, and storage medium
WO2018076172A1 (en) Image display method and terminal
WO2021135639A1 (en) Living body detection method and apparatus
WO2024021742A1 (en) Fixation point estimation method and related device
TWI768852B (en) Device for detecting human body direction and method for detecting human body direction
CN109377518A (en) Target tracking method, device, target tracking equipment and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22885760

Country of ref document: EP

Kind code of ref document: A1