Low-power-consumption face awakening method and device for welcome robot and medium

Through the combination of frame difference method and on-demand detection, the problems of high power consumption and false detection in face wake-up technology are solved, and low-power consumption and high-accuracy face recognition are achieved, which is suitable for welcome robot systems with long standby times.

CN118596151APending Publication Date: 2024-09-06SHANDONG NEW GENERATION INFORMATION IND TECH RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410859434.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Existing face wake-up technology has challenges in real-time performance, accuracy, and power consumption. Continuous face detection leads to high power consumption and false detections, affecting the long-term standby and accuracy of the system.

Method used

Using the frame difference method for lightweight continuous monitoring and on-demand accurate face detection, through video frame reading and preprocessing, calculation of inter-frame differences, difference threshold judgment, and timer-triggered face detection, the yolov5-lite model is used , face detection is performed every N seconds, reducing power consumption and improving accuracy.

Benefits of technology

It significantly reduces power consumption and improves the accuracy of face recognition. It is suitable for welcome robot systems that require long-term standby and have high real-time response requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118596151A
    Figure CN118596151A
Patent Text Reader

Abstract

The invention relates to the field of intelligent robots, in particular to a low-power-consumption face awakening method and device of a welcome robot and a medium. According to the method, the video frame is firstly read and preprocessed, then the inter-frame difference is calculated, and the face detection is started under the condition that the inter-frame difference meets the preset condition. A light-weight face detection model yolov5-lite is adopted for face detection, in order to reduce the resource utilization rate, detection is selected to be conducted once every 0.5 second, and the occupancy rate of a single CPU is reduced to 30% or below. And under the condition that the face is detected and the size of the face meets the requirement, updating the detection mark queue, checking the detection mark queue after a stop condition is met, if the detection mark queue is all 1, indicating that the face is continuously detected within the working time of the timer, and at the moment, waking up the welcome robot and quitting the circulation. According to the invention, lightweight continuous monitoring of the frame difference method and on-demand accurate face detection are combined, and real-time performance, accuracy and low power consumption are taken into consideration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent robots, and in particular to a low-power face awakening method, device and medium for a welcoming robot. Background Art

[0002] With the advancement of science and technology and the rapid development of artificial intelligence, welcoming robots, as an important part of the intelligent service field, have been widely used in various commercial and service places. The welcoming robot interacts with the user through face wake-up technology. However, the current face wake-up technology still faces many challenges in terms of real-time, accuracy and power consumption. Traditional face wake-up systems usually perform continuous face detection on video streams. Although this method can ensure the real-time detection, it brings two problems: first, continuous high-intensity calculations will lead to a significant increase in power consumption, which is not conducive to the long-term standby of the robot; second, due to factors such as ambient light, face angle and expression changes, continuous detection may lead to a large number of false detections, affecting accuracy. Summary of the invention

[0003] In view of the defects of the prior art, the present invention provides a low-power face wake-up method, device and medium for a welcoming robot, which combines lightweight continuous monitoring of the frame difference method with on-demand precise face detection, which not only significantly reduces power consumption but also improves the accuracy of face recognition.

[0004] In order to solve the technical problem, the technical solution adopted by the present invention is: a low-power face awakening method for a welcoming robot, comprising the following steps: S01), video frame reading and preprocessing, the camera module continuously reads video frames and converts each frame into a grayscale image; S02), calculating the difference between frames; S03), difference threshold judgment, compare the calculated frame difference with the preset threshold, if the frame difference is greater than the preset threshold, it is considered that an object or face has entered the camera field of view, and proceed to step S04), otherwise return to step S01); S04), initialize the detection flag queue, start the timer, and perform face detection. The face detection adopts the yolov5-lite model. The yolov5-lite model performs a detection every N seconds, and N is greater than the time interval for performing face detection in each frame; S05), within the time when the timer is triggered, if a face is detected and the size of the face meets the preset requirements, the corresponding position of the detection mark queue is updated to 1; if no face is detected or the face size does not meet the requirements, the corresponding position of the detection mark queue is kept at 0; S06), when the timer times out or the detection flag queue is all 1, the face detection is stopped. At this time, if all positions in the detection flag queue are 1, it means that the face has been detected continuously within the working time of the timer, and the welcoming robot is awakened. If the timer times out but there is 0 in the detection flag queue, it means that the face has not been detected continuously within the working time of the timer, and the welcoming robot continues to enter the low-power standby state and waits for the next frame difference detection.

[0005] Furthermore, in step S01), the preprocessing of the video frame includes graying, filtering, image scaling, image rotation, image flipping and image enhancement.

[0006] Furthermore, each frame is converted into a grayscale image by using the average value method, the maximum / minimum value method, and the weighted average method.

[0007] Furthermore, each frame is converted into a grayscale image by weighted averaging method, and the formula is: Gray=0.2989*R+0.5870*G+0.1140*B; Among them, Gray is the grayscale value of the converted grayscale image, and R, G, and B are the intensity values ​​of red, green, and blue respectively.

