A method and system for preventing false alarms when there is no target in front of the sitting posture detection detector
Through the combination of the face counting accumulator and the undetected face counting accumulator, the problem of false alarms in sitting posture detection in the existing technology is solved, the accurate judgment of the face angle deviation and position offset value is achieved, and the false alarms are reduced rates and health risks, and reduces product costs.
Patent Information
- Application Number
- CN202010118344.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-02-26
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2040-02-26
AI Technical Summary
In the current sitting posture detection, methods based on laser lines, ultrasonic waves and shallow face detection algorithms have false alarm problems. They cannot accurately determine partial unhealthy sitting postures such as side faces and head tilts, and can detect faces with excessively large angles. The capabilities are limited, which affects the user experience. At the same time, it is harmful to health for people who use these methods to be in a radioactive environment for a long time.
Using the face counting accumulator and the undetected face counting accumulator, through the comparison of the preset standard sitting posture data and the real-time sitting posture data, the face space angle deviation value and position offset value are calculated to determine whether the threshold is exceeded, and combined The status duration is used to determine whether an alarm is triggered to avoid false alarms.
It effectively distinguishes the status of the target person within the detection range and the absence of it, reduces the false alarm rate, avoids the harm to human health caused by the use of laser lines and ultrasonic waves, and reduces product costs.
Smart Images

