Method and system for monitoring abnormality of facial images using binocular cameras
By acquiring RGB data of facial images through binocular cameras, using pupil distance correction factors and angle calculations, and combining them with a twin network model, the problem of unreliable pupil distance calculation results in existing technologies is solved, achieving more reliable anomaly monitoring.
Patent Information
- Application Number
- CN202111431702.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-29
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2041-11-29
AI Technical Summary
The existing method for calculating the pupil distance of a face does not consider the influence of the posture angle, resulting in unreliable monitoring results.
A binocular camera is used to obtain RGB data of facial images. By calculating the pupil distance correction factor α and the facial angles score_x and score_y, anomaly monitoring is performed in combination with the twin network model to improve the stability of pupil distance estimation and the credibility of monitoring results.
By adding a yaw angle correction factor and multimodal data analysis, the sensitivity of pupil distance estimation to angle is reduced, and the accuracy and stability of facial image anomaly monitoring are improved.
Smart Images

Figure CN114093007B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information and communication engineering, and in particular to a method and system for monitoring abnormalities in facial images using a binocular camera. Background Art
[0002] Facial recognition is a biometric technology that identifies people based on their facial features. It uses a camera or video camera to capture images or video streams containing faces, automatically detecting and tracking faces within the images, and then performing a series of related application operations on the detected facial images.
[0003] Before detecting a facial image, a facial recognition system monitors it for abnormalities. If an abnormality is detected, the system abandons detection, prompts the user to interact, and obtains a new facial image. Existing methods for detecting abnormalities include monitoring the pupillary distance (IPD). If the PPD falls outside a preset range, it is considered an image abnormality. However, existing methods for calculating PPD are based on key points and do not consider the influence of posture angle. When the posture angle is large, the PPD estimation is unreliable, leading to errors in the monitoring results. Summary of the Invention
[0004] The purpose of the present invention is to overcome the defects of the prior art and provide a method and system for monitoring facial image anomalies with a binocular camera, so as to solve the problem that the results of the existing face pupil distance calculation method are unreliable and thus lead to errors in the monitoring results.
[0005] The technical solution to achieve the above purpose is:
[0006] The present invention provides a method for monitoring abnormalities in facial images using a binocular camera, comprising the following steps:
[0007] Use binocular cameras to obtain RGB data of facial images;
[0008] Obtain left eye coordinate information, right eye coordinate information, and nose coordinate information based on the acquired face image RGB data;
[0009] The following formula is used to calculate the face pupil distance information:
[0010] Dist1=sqrt((e_x1-e_x2)^2+(e_y1-e_y2)^2),
[0011] Dist2=2*Dist1 / (1+α),
[0012] α=exp(-s*|n_x-(e_x1+e_x2) / 2| / (e_x2-e_x1)),
[0013] Where Dist1 represents the pixel value between the center of the left eye and the center of the right eye, Dist2 represents the pupil distance information of the face, e_x1 and e_y1 represent the left eye coordinate information, e_x2 and e_y2 represent the right eye coordinate information, α represents the pupil distance correction factor, s>0 represents the correction coefficient, and n_x represents the x-axis coordinate value of the nose coordinate information;
[0014] The calculated face pupil distance information is compared with the preset pupil distance range. If the face pupil distance information exceeds the preset pupil distance range, the judgment result is unqualified; if the face pupil distance information is within the preset pupil distance range, the judgment result is qualified.
[0015] The monitoring method of the present invention adds a correction factor for the yaw angle when calculating the pupillary distance of a human face, reduces the sensitivity of the pupillary distance estimation result to the angle, thereby improving the stability of the pupillary distance estimation and making the monitoring result more reliable.
[0016] A further improvement of the method for monitoring facial image anomalies using a binocular camera of the present invention is that it further comprises:
[0017] Obtaining left and right mouth corner coordinate information based on the acquired face image RGB data;
[0018] Use the following formula to calculate the face angle:
[0019] score_x=abs(n_x-e_x1) / (e_x2-e_x1);
[0020] score_y=abs(n_y-e_y) / (m_y-e_y);
[0021] e_y=(e_y1+e_y2) / 2;
[0022] m_y=(m_y1+m_y2) / 2;
[0023] Where score_x represents the horizontal rotation offset of the face, score_y represents the vertical rotation offset of the face, n_x and n_y represent the coordinate information of the nose, e_y represents the center of the vertical coordinates of the left and right eyes, m_y represents the center of the vertical coordinates of the left and right mouth corners, m_y1 represents the y-axis coordinate value of the left mouth corner coordinate information, and m_y2 represents the y-axis coordinate value of the right mouth corner coordinate information;
[0024] The calculated face angle score_x and score_y are compared with the preset angle range. If they exceed the preset angle range, the result is judged as unqualified; if they are within the preset angle range, the result is judged as qualified.
[0025] A further improvement of the method for monitoring facial image anomalies using a binocular camera of the present invention is that, while using the binocular camera to obtain RGB data of the facial image, infrared data of the facial image is also obtained;
[0026] The RGB data of the face image and the infrared data of the face image are fed into a twin network model to obtain a similarity score;
[0027] The obtained similarity score is compared with the preset score value. If it exceeds the preset score value, the result is judged as unqualified; if it is within the preset score value, the result is judged as qualified.
[0028] A further improvement of the method for monitoring facial image anomalies using a binocular camera of the present invention is that when the judgment result is unqualified, interactive prompt information is returned.
[0029] A further improvement of the method for monitoring facial image anomalies using a binocular camera of the present invention is that the preset pupil distance range is set according to the resolution of the binocular camera.
[0030] The present invention also provides a system for monitoring abnormalities in facial images using a binocular camera, comprising:
[0031] An image acquisition unit is connected to the binocular camera and is used to obtain RGB data of a face image using the binocular camera;
[0032] a key point detection unit, connected to the image acquisition unit, for acquiring left eye coordinate information, right eye coordinate information, and nose coordinate information from the RGB image of the face;
[0033] The face pupil distance calculation unit is connected to the key point detection unit and is used to calculate the face pupil distance information using the following formula:
[0034] Dist1=sqrt((e_x1-e_x2)^2+(e_y1-e_y2)^2),
[0035] Dist2=2*Dist1 / (1+α),
[0036] α=exp(-s*|n_x-(e_x1+e_x2) / 2| / (e_x2-e_x1)),
[0037] Where Dist1 represents the pixel value between the center of the left eye and the center of the right eye, Dist2 represents the pupil distance information of the face, e_x1 and e_y1 represent the left eye coordinate information, e_x2 and e_y2 represent the right eye coordinate information, α represents the pupil distance correction factor, s>0 represents the correction coefficient, and n_x represents the x-axis coordinate value of the nose coordinate information;
[0038] A processing unit is connected to the image acquisition unit, the key point detection unit, and the face pupil distance calculation unit, and is used to compare and judge the calculated face pupil distance information with a preset pupil distance range. If the face pupil distance information exceeds the preset pupil distance range, the result is judged to be unqualified; if the face pupil distance information is within the preset pupil distance range, the result is judged to be qualified.
[0039] A further improvement of the system for monitoring facial image anomalies with a binocular camera of the present invention is that it further includes a facial angle calculation unit connected to the key point detection unit and the processing unit;
[0040] The key point detection unit is further configured to obtain left mouth corner coordinate information and right mouth corner coordinate information based on the RGB data of the face image;
[0041] The face angle calculation unit is used to calculate the face angle using the following formula:
[0042] score_x=abs(n_x-e_x1) / (e_x2-e_x1);
[0043] score_y=abs(n_y-e_y) / (m_y-e_y);
[0044] e_y=(e_y1+e_y2) / 2;
[0045] m_y=(m_y1+m_y2) / 2;
[0046] Where score_x represents the horizontal rotation offset of the face, score_y represents the vertical rotation offset of the face, n_x and n_y represent the coordinate information of the nose, e_y represents the center of the vertical coordinates of the left and right eyes, m_y represents the center of the vertical coordinates of the left and right mouth corners, m_y1 represents the y-axis coordinate value of the left mouth corner coordinate information, and m_y2 represents the y-axis coordinate value of the right mouth corner coordinate information;
[0047] The processing unit is further configured to compare the calculated facial angles score_x and score_y with a preset angle range. If the angles exceed the preset angle range, the result is judged as unqualified; if the angles are within the preset angle range, the result is judged as qualified.
[0048] A further improvement of the system for monitoring facial image anomalies with a binocular camera of the present invention is that it also includes a twin network model;
[0049] The processing unit is connected to the twin network model;
[0050] The image acquisition unit acquires the infrared data of the face image while acquiring the RGB data of the face image;
[0051] The processing unit is also used to send the RGB data of the facial image and the infrared data of the facial image into the twin network model to obtain a similarity score, and then compare the obtained similarity score with a preset score value. If it is greater than or equal to the preset score value, the judgment result is qualified, otherwise it is unqualified.
[0052] A further improvement of the system for monitoring facial image anomalies using a binocular camera of the present invention is that the processing unit returns interactive prompt information when the judgment result is unqualified.
[0053] A further improvement of the system for monitoring facial image anomalies using a binocular camera of the present invention is that the preset pupil distance range is set according to the resolution of the binocular camera. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 This is a flow chart of the method for monitoring facial image anomalies using a binocular camera of the present invention.
[0055] Figure 2 This is a system diagram of the binocular camera facial image anomaly monitoring system of the present invention. DETAILED DESCRIPTION
[0056] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0057] See Figure 1 The present invention provides a method and system for monitoring facial image anomalies using a binocular camera. These methods improve existing methods for calculating the pupillary distance (PHD) of a person's face, resolving the issue of unreliable PHD calculations and resulting in erroneous monitoring results. By adding a correction factor for the yaw angle, the present monitoring method and system reduces the sensitivity of the PHD estimation results to angles, improves the stability of the PHD estimation, and thus makes the monitoring results more reliable. The present invention's method and system for monitoring facial image anomalies using a binocular camera are described below with reference to the accompanying drawings.
[0058] See Figure 2 , shows the system diagram of the system for monitoring abnormal facial images with binocular cameras of the present invention. Figure 2 , the system for monitoring abnormal facial images using a binocular camera of the present invention is described.
[0059] like Figure 2As shown, the system for monitoring facial image anomalies using a binocular camera of the present invention includes an image acquisition unit 21, a key point detection unit 22, a facial pupil distance calculation unit 23, and a processing unit 24. The image acquisition unit 21 is connected to the binocular camera, the key point detection unit 22 is connected to the image acquisition unit 21, the facial pupil distance calculation unit 23 is connected to the key point detection unit 22, and the processing unit 24 is connected to the image acquisition unit 21, the key point detection unit 22, and the facial pupil distance calculation unit 23. The image acquisition unit 21 is used to obtain RGB data of facial images using the binocular camera; the key point detection unit is used to obtain left eye coordinate information, right eye coordinate information, and nose coordinate information from the facial image RGB data, wherein the obtained left eye coordinate information is the coordinate information of the center of the left eye, the right eye coordinate information is the coordinate information of the center of the right eye, and the nose coordinate information is the coordinate information of the center of the nose. The facial pupil distance calculation unit is used to calculate facial pupil distance information using the following formula:
[0060] Dist1=sqrt((e_x1-e_x2)^2+(e_y1-e_y2)^2),
[0061] Dist2=2*Dist1 / (1+α),
[0062] α=exp(-s*|n_x-(e_x1+e_x2) / 2| / (e_x2-e_x1)),
[0063] Among them, Dist1 represents the pixel value between the center of the left eye and the center of the right eye (representing the pupil distance in the current picture state), Dist2 represents the pupil distance information of the face, e_x1 and e_y1 represent the left eye coordinate information, e_x2 and e_y2 represent the right eye coordinate information, α represents the pupil distance correction factor, s>0, represents the correction coefficient, n_x represents the x-axis coordinate value in the nose coordinate information; n_x and n_y represent the nose coordinate information, sqrt refers to the square root operation, the empirical value of s is 2, and the value of α is between 0 and 1 (including the end value).
[0064] The processing unit 24 is used to compare the calculated face pupil distance information with the preset pupil distance range. If the face pupil distance information exceeds the preset pupil distance range, the result is judged as unqualified; if the face pupil distance information is within the preset pupil distance range, the result is judged as qualified.
[0065] Furthermore, when the judgment result is unqualified, the processing unit 24 returns an interactive prompt message, indicating that the face pupil distance is not within the preset pupil distance range and an abnormality is detected in the face image, prompting the user to perform a corresponding interactive action to obtain a new face image.
[0066] Furthermore, the preset IPD range is set based on the binocular camera's resolution. Specifically, when the camera's resolution is 640*480, the preset IPD range is between 20 and 180. 20 is the minimum IPD limit, and 180 is the maximum IPD limit. The maximum and minimum IPD limits can be set based on the image resolution. When determining the IPD information for a person's face, a determination is made as to whether the IPD is greater than or equal to 20 and less than or equal to 180. If so, the result is considered qualified, and the facial image can proceed to the next step for face recognition. Otherwise, the structure is determined to be unqualified.
[0067] In a specific embodiment of the present invention, the monitoring system of the present invention further includes a face angle calculation unit connected to the key point detection unit 22 and the processing unit 24;
[0068] The key point detection unit 22 is further configured to obtain the left corner of the mouth coordinate information and the right corner of the mouth coordinate information based on the RGB data of the face image; m_x1 and m_y1 represent the left corner of the mouth coordinate information, and m_x2 and m_y2 represent the right corner of the mouth coordinate information;
[0069] The face angle calculation unit is used to calculate the face angle using the following formula:
[0070] score_x=abs(n_x-e_x1) / (e_x2-e_x1);
[0071] score_y=abs(n_y-e_y) / (m_y-e_y);
[0072] e_y=(e_y1+e_y2) / 2;
[0073] m_y=(m_y1+m_y2) / 2;
[0074] Where score_x represents the horizontal rotation offset of the face, score_y represents the vertical rotation offset of the face, n_x and n_y represent the coordinate information of the nose, e_y represents the center of the vertical coordinates of the left and right eyes, m_y represents the center of the vertical coordinates of the left and right mouth corners, m_y1 represents the y-axis coordinate value of the left mouth corner coordinate information, and m_y2 represents the y-axis coordinate value of the right mouth corner coordinate information; abs represents the absolute value;
[0075] The processing unit 24 is further configured to compare the calculated facial angles score_x and score_y with a preset angle range. If the angles exceed the preset angle range, the result is considered unqualified. If the angles are within the preset angle range, the result is considered qualified.
[0076] Based on the calculation and judgment of the pupil distance information of the face, the present invention adds the judgment of the face angle, further improving the monitoring accuracy of image anomalies through the judgment of the face angle, excluding face images with large deflection angles, and returning interactive prompt information when the face angle is judged to be unqualified.
[0077] Furthermore, the preset angle range is divided into a horizontal angle range and a vertical angle range. The horizontal angle range is 0.25 to 0.75. If score_x = 0.5, it indicates a horizontal standard front face. If score_x is between 0.25 and 0.75, the judgment result is qualified, otherwise it is unqualified. The vertical angle range is 0.25 to 0.85. If score_y = 0.5, it indicates a vertical standard front face. If score_y is between 0.25 and 0.85, the judgment result is qualified, otherwise it is unqualified.
[0078] In a specific embodiment of the present invention, it also includes a twin network model;
[0079] The processing unit 24 is connected to the twin network model;
[0080] The image acquisition unit 21 acquires the facial image infrared data while acquiring the facial image RGB data; the facial image RGB data and the facial image infrared data are images acquired at the same time;
[0081] The processing unit 24 is also used to send the RGB data of the facial image and the infrared data of the facial image into the twin network model to obtain a similarity score, and then compare the obtained similarity score with a preset score value. If it is greater than or equal to the preset score value, the judgment result is qualified, otherwise it is unqualified.
[0082] Preferably, the twin network model, also known as a twin neural network, is a coupled architecture based on two artificial neural grids. It takes two samples as input and outputs a representation of them embedded in a high-dimensional space to compare the similarity between the two samples. The twin network model of the present invention adopts a model in the prior art.
[0083] Furthermore, the processing unit 24 inputs the face image RGB data and the face image infrared data into the face detection module to obtain the face frame coordinates; then aligns the face frames of the face image RGB data and the face image infrared data, specifically transforms the size of the face frames of the face image RGB data and the face image infrared data, and then converts them into grayscale images, and sends them into the twin network model for similarity judgment to obtain a similarity score.
[0084] Preferably, the processing unit 24 is further used to align the RGB data of the face image and the infrared data of the face image according to the key points, and then convert them into grayscale images, and send them into the twin network model for similarity judgment to obtain a similarity score.
[0085] Furthermore, the preset score value is 0.4. When the similarity score is greater than or equal to 0.4, it indicates that the quality of the facial image infrared data is qualified.
[0086] Existing facial recognition uses infrared images for facial liveness detection. However, the quality of infrared images can be poor due to factors such as camera quality and exposure, which can easily lead to erroneous predictions. Existing technologies lack quality assessment for infrared images. This invention, leveraging the similarities between RGB and infrared images, evaluates quality from a multimodal perspective, offering improved generalizability. This infrared image quality assessment can promptly identify quality issues with binocular cameras, and can improve the accuracy of facial recognition predictions.
[0087] The present invention also provides a method for monitoring abnormalities in facial images using a binocular camera, which is described below.
[0088] like Figure 1 As shown, the monitoring method of the present invention comprises the following steps:
[0089] Execute step S11 to obtain RGB data of the face image using a binocular camera; then execute step S12;
[0090] Execute step S12 to obtain left eye coordinate information, right eye coordinate information, and nose coordinate information based on the acquired face image RGB data; then execute step S13;
[0091] Execute step S13 and calculate the face pupil distance information using the following formula:
[0092] Dist1=sqrt((e_x1-e_x2)^2+(e_y1-e_y2)^2),
[0093] Dist2=2*Dist1 / (1+α),
[0094] α=exp(-s*|n_x-(e_x1+e_x2) / 2| / (e_x2-e_x1)),
[0095] Wherein, Dist1 represents the pixel value between the center of the left eye and the center of the right eye, Dist2 represents the face pupil distance information, e_x1 and e_y1 represent the left eye coordinate information, e_x2 and e_y2 represent the right eye coordinate information, α represents the pupil distance correction factor, s>0 represents the correction coefficient, and n_x represents the x-axis coordinate value of the nose coordinate information; then execute step S14;
[0096] Execute step S14 to compare the calculated face pupil distance information with the preset pupil distance range. If the face pupil distance information exceeds the preset pupil distance range, the result is judged to be unqualified; if the face pupil distance information is within the preset pupil distance range, the result is judged to be qualified.
[0097] The monitoring method of the present invention adds a correction factor for the yaw angle when calculating the pupillary distance of a human face, reduces the sensitivity of the pupillary distance estimation result to the angle, thereby improving the stability of the pupillary distance estimation and making the monitoring result more reliable.
[0098] In a specific embodiment of the present invention, it also includes:
[0099] Obtaining left and right mouth corner coordinate information based on the acquired face image RGB data;
[0100] Use the following formula to calculate the face angle:
[0101] score_x=abs(n_x-e_x1) / (e_x2-e_x1);
[0102] score_y=abs(n_y-e_y) / (m_y-e_y);
[0103] e_y=(e_y1+e_y2) / 2;
[0104] m_y=(m_y1+m_y2) / 2;
[0105] Where score_x represents the horizontal rotation offset of the face, score_y represents the vertical rotation offset of the face, n_x and n_y represent the coordinate information of the nose, e_y represents the center of the vertical coordinates of the left and right eyes, m_y represents the center of the vertical coordinates of the left and right mouth corners, m_y1 represents the y-axis coordinate value of the left mouth corner coordinate information, and m_y2 represents the y-axis coordinate value of the right mouth corner coordinate information;
[0106] The calculated face angle score_x and score_y are compared with the preset angle range. If they exceed the preset angle range, the result is judged as unqualified; if they are within the preset angle range, the result is judged as qualified.
[0107] Preferably, the preset angle range is divided into a horizontal angle range and a vertical angle range, wherein the horizontal angle range is 0.25 to 0.75. If score_x = 0.5, it indicates a horizontal standard front face. If score_x is between 0.25 and 0.75, the judgment result is qualified, otherwise it is unqualified. The vertical angle range is 0.25 to 0.85. If score_y = 0.5, it indicates a vertical standard front face. If score_y is between 0.25 and 0.85, the judgment result is qualified, otherwise it is unqualified.
[0108] In a specific embodiment of the present invention, while using a binocular camera to obtain RGB data of a face image, infrared data of the face image is obtained;
[0109] Feed the RGB data and infrared data of the face image into the twin network model to obtain the similarity score;
[0110] The obtained similarity score is compared with the preset score value. If it is greater than or equal to the preset score value, the result is judged as qualified, otherwise it is unqualified.
[0111] Preferably, the preset fractional value is 0.4.
[0112] In a specific embodiment of the present invention, when the judgment result is unqualified, interactive prompt information is returned.
[0113] In a specific embodiment of the present invention, the preset pupil distance range is between 20 and 180.
[0114] The present invention has been described in detail above with reference to the embodiments of the accompanying drawings. A person skilled in the art can make various modifications to the present invention based on the above description. Therefore, certain details in the embodiments should not be construed as limiting the present invention. The scope of protection of the present invention shall be determined by the scope defined in the appended claims.
Claims
1. A method for monitoring facial image anomalies using a binocular camera, characterized in that: The steps include: Use binocular cameras to obtain RGB data of facial images; Obtain left eye coordinate information, right eye coordinate information, and nose coordinate information based on the acquired face image RGB data; The following formula is used to calculate the face pupil distance information: Dist1=sqrt((e_x1-e_x2)^2+(e_y1-e_y2)^2), Dist2=2*Dist1 / (1+α), α=exp(-s*|n_x-(e_x1+e_x2) / 2| / (e_x2-e_x1)), Where Dist1 represents the pixel value between the center of the left eye and the center of the right eye, Dist2 represents the pupil distance information of the face, e_x1 and e_y1 represent the left eye coordinate information, e_x2 and e_y2 represent the right eye coordinate information, α represents the pupil distance correction factor, s>0 represents the correction coefficient, and n_x represents the x-axis coordinate value of the nose coordinate information; Comparing the calculated face pupil distance information with the preset pupil distance range, if the face pupil distance information exceeds the preset pupil distance range, the result is judged as unqualified; if the face pupil distance information is within the preset pupil distance range, the result is judged as qualified; Also includes: Obtaining left and right mouth corner coordinate information based on the acquired face image RGB data; Use the following formula to calculate the face angle: score_x=abs(n_x-e_x1) / (e_x2-e_x1); score_y=abs(n_y-e_y) / (m_y-e_y); e_y=(e_y1+e_y2) / 2; m_y=(m_y1+m_y2) / 2; Where score_x represents the horizontal rotation offset of the face, score_y represents the vertical rotation offset of the face, n_x and n_y represent the coordinate information of the nose, e_y represents the center of the vertical coordinates of the left and right eyes, m_y represents the center of the vertical coordinates of the left and right mouth corners, m_y1 represents the y-axis coordinate value of the left mouth corner coordinate information, and m_y2 represents the y-axis coordinate value of the right mouth corner coordinate information; Compare the calculated face angle score_x and score_y with the preset angle range. If they are outside the preset angle range, the result is judged as unqualified; if they are within the preset angle range, the result is judged as qualified; While using a binocular camera to obtain RGB data of a face image, infrared data of the face image is obtained; The RGB data of the face image and the infrared data of the face image are fed into a twin network model to obtain a similarity score; Compare the obtained similarity score with the preset score value. If it is greater than or equal to the preset score value, the result is judged as qualified, otherwise it is unqualified; The RGB data of the face image and the infrared data of the face image are input into the face detection module to obtain the coordinates of the face frame; the face frames of the RGB data of the face image and the infrared data of the face image are resized, and then the face frames of the RGB data of the face image and the infrared data of the face image are aligned according to the key points, and then converted into grayscale images and sent to the twin network model for similarity judgment to obtain the similarity score.
2. The method for monitoring facial image anomalies using a binocular camera according to claim 1, wherein: If the judgment result is unqualified, an interactive prompt message is returned.
3. The method for monitoring facial image anomalies using a binocular camera according to claim 1, wherein: The preset pupil distance range is set according to the resolution of the binocular camera.
4. A system for monitoring abnormalities in facial images using a binocular camera, characterized in that: include: An image acquisition unit is connected to the binocular camera and is used to obtain RGB data of a face image using the binocular camera; a key point detection unit, connected to the image acquisition unit, for acquiring left eye coordinate information, right eye coordinate information, and nose coordinate information from the RGB image of the face; The face pupil distance calculation unit is connected to the key point detection unit and is used to calculate the face pupil distance information using the following formula: Dist1=sqrt((e_x1-e_x2)^2+(e_y1-e_y2)^2), Dist2=2*Dist1 / (1+α), α=exp(-s*|n_x-(e_x1+e_x2) / 2| / (e_x2-e_x1)), Where Dist1 represents the pixel value between the center of the left eye and the center of the right eye, Dist2 represents the pupil distance information of the face, e_x1 and e_y1 represent the left eye coordinate information, e_x2 and e_y2 represent the right eye coordinate information, α represents the pupil distance correction factor, s>0 represents the correction coefficient, and n_x represents the x-axis coordinate value of the nose coordinate information; a processing unit connected to the image acquisition unit, the key point detection unit, and the face pupil distance calculation unit, and configured to compare the calculated face pupil distance information with a preset pupil distance range, and determine that the face pupil distance is unqualified if the face pupil distance information exceeds the preset pupil distance range; and determine that the face pupil distance is qualified if the face pupil distance information is within the preset pupil distance range; Also included is a face angle calculation unit connected to the key point detection unit and the processing unit; The key point detection unit is further configured to obtain left mouth corner coordinate information and right mouth corner coordinate information based on the RGB data of the face image; The face angle calculation unit is used to calculate the face angle using the following formula: score_x=abs(n_x-e_x1) / (e_x2-e_x1); score_y=abs(n_y-e_y) / (m_y-e_y); e_y=(e_y1+e_y2) / 2; m_y=(m_y1+m_y2) / 2; Where score_x represents the horizontal rotation offset of the face, score_y represents the vertical rotation offset of the face, n_x and n_y represent the coordinate information of the nose, e_y represents the center of the vertical coordinates of the left and right eyes, m_y represents the center of the vertical coordinates of the left and right mouth corners, m_y1 represents the y-axis coordinate value of the left mouth corner coordinate information, and m_y2 represents the y-axis coordinate value of the right mouth corner coordinate information; The processing unit is further configured to compare the calculated facial angles score_x and score_y with a preset angle range, and if the angles exceed the preset angle range, the result is judged as unqualified; if the angles are within the preset angle range, the result is judged as qualified; It also includes the twin network model; The processing unit is connected to the twin network model; The image acquisition unit acquires the infrared data of the face image while acquiring the RGB data of the face image; The processing unit is further configured to input the RGB data of the facial image and the infrared data of the facial image into the twin network model to obtain a similarity score, and then compare the obtained similarity score with a preset score value. If the similarity score is greater than or equal to the preset score value, the result is judged to be qualified, otherwise it is unqualified; The processing unit inputs the RGB data and infrared data of the face image into the face detection module to obtain the coordinates of the face frame; transforms the size of the face frame of the RGB data and the infrared data of the face image, and then aligns the face frame of the RGB data and the infrared data of the face image according to the key points, and then converts them into a grayscale image, and sends them to the twin network model for similarity judgment to obtain a similarity score.
5. The system for monitoring facial image anomalies using a binocular camera as claimed in claim 4, wherein: When the judgment result is unqualified, the processing unit returns interactive prompt information.
6. The system for monitoring facial image anomalies using a binocular camera as claimed in claim 4, wherein: The preset pupil distance range is set according to the resolution of the binocular camera.
Citation Information
Patent Citations
Face angle recognition method, device and device
CN109389018A
Camera adjusting method and system for facial recognition
CN110176039A
Face comparison method and device, computer equipment and storage medium
CN111178249A