[0008] Furthermore, the inter-frame difference is obtained by calculating the difference change ratio of the grayscale images of two adjacent frames. The calculation formula of the difference change ratio is: , in is the difference change ratio, , The current frame and the previous frame are at positions Grayscale value, N and M are the width and height of the image respectively. It is the coordinate value of the image at the width i and height j position.

[0009] Furthermore, the length of the detection mark queue is fixed, and a plurality of detection mark bits are arranged therein for marking the result of each face detection.

[0010] Furthermore, the timing time of the timer is 2 seconds.

[0011] Further, N is equal to 0.5.

[0012] The present invention also discloses a low-power face awakening device for a welcoming robot, comprising a processor and a memory storing program instructions, wherein the processor is configured to execute the low-power face awakening method for a welcoming robot as described above when running the program instructions.

[0013] The present invention also discloses a storage medium storing program instructions, which, when running, execute the low-power face awakening method for the welcoming robot as described above.

[0014] Beneficial effects of the invention: The invention not only significantly reduces power consumption but also improves the accuracy of face recognition by combining lightweight continuous monitoring of the frame difference method with on-demand accurate face detection. This innovative method is particularly suitable for welcoming robot systems that require long standby time and high real-time response requirements. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 Flowchart of this method. DETAILED DESCRIPTION

[0016] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.

[0017] Example 1 This embodiment discloses a low-power face detection method for a welcoming robot. Figure 1 As shown, the following steps are included: S01), video frame reading and preprocessing The camera module continuously reads video frames and converts each frame into a grayscale image. The preprocessing includes grayscale, filtering, image scaling, image rotation, image flipping and image enhancement. Grayscale is to convert a color image into a grayscale image to reduce the amount of calculation while retaining the necessary information. Filtering: Use Gaussian filtering, median filtering and other methods to remove image noise and smooth the image. Image scaling is to adjust the size of the image to adapt it to the input requirements of the face detection algorithm. Image rotation and flipping is to rotate or flip the image in certain cases (tilted or inverted) to adapt to face detection in different directions. Image enhancement enhances the visual effect of the image by adjusting parameters such as brightness and contrast.

[0018] Each frame can be converted into a grayscale image by using the average value method, the maximum / minimum value method, or the weighted average method. In this embodiment, each frame is converted into a grayscale image by using the weighted average method, and the formula is: Gray=0.2989*R+0.5870*G+0.1140*B; Among them, Gray is the grayscale value of the converted grayscale image, and R, G, and B are the intensity values ​​of red, green, and blue respectively.

[0019] S02), frame difference calculation In this embodiment, the inter-frame difference is obtained by calculating the difference change ratio of two adjacent grayscale frames. The calculation formula of the difference change ratio is: , in is the difference change ratio, , The current frame and the previous frame are at positions Grayscale value, N and M are the width and height of the image respectively. It is the coordinate value of the image at the width i and height j position.

[0020] In other embodiments, the difference between frames may also be calculated by other methods, such as an absolute difference method, a square difference method, a structural similarity method, an optical flow method, a block matching method, or a background subtraction method.

[0021] S03) Difference threshold judgment The calculated frame difference change ratio is compared with a preset threshold Threshold. If DifferenceRate>Threshold, it is considered that an object or a face may enter the camera field of view, and further face detection is required. Otherwise, return to step S01).

[0022] S04) Face detection starts When the inter-frame difference change ratio exceeds the threshold, a fixed-length detection flag queue is initialized and a timer is started. The timer is set to 2 seconds, indicating that face detection is performed at a certain frequency in the next 2 seconds.

[0023] In this embodiment, the timing time of the timer is 2 seconds, and detection is performed every 0.5 seconds. The length of the detection mark queue is 2 / 0.5=4, and 4 detection flags are provided in it to mark the result of each face detection.

[0024] S05) Face detection The model used for face detection is yolov5-lite, which is a lightweight face detection model with a size of only 1MB. It can achieve the effect of real-time inference, but if every frame is detected, the CPU usage will reach 300%, which is unacceptable. In order to reduce resource utilization, choose to perform a detection every 0.5 seconds, and the single CPU usage is reduced to less than 30%.

[0025] S06) Flag queue update Within the time when the timer is triggered, if a face is detected and the size of the face (such as area) meets the preset requirements (such as Area>AreaThreshold), the corresponding position of the detection flag queue is updated to 1. If no face is detected or the face size does not meet the requirements, the position remains at 0.

[0026] S07) Stop condition judgment When the timer times out (such as reaching the set detection time length T) or the detection flag queue is all 1, face detection stops. At this time, if all positions in the queue are 1, it means that faces have been detected continuously within the working time of the timer. At this time, the welcoming robot is woken up and the loop exits.

[0027] S08) Low power standby If the timer times out but there is 0 in the detection flag queue, it means that the face has not been detected continuously within the working time of the timer, and the welcoming robot continues to enter the low-power standby state and waits for the next inter-frame difference detection.