Figure CN113312938B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of face recognition, and in particular to a method and system for preventing false alarms from being generated when there is no target in front of a sitting posture detection detector. Background Art
[0002] With the continuous development of science and technology, especially the development of computer vision technology, face recognition technology is widely used in various fields such as information security and electronic authentication, and the image feature extraction method has good recognition performance. Among them, sitting posture detection is also an important content in the field of recognition. In the existing technology, it includes 1. Measuring the distance between a person and a sensor based on ultrasound, laser lines, etc., and judging whether the sitting posture is standard. 2. Based on ordinary image sensors, obtain feature data such as face angle and human posture, and match it with the pre-set standard posture feature data to judge whether the sitting posture is abnormal.
[0003] However, the prior art has the following defects:
[0004] 1. The distance between a person and the detection device is detected based on laser lines and ultrasonic waves, and whether the person's sitting posture is correct is judged based on the detection results. This method is effective for detecting large changes in posture, but it cannot make accurate judgments on unhealthy sitting postures such as side face and tilted head. In addition, these methods use ultrasonic waves and laser lines, and people are harmful to their health if they are in these radioactive environments for a long time.
[0005] 2. Patent CN102096801A is based on image information. It obtains the inclination angle of the face, the area difference of the glasses area, and the head-shoulder curve difference. If the difference between the initial acquired standard data exceeds the preset threshold, it means that the sitting posture is abnormal. This method only solves the difference between normal and abnormal sitting postures when the target to be detected is within the detection range, and does not solve the situation where the target to be detected leaves the detection range. At this time, the detector will judge the abnormality as abnormal and trigger the abnormal sitting posture alarm, affecting the user experience.
[0006] 3. Patent CN110334631A is based on face detection and binary operation for sitting posture detection. It uses the adaboost face detection algorithm to locate the standard sitting posture head position, and sets a tolerance as a standard. It detects whether the target head position exceeds the standard tolerance as the sitting posture abnormality judgment standard. Because it is based on shallow face detection algorithms such as adboost or deep CNN face detection algorithms, there are certain limitations on face detection capabilities. When the face angle is too large or the application environment is complex, the face detection algorithm will not be able to detect the face, affecting subsequent judgments. This situation is the same as the face detection output when the target to be detected leaves the detection range normally and cannot be distinguished, so it will cause false alarms and affect the user experience.
[0007] Common terms in the prior art include:
[0008] 1. Face detection module: Input an image containing a complete face, and the face detection module will return the bounding box coordinates of the face in the image.
[0009] 2. Face spatial angle: It is composed of the pitch, yaw and roll angles of the face. Pitch is the rotation around the y-axis; yaw is the rotation around the z-axis; and roll is the rotation around the x-axis. Figure 4 shown.
[0010] 3. Face angle detection module: Input a grayscale image of face ROI data to obtain the spatial angle of the face, where ROI (region of interest) is the region of interest. In machine vision and image processing, the area to be processed is outlined in the image to be processed in the form of a box, circle, ellipse, irregular polygon, etc., which is called the region of interest, ROI.
[0011] 4. Face counting accumulator: When the face detection module detects a face, the face counting accumulator is incremented by 1.
[0012] 5. Undetected face count accumulator: When the face detection module does not detect a face, the undetected face count accumulator is incremented by 1.
[0013] 6. Sitting posture information: spatial angle of face, spatial position information of face, face count accumulator, and undetected face count accumulator.
[0014] 7. Standard sitting posture information: when a person sits at a table or other positions in a standard posture, there is one or more sets of sitting posture information collected by the present invention.
[0015] 8. IOU: The full name of IOU is Intersection over Union. IOU calculates the ratio of the intersection and union of two bounding boxes, such as Figure 5 As shown, IOU = intersection / union. IOU: A concept used in object detection, which is the overlap rate of the generated candidate bounding box (candidate bound) and the original labeled bounding box (groundtruth bound), that is, the ratio of their intersection to their union.
[0016] 9. Face spatial position offset value: Based on the boundingbox detected in 1, calculate the IOU of the boundingbox as the face position offset value. Summary of the invention
[0017] In order to solve the above problems, the purpose of the present invention is to propose a new method for solving the problem that when using an ordinary image sensor, a sitting posture detection scheme based on a face and human posture feature extraction algorithm cannot distinguish between the results of face and human posture feature extraction when there is no target person and the results when there is a target person but the face and human posture features cannot be extracted normally.
[0018] Specifically, the present invention provides a method for preventing false alarms when there is no target in front of a sitting posture detection detector, comprising the following steps:
[0019] S1, preset standard sitting posture data;
[0020] S2, a sitting posture calculation module is used to calculate the sitting posture data information based on the common image sensor, and the sitting posture calculation module includes: a face detection module, a face angle detection module and a sitting posture information calculation module, a face counting accumulator and an undetected face counting accumulator;
[0021] S3, comparing the real-time sitting posture data with the standard sitting posture data, performing deviation calculation between the sitting posture data information of the current frame obtained during detection and the preset sitting posture data information, and calculating the face space angle deviation value and the face space position offset value;
[0022] S4, determining whether the deviation exceeds a threshold;
[0023] S5, determining whether the duration of the state exceeding the threshold in step S4 exceeds a specified period, if not, re-entering step S2, if yes, proceeding to the next step;
[0024] S6, determine whether there is a target:
[0025] The face counting accumulator is judged. If the face counting accumulator is not greater than 1, it is considered that no face is detected within the detection period, and it is determined that there is no target person within the detection range of the detector. Alarm=0 is set to cancel the alarm signal and start again at step S2; if the face counting accumulator is greater than 1, proceed to the next step;
[0026] S7, abnormal sitting posture alarm.
[0027] The sitting posture calculation module of step S2 further includes:
[0028] a, the face detection module obtains a face bounding box from the image data;
[0029] b. Deduct the face ROI data according to the face bounding box and pass it to the face angle detection module to obtain the face spatial angle and add 1 to the face count accumulator. When the face detection module cannot obtain the face bounding box from the image data, the face count accumulator is not processed and the undetected face count accumulator is added by 1;
[0030] c. The sitting posture information calculation module integrates the face bounding box and face spatial angle that are about to be obtained, and updates the face count accumulator and the undetected face count accumulator for calculation by other modules.
[0031] The present application also relates to a system for preventing false alarms when there is no target in front of the detector when detecting posture, comprising: a preset standard sitting posture module, a sitting posture calculation module and a comparison and judgment module, wherein:
[0032] The preset standard sitting posture data module is used to preset standard sitting posture data information;
[0033] The sitting posture calculation module is used to obtain sitting posture data information;
[0034] The comparison and judgment module is used to compare the deviation between the real-time sitting posture and the standard sitting posture, judge whether the deviation exceeds the threshold, judge whether the state continues for a period, and judge whether there is a target;
[0035] The system applies the aforementioned method.
[0036] Therefore, the advantages of the present application are: the face counting accumulator and the undetected face counting accumulator are used in the present invention to solve the problem of how to distinguish when the face and human figure posture feature algorithm of the target person is within the detection range of the detector and cannot give a detection result when the ordinary image sensor is used, and when the face and human figure posture feature algorithm of the target person is not within the detection range of the detector and cannot give a detection result. The abnormal sitting posture alarm can avoid the impact of ultrasound, laser line, etc. on human health and can also reduce product costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of this application, and do not constitute a limitation of the present invention.
[0038] Figure 1 It is a schematic block diagram of a flow chart of a method according to the present invention.
[0039] Figure 2 It is a schematic block diagram of a sitting posture calculation module in the steps of the method according to the present invention.
[0040] Figure 3 It is a schematic block diagram of a specific system of the present invention.
[0041] Figure 4 It is a schematic diagram of the present invention during sitting posture detection.
[0042] Figure 5 It is a schematic diagram of the IOU ratio involved in the present invention. DETAILED DESCRIPTION
[0043] In order to more clearly understand the technical content and advantages of the present invention, the present invention is now further described in detail in conjunction with the accompanying drawings.
[0044] The present invention relates to a method for preventing false alarms when there is no target in front of a sitting posture detection detector. Figure 1 As shown, the following steps are included:
[0045] S1, preset standard sitting posture data;
[0046] S2, a sitting posture calculation module is used to calculate the sitting posture data information based on the common image sensor, and the sitting posture calculation module includes: a face detection module, a face angle detection module and a sitting posture information calculation module, a face counting accumulator and an undetected face counting accumulator;
[0047] S3, comparing the real-time sitting posture data with the standard sitting posture data, performing deviation calculation between the sitting posture data information of the current frame obtained during detection and the preset sitting posture data information, and calculating the face space angle deviation value and the face space position offset value;
[0048] S4, determining whether the deviation exceeds a threshold;
[0049] S5, determining whether the duration of the state exceeding the threshold in step S4 exceeds a specified period, if not, re-entering step S2, if yes, proceeding to the next step;
[0050] S6, determine whether there is a target:
[0051] The face count accumulator is judged. If the face count accumulator is not greater than 1, it is considered that no face is detected within the detection period, and it is determined that there is no target person within the detection range of the detector, and step S2 is started again; if the face count accumulator is greater than 1, the next step is performed;
[0052] S7, abnormal sitting posture alarm.
[0053] The sitting posture calculation module of step S2 further includes:
[0054] a, the face detection module obtains a face bounding box from the image data;
[0055] b. Deduct the face ROI data according to the face bounding box and pass it to the face angle detection module to obtain the face spatial angle and add 1 to the face count accumulator. When the face detection module cannot obtain the face bounding box from the image data, the face count accumulator is not processed and the undetected face count accumulator is added by 1;
[0056] c. The sitting posture information calculation module integrates the face bounding box and face spatial angle that are about to be obtained, and updates the face count accumulator and the undetected face count accumulator for calculation by other modules.
[0057] The step S3 of comparing the real-time sitting posture information data with the standard sitting posture data further includes:
[0058] A. The sitting posture information of the current frame obtained during the detection is compared with the preset sitting posture information for deviation calculation;
[0059] B. Calculate the face space angle deviation value and face space position offset value.
[0060] The step S4 of determining whether the deviation exceeds a threshold value further includes:
[0061] If the calculated face space angle deviation value and face space position offset value do not exceed the preset threshold, it is considered that the currently collected sitting posture is normal, and the sitting posture data information continues to be monitored, and the process re-enters step S2;
[0062] If one or both of the calculated face space angle deviation value and face space position offset value exceeds the preset threshold, or the value of the undetected face counting accumulator exceeds the preset threshold, the current sitting posture is considered abnormal and the next step S5 is performed.
[0063] The preset threshold corresponding to the face space angle deviation value in step S4 is the first threshold; the preset threshold corresponding to the face space position offset value is the second threshold; and the preset threshold corresponding to the undetected face count accumulator is the third threshold.
[0064] In the step S5, it is determined whether the duration of the state exceeding the threshold value exceeds the specified period, and further includes: when the deviation exceeds the threshold value and the sitting posture is determined to be abnormal, the number of abnormal sitting posture frames is accumulated and timing is started at the same time. When the abnormal sitting posture count exceeds the preset number of times within the specified period, the abnormal sitting posture is confirmed to be established, Alarm=1 is set, an alarm signal is given, and step S6 is performed; otherwise, it is considered to be false information, and the sitting posture calculation module of step S2 is performed again to continue monitoring the sitting posture information.
[0065] The specified period is a preset time period, such as 1 minute or 3 minutes, etc., which is preset according to customer needs.
[0066] The preset number of times is a positive integer greater than 1, such as 1 time, 3 times, 5 times, 10 times, etc., and is set according to customer needs.
[0067] In step S6, if it is determined that there is no target person within the detection range of the detector, Alarm=0 is set to cancel the alarm signal.
[0068] Among them, the method of calculating the face space angle deviation value, the face space position offset value and the preset threshold value is a relatively mature existing technology. For example, refer to the solutions in patents CN102096801A and CN110334631A, etc., which will not be repeated here.
[0069] In addition, the technical solutions specifically involved in this application can also be interpreted as the following:
[0070] 1. Sitting posture calculation module:
[0071] The face detection module obtains the face boundingbox from the image data, deducts the face ROI data based on the face boundingbox and passes it to the face angle detection module to obtain the face spatial angle and add 1 to the face count accumulator. When the face detection module cannot obtain the face boundingbox from the image data, the face count accumulator is not processed, and the undetected face count accumulator is added by 1. The face boundingbox and face spatial angle to be obtained by calculating the sitting posture information are integrated together, and the face count accumulator and the undetected face count accumulator are updated for calculation by other modules.
[0072] 2. Preset sitting posture information;
[0073] 3. Compare the deviation between real-time sitting posture and standard sitting posture:
[0074] During the detection, the sitting posture information of the current frame is obtained and the deviation is calculated with the preset sitting posture information to calculate the face space angle deviation value and the face space position offset value.
[0075] 4. Deviation exceeds the threshold:
[0076] If the two deviation values calculated in 3 do not exceed the preset threshold, the currently collected sitting posture is considered normal and the sitting posture information continues to be monitored. If one of the two deviation values exceeds the preset threshold or both exceed the preset threshold or the undetected face count accumulator exceeds the preset threshold, the current sitting posture is considered abnormal and the next step of judgment is performed.
[0077] 5. This state lasts for a period of:
[0078] When the sitting posture is judged to be abnormal in step 4, the number of abnormal sitting posture frames starts to be accumulated and the timing starts at the same time. When the abnormal sitting posture count exceeds the preset threshold within the preset time period, the abnormal sitting posture is confirmed to be established, Alarm=1, and an alarm signal is given. Otherwise, it is considered to be false information and the calculation of the sitting posture calculation module continues.
[0079] 6. Determine whether there is a target:
[0080] The face counting accumulator is judged. If the face counting accumulator is not greater than 1, it is considered that no face is detected within the detection cycle, and it is determined that there is no target person within the detection range of the detector. Alarm=0 cancels the alarm signal and starts steps 1, 3, and 4.
[0081] 7. Is the sitting posture standard?
[0082] When the alarm signal Alarm=1 is triggered in step 5, steps 1, 3, and 4 are started. If the sitting posture is judged to be normal in step 4, the alarm signal Alarm=1 is cancelled. Steps 1, 3, and 4 are continued to monitor the sitting posture information.
[0083] like Figure 3 As shown, the present application also relates to a system for preventing false alarms when there is no target in front of the detector when detecting posture, comprising: a preset standard sitting posture module, a sitting posture calculation module and a comparison and judgment module, wherein:
[0084] The preset standard sitting posture information data module is used to preset standard sitting posture data information;
[0085] The sitting posture calculation module is used to obtain sitting posture data information;
[0086] The comparison and judgment module is used to compare the deviation between the real-time sitting posture and the standard sitting posture, judge whether the deviation exceeds the threshold, judge whether the state continues for a period, and judge whether there is a target;
[0087] The system applies the aforementioned method.
[0088] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for preventing false alarms when there is no target in front of a sitting posture detection detector, characterized in that: The following steps are involved: S1, preset standard sitting posture data; S2, a sitting posture calculation module is used to calculate the sitting posture information based on the common image sensor, and the sitting posture calculation module includes: a face detection module, a face angle detection module and a sitting posture information calculation module, a face counting accumulator and an undetected face counting accumulator; the sitting posture calculation module of step S2 further includes: a, the face detection module obtains a face bounding box from the image data; b. Deduct the face ROI data according to the face bounding box and pass it to the face angle detection module to obtain the face spatial angle and add 1 to the face count accumulator. When the face detection module cannot obtain the face bounding box from the image data, the face count accumulator is not processed and the undetected face count accumulator is added by 1; c. The sitting posture information calculation module integrates the face bounding box and face spatial angle that are about to be obtained, and updates the face count accumulator and the undetected face count accumulator for calculation by other modules; S3, comparing the real-time sitting posture data with the standard sitting posture data, performing deviation calculation between the sitting posture data of the current frame obtained during detection and the preset sitting posture data, and calculating the face space angle deviation value and the face space position offset value; S4, determining whether the deviation exceeds a threshold; The step S4 of determining whether the deviation exceeds a threshold value further includes: If the calculated face space angle deviation value and face space position offset value do not exceed the preset threshold, it is considered that the currently collected sitting posture is normal, and the sitting posture data information continues to be monitored, and the process re-enters step S2; If one or both of the calculated face space angle deviation value and face space position offset value exceeds the preset threshold, or the value of the undetected face counting accumulator exceeds the preset threshold, the current sitting posture is considered abnormal, and the next step S5 is performed; S5, determining whether the duration of the state exceeding the threshold in step S4 exceeds a specified period, if not, re-entering step S2, if yes, proceeding to the next step; S6, determine whether there is a target: The face count accumulator is judged. If the face count accumulator is not greater than 1, it is considered that no face is detected within the detection period, and it is determined that there is no target person within the detection range of the detector, and step S2 is started again; if the face count accumulator is greater than 1, the next step is performed; S7, abnormal sitting posture alarm.
2. A method for preventing false alarms when there is no target in front of the sitting posture detection detector according to claim 1, characterized in that: The step S3 of comparing the real-time sitting posture data with the standard sitting posture data further includes: A. During the detection, the sitting posture data of the current frame is obtained and the deviation is calculated with the preset sitting posture data; B. Calculate the face space angle deviation value and face space position offset value.
3. The method for preventing false alarm when there is no target in front of the sitting posture detection detector according to claim 1, characterized in that: In the step S5, it is determined whether the duration of the state exceeding the threshold value exceeds the specified period, and further includes: when the deviation exceeds the threshold value and the sitting posture is determined to be abnormal, the number of abnormal sitting posture frames is accumulated and timing is started at the same time. When the abnormal sitting posture count exceeds the preset number of times within the specified period, the abnormal sitting posture is confirmed to be established, an alarm signal is given, and step S6 is performed; otherwise, it is considered to be false information, and the sitting posture calculation module of step S2 is re-performed to continue monitoring the sitting posture data information.
4. A method for preventing false alarms when there is no target in front of the sitting posture detection detector according to claim 3, characterized in that: The preset number of times is a positive integer greater than 1.
5. According to the method of claim 3 for preventing false alarms when there is no target in front of the sitting posture detection detector, an alarm signal is given and Alarm=1.
6. According to the method of claim 3 for preventing false alarms when there is no target in front of the detector during sitting posture detection, in step S6, if it is determined that there is no target person in the detection range of the detector, the alarm signal is canceled and Alarm=0.
7. A sitting posture detection system to prevent false alarms when there is no target in front of the detector, characterized in that: include: The standard sitting posture data module, sitting posture calculation module and comparison and judgment module are preset, wherein: The preset standard sitting posture data module is used to preset standard sitting posture data information; The sitting posture calculation module is used to obtain sitting posture data information; The comparison and judgment module is used to compare the deviation between the real-time sitting posture and the standard sitting posture, judge whether the deviation exceeds the threshold, judge whether the state continues for a period, and judge whether there is a target; The system executes the method described in any one of claims 1 to 6.