[0028] Example 2 This embodiment discloses a low-power face awakening device for a welcoming robot, including a processor and a memory storing program instructions. The processor is configured to execute the low-power face awakening method for a welcoming robot as described in Example 1 when running the program instructions.

[0029] Example 3 This embodiment discloses a storage medium storing program instructions. When the program instructions are run, the low-power face awakening method for a welcoming robot as described in Embodiment 1 is executed.

[0030] The computer-readable storage medium mentioned above may be a transient computer-readable storage medium or a non-transitory computer-readable storage medium.

[0031] The technical solution of the embodiment of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for enabling a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the embodiment of the present disclosure. The aforementioned storage medium may be a non-transient storage medium, including: a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, and other media that can store program codes, or a transient storage medium.

[0032] The above description and the accompanying drawings fully illustrate the embodiments of the present disclosure so that those skilled in the art can practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible changes. Unless explicitly required, separate components and functions are optional, and the order of operations may vary. Parts and features of some embodiments may be included in or replace parts and features of other embodiments. Moreover, the words used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and the claims, unless the context clearly indicates, the singular forms of "a", "an" and "the" are intended to include plural forms as well. Similarly, the term "and / or" as used in this application refers to any and all possible combinations of one or more associated listings. In addition, when used in this application, the term "comprise" and its variants "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, the elements defined by the sentence "including one..." do not exclude the presence of other identical elements in the process, method or device including the elements. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the embodiments may refer to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can refer to the description of the method part.

[0033] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. The technicians may clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0034] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices, equipment, etc.) can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units can be only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between each other shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms. The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to implement this embodiment. In addition, each functional unit in the embodiment of the present disclosure may be integrated in a processing unit, or each unit may exist physically separately, or two or more units may be integrated in one unit.

[0035] The flowchart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to the embodiment of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of the code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. In the description corresponding to the flowchart and the block diagram in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in a different order from the order disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified functions or actions, or may be implemented by a combination of dedicated hardware and computer instructions.

Claims

1. A low-power face awakening method for a welcoming robot, characterized in that: The following steps are involved: S01), video frame reading and preprocessing, the camera module continuously reads video frames and converts each frame into a grayscale image; S02), calculating the difference between frames; S03), difference threshold judgment, compare the calculated frame difference with the preset threshold, if the frame difference is greater than the preset threshold, it is considered that an object or face has entered the camera field of view, and proceed to step S04), otherwise return to step S01); S04), initialize the detection flag queue, start the timer, and perform face detection. The face detection adopts the yolov5-lite model. The yolov5-lite model performs a detection every N seconds, and N is greater than the time interval for performing face detection in each frame; S05), within the time when the timer is triggered, if a face is detected and the size of the face meets the preset requirements, the corresponding position of the detection mark queue is updated to 1; if no face is detected or the face size does not meet the requirements, the corresponding position of the detection mark queue is kept at 0; S06), when the timer times out or the detection flag queue is all 1, the face detection is stopped. At this time, if all positions in the detection flag queue are 1, it means that the face has been detected continuously within the working time of the timer, and the welcoming robot is awakened. If the timer times out but there is 0 in the detection flag queue, it means that the face has not been detected continuously within the working time of the timer, and the welcoming robot continues to enter the low-power standby state and waits for the next frame difference detection.

2. The low-power face awakening method for a welcoming robot according to claim 1, characterized in that: In step S01), the preprocessing of the video frame includes graying, filtering, image scaling, image rotation, image flipping and image enhancement.

3. The low-power face awakening method for a welcoming robot according to claim 1 or 2, characterized in that: Each frame is converted into a grayscale image using the average method, maximum / minimum method, and weighted average method.

4. The low-power face awakening method for a welcoming robot according to claim 3, characterized in that: Each frame is converted into a grayscale image using the weighted average method. The formula is: Gray=0.2989*R+0.5870*G+0.1140*B; Among them, Gray is the grayscale value of the converted grayscale image, and R, G, and B are the intensity values ​​of red, green, and blue respectively.

5. The low-power face awakening method for a welcoming robot according to claim 1, characterized in that: The inter-frame difference is obtained by calculating the difference change ratio of the grayscale images of two adjacent frames. The calculation formula of the difference change ratio is: , in is the difference change ratio, , The current frame and the previous frame are at positions Grayscale value, N and M are the width and height of the image respectively. It is the coordinate value of the image at the width i and height j position.

6. The low-power face awakening method for a welcoming robot according to claim 1, characterized in that: The length of the detection mark queue is fixed, and a plurality of detection mark bits are arranged in it to mark the result of each face detection.

7. The low-power face awakening method for a welcoming robot according to claim 1, characterized in that: The timer is set to 2 seconds.

8. The low-power face awakening method for a welcoming robot according to claim 1, characterized in that: N is equal to 0.

5.

9. A low-power face awakening device for a welcoming robot, comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the low-power face wake-up method for a welcoming robot as described in any one of claims 1 to 8 when running the program instructions.

10. A storage medium storing program instructions, characterized in that: When the program instructions are run, they execute the low-power face awakening method for a welcoming robot as described in any one of claims 1 to 8.