Infant turning-over action real-time detection method, device and equipment and storage medium
Through real-time video stream processing and face occlusion judgment, combined with motion information, it can accurately detect the rolling movements of infants and young children, solving the problem of inability to accurately detect in the existing technology and improving the accuracy and safety of infant and young children's sleep monitoring.
Patent Information
- Application Number
- CN202410661533.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-30
- Publication Date
- 2024-09-06
AI Technical Summary
Existing infant sleep monitoring systems cannot accurately detect the rolling movements of infants and young children, especially when the face is blocked or the head is still but awake, and it cannot accurately determine whether the infant is sleeping.
By obtaining the real-time video stream in the infant care scene, decomposing it into multi-frame images, the infant's face occlusion judgment and facial analysis are performed, and the infant's face orientation is identified. When the infant's face orientation is forward, the target is obtained The regional position information, combined with the motion information of the face and target area, is determined to be a turning action.
It achieves accurate real-time detection of infants and young children turning over, helping parents or guardians understand their infants and young children's sleep conditions and safety status, and reduce potential risks of suffocation or discomfort.
Smart Images

Figure CN118609207A
Abstract
Description
[0001] This application is a divisional application of the invention patent application filed on August 30, 2023, with the invention name "Infant and young child turning over movement detection method, device, equipment and storage medium" and application number 202311108531.8. Technical Field
[0002] The present invention relates to the field of intelligent nursing technology, and in particular to a method, a device, a equipment and a storage medium. Background Art
[0003] Smart care for infants and young children is highly praised by many young parents. How to provide accurate smart care is an important factor for AI smart care equipment to occupy the market.
[0004] In the existing intelligent care for infant sleeping scenes, only the head detection algorithm can be used to detect whether it is a human head. After the human head is detected, it is distinguished whether the detected human head is an adult head or an infant head. By judging whether the detected infant head remains motionless for a long time, it is judged whether the infant enters sleep activity. The above scheme is relatively simple and only considers head detection. Since the head detection algorithm only focuses on the existence of the human head, when the infant is sleeping, if the face is covered or the head is blocked, the above scheme cannot detect it; at the same time, when the infant is sleeping, there are also some times when the infant's head does not move, but the infant is still awake. In this case, the above scheme cannot accurately judge whether the infant is sleeping.
[0005] The existing Chinese patent CN113408477A discloses a baby sleep monitoring system, method and device, the method comprising: S1, the baby enters the set sleep detection area, and the baby's sleep image information is collected in real time and continuously in multiple frames; S2, the collected sleep image information is preprocessed; S3, based on the preprocessed baby's sleep image information, the baby's limb movements are posture recognized and analyzed, and the characteristic parameters of the baby's sleep posture are obtained in real time; S4, based on the characteristic parameters of the recognized baby's sleep posture, the preset sleep behavior characteristic parameters are matched to obtain the sleep behavior information with the highest matching degree; S5, determine whether it is an abnormal sleep behavior, if it is determined to be an abnormal sleep behavior, execute S6, otherwise directly execute S7; S6, issue an alarm notification; S7, obtain a sleep curve based on the sleep behavior information within a specific time, and generate a sleep quality report based on a set period. However, the above patent only detects abnormal sleep behavior, and the detection of turning over in abnormal behavior is not accurate.
[0006] Therefore, how to accurately detect the turning over action of infants and young children in real time is an urgent problem to be solved. Summary of the invention
[0007] In view of this, the present invention provides a method, device, equipment and storage medium for real-time detection of infant turning over movements, so as to solve the problem in the prior art that it is impossible to accurately detect infant turning over movements in real time.
[0008] The technical solution adopted by the present invention is:
[0009] In a first aspect, the present invention provides a method for real-time detection of infant turning over movements, the method comprising:
[0010] When the infant's face is facing forward in the infant care scene, the target area position information is obtained, wherein the target area includes: the infant's body area and the obstruction area;
[0011] According to the target area position information, motion detection is performed on the target area, and the target area motion information is output;
[0012] The facial orientation of each infant and the movement information of the target area are determined, and when the facial orientation of the infant changes and the target area moves, the detection result is output as the infant's turning over action.
[0013] Preferably, when the infant's face is facing forward in the infant care scene, before acquiring the target area position information, the method further includes:
[0014] Acquire a real-time video stream in an infant care scene, and decompose the real-time video stream into multiple frame images;
[0015] Performing infant face occlusion judgment on each of the images to identify infant face occlusion conditions;
[0016] When it is recognized that the face of the infant is not blocked, a facial analysis is performed on the face of the infant, and the facial orientation of the infant is output.
[0017] Preferably, the step of judging whether the infant's face is blocked on each image and identifying whether the infant's face is blocked includes:
[0018] Performing infant head detection on each of the images to obtain an infant head image;
[0019] Performing infant face detection on the infant head image, and when a target image with an infant face is detected, performing head tracking on the infant head in the target image, wherein the infant face includes a front face and a side face;
[0020] Perform infant face detection on the tracked infant head and output the infant face occlusion status.
[0021] Preferably, the performing infant face detection on the tracked infant head and outputting the infant face occlusion situation comprises:
[0022] If the infant's face appears on the head of each tracked infant, the infant's face is not blocked;
[0023] If the tracked infant's head does not have an infant's face, a current frame image without an infant's face is obtained, and infant face detection is performed on a preset frame image after the current frame image;
[0024] If the number of image frames in which the infant's face appears in the preset frame images is greater than a preset frame number threshold, it is recognized that the infant's face is not blocked;
[0025] If the infant's face does not appear in any of the preset frame images or the number of image frames in which the infant's face appears is not greater than a preset frame number threshold, it is recognized that the infant's face is blocked.
[0026] Preferably, when the face of the infant is identified to be not blocked, performing facial analysis on the face of the infant and outputting the facial orientation of the infant comprises:
[0027] Acquire training image data containing infant faces, perform feature extraction on the training image data, and output key feature information of face orientation;
[0028] Inputting the key feature information into a deep learning network for training, and outputting a facial analysis model;
[0029] When it is recognized that all the tracked infants' heads have infant faces or the number of image frames in which the infant faces appear in the preset frame images is greater than a preset frame number threshold, an infant face image corresponding to the infant face not being blocked is obtained;
[0030] The infant face image is input into the face analysis model, and the infant face orientation is output.
[0031] Preferably, when the infant's face is facing forward in the infant care scene, before acquiring the target area position information, the method further includes:
[0032] If the infant's face does not appear in any of the preset frame images or the number of image frames in which the infant's face appears is not greater than a preset frame number threshold, it is recognized that the infant's face is blocked;
[0033] Inputting the corresponding image of the infant's face being blocked into the pre-trained target detection model, and detecting the preset facial key points, wherein the facial key points include the mouth and nose key points;
[0034] When it is detected that the facial key points do not appear, a safety reminder is output.
[0035] Preferably, when the infant's face is facing forward in the infant care scene, obtaining the target area position information includes:
[0036] Obtaining a frontal face image of the infant according to the facial orientation of the infant corresponding to the continuous multiple frames of images;
[0037] Inputting the frontal face image of the infant into a pre-trained infant facial key point detection model, and outputting the positions of the infant facial key points;
[0038] Obtaining a plurality of preset infant age intervals and the target area ratios corresponding to the respective age intervals, comparing the current infant age with the respective infant age intervals, and outputting the real-time ratio corresponding to the current infant;
[0039] The target area position information is output based on the positions of the key points on the infant's face and the real-time ratio.
[0040] In a second aspect, the present invention provides a real-time detection device for infant turning over movements, characterized in that the device comprises:
[0041] The region position information acquisition module is used to acquire the target region position information when the infant's face is facing forward in the infant care scene, wherein the target region includes: the infant's body region and the obstruction region;
[0042] A motion detection module, used to perform motion detection on the target area according to the position information of the target area, and output motion information of the target area;
[0043] The turning over detection module is used to determine the facial orientation of each infant and the movement information of the target area, and when the facial orientation of the infant changes and the target area moves, the detection result is output as the turning over action of the infant.
[0044] In a third aspect, an embodiment of the present invention further provides an electronic device, comprising: at least one processor, at least one memory, and computer program instructions stored in the memory, which, when executed by the processor, implement the method of the first aspect in the above-mentioned embodiment.
[0045] In a fourth aspect, an embodiment of the present invention further provides a storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the method of the first aspect in the above-mentioned embodiment is implemented.
[0046] In summary, the beneficial effects of the present invention are as follows:
[0047] The present invention provides a method, device, equipment and storage medium for real-time detection of infant turning over movements. The method comprises: obtaining a real-time video stream in an infant care scene, and decomposing the real-time video stream into multiple frames of images; performing infant face occlusion judgment on each of the images, and identifying the infant face occlusion situation; when it is identified that the infant face is not occluded, performing facial analysis on the infant face, and outputting the infant face orientation; when the infant face orientation is frontal, detecting the infant turning over movement, and outputting the detection result. The present invention acquires and processes real-time video streams to monitor the sleeping conditions and movements of infants in real time, which helps parents or guardians to understand the status of infants in a timely manner; by judging the face occlusion of the image, it can be determined whether the infants' faces are blocked by objects or other objects, which is very important for monitoring breathing or facial expression changes; if the infants' faces are not blocked, further face analysis is performed to detect the face orientation of the infants. When the face orientation of the infants is frontal, the system can detect the turning over of the infants, which can provide parents or guardians with information about the sleep quality and safety of the infants. If the infants are in the same posture or position for a long time, appropriate measures may need to be taken, such as changing the infants' sleeping position or posture, to reduce potential risks of suffocation or discomfort. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] In order to more clearly illustrate the technical solution of the embodiment of the present invention, the drawings required for use in the embodiment of the present invention will be briefly introduced below. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work, and these are all within the protection scope of the present invention.
[0049] Figure 1 This is a schematic diagram of the overall working process of the real-time detection method for infant turning over movement in Example 1 of the present invention;
[0050] Figure 2 This is a schematic diagram of a process for determining whether the infant's face is blocked in each of the images in Embodiment 1 of the present invention;
[0051] Figure 3 This is a schematic diagram of a process of performing infant face detection on a tracked infant head in Embodiment 1 of the present invention;
[0052] Figure 4 This is a schematic diagram of the process of performing facial analysis on the infant's face in Embodiment 1 of the present invention;
[0053] Figure 5 This is a schematic diagram of a process for issuing a safety reminder when recognizing that an infant's face is blocked in Embodiment 1 of the present invention;
[0054] Figure 6This is a schematic diagram of a process for generating an infant sleep quality report in Example 1 of the present invention;
[0055] Figure 7 This is a schematic diagram of a process for determining the position information of the torso of an infant in Embodiment 1 of the present invention;
[0056] Figure 8 This is a structural block diagram of a device for real-time detection of infant turning over movements in Embodiment 2 of the present invention;
[0057] Fig. 9 It is a schematic diagram of the structure of the electronic device in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the embodiment of the present invention clearer, the technical solution in the embodiment of the present invention will be clearly and completely described in conjunction with the drawings in the embodiment of the present invention. It should be noted that, in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. In the description of the present invention, it should be understood that the orientation or position relationship indicated by the terms "center", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such a process, method, article or device. In the absence of further restrictions, the elements defined by the phrase "comprising..." do not exclude the existence of other identical elements in the process, method, article or device comprising the elements. If there is no conflict, the embodiments of the present invention and the various features in the embodiments can be combined with each other, all within the protection scope of the present invention.
[0059] Example 1
[0060] See also Figure 1 Embodiment 1 of the present invention discloses a method for real-time detection of infant turning over movements, the method comprising:
[0061] S1: obtaining a real-time video stream in a baby care scene, and decomposing the real-time video stream into multiple frame images;
[0062] Specifically, a real-time video stream collected by a monitoring device is obtained, and the real-time video stream is decoded by a video codec library to convert the real-time video stream into an image format. During the conversion process, the video data needs to be decoded and decompressed, and the decompressed data is converted into an image format, such as JPEG, PNG, etc. The decomposed multi-frame images can be used to identify the sleeping state, posture and process of infants and young children, as well as to monitor the safety of infants and young children. At the same time, the overall characteristics of the infant's sleep process can be obtained by performing time series analysis on the multi-frame images, such as sleep duration, depth, number of awakenings, etc.
[0063] S2: performing infant face occlusion judgment on each of the images to identify the infant face occlusion situation;
[0064] Specifically, multiple frames of images decomposed from a real-time video stream are obtained, and the infant's face is blocked for each image. According to the result of the face occlusion judgment, corresponding protection measures can be selected. For example, when it is determined that the infant's face is blocked, a safety alert is sent to the parents to ensure the safety of the infant.
[0065] In one embodiment, see Figure 2 , said S2 comprises:
[0066] S21: Performing infant head detection on each of the images to obtain an infant head image;
[0067] Specifically, a large number of first image data sets containing infant heads are collected, and the infant heads in the collected first image data sets are annotated. The annotated image data are preprocessed, including operations such as image scaling, cropping and normalization, so as to improve the effect of subsequent processing, and a deep learning model corresponding to the infant head detection task is obtained, such as a target detection model based on a convolutional neural network, such as Faster R-CNN, YOLO or SSD, etc. The preprocessed image data set is used to train the selected target detection model. During the training process, the position and features of the infant head are used as labels for supervised learning so that the model can learn the features and position of the head. The trained model is evaluated using a reserved part of the image data set, and indicators such as detection accuracy and recall rate are calculated to improve the accuracy and robustness of the model. The trained target detection model is output as an infant head detection model, and each frame of original image decomposed from the real-time video stream is input into the infant head detection model, and the infant head position information is output. According to the infant head position information, the original image is cropped to extract the infant head image.
[0068] S22: performing infant face detection on the infant head image, and when a target image with an infant face is detected, performing head tracking on the infant head in the target image, wherein the infant face includes a front face and a side face;
[0069] Specifically, a second image dataset containing the front and side faces of infants is obtained, wherein the second image dataset can be obtained from a publicly available image dataset related to infants, the front and side faces of the infants in the second image dataset are annotated, and the annotated image data are preprocessed, including operations such as image scaling, cropping, and normalization, to improve the effect of subsequent processing, and a deep learning-based method is adopted, such as a facial key point detection model based on a convolutional neural network, for example, a commonly used model is HRNet, and the preprocessed second image dataset is used to perform a facial key point detection model based on the HRNet structure. Training is performed, during which key points of the front and side faces of infants are used as labels for supervised learning, so that the model can learn the features and positions of the front and side faces of infants, and the trained model is evaluated using a reserved portion of the second image data set to improve the accuracy and robustness of the model for key point detection, and the evaluated model is output as an infant face detection model, and each of the infant head images is input into the infant face detection model for processing, and a target image showing the front and side faces of infants is output, at which point the infant head in the target image is tracked by an IoU tracking method, wherein the IoU tracking method is a common target tracking method, which calculates the IoU value of the area where the infant head of the current frame image is located and the area where the infant head of the previous frame image is located to obtain the position of the infant head, thereby tracking the infant head.
[0070] S23: Performing infant face detection on the tracked infant head, and outputting the infant face occlusion status.
[0071] Specifically, a continuous sequence of image frames related to the head of the tracked infant is obtained, and infant face detection is performed on the image frame sequence, wherein the infant face detection method is to input the image frame sequence into the above-mentioned trained infant face detection model for processing, output the detection result, and judge the occlusion of the infant's face on the head of the tracked infant based on the detection result. When it is judged that the infant's face is blocked, a safety alarm is sent to the parents to ensure the safety of the infant.
[0072] In one embodiment, see Figure 3 , the S23 comprises:
[0073] S231: If the infant's face appears on the head of the tracked infant, the infant's face is not blocked;
[0074] Specifically, if the image frame sequence related to the tracked infant's head is detected by the infant face detection model, the detection result is that the infant's front face and side face appear in each frame image in the image frame sequence. At this time, it is considered that the infant's face is not obscured. Since the infant's head in the image frame sequence input into the infant face detection model is continuously tracked, the judgment of face obstruction caused by other infants' heads mistakenly detected in the image frame sequence is avoided.
[0075] S232: If the infant's face does not appear in the tracked head of the infant, a current frame image without the infant's face is obtained, and infant face detection is performed on a preset frame image after the current frame image;
[0076] Specifically, if the image frame sequence related to the tracked infant's head is detected by the infant face detection model, when the first frame image in which the infant's face does not appear is detected, the first frame image is obtained as the current frame image, and the preset frame image after the first frame image is input into the infant face detection model for processing, wherein the number of frames of the preset frame image is adjusted according to the actual application scenario and the actual application needs of the user. The larger the number of frames of the preset frame image, the higher the accuracy of facial occlusion recognition and the lower the recognition efficiency. The smaller the number of frames of the preset frame image, the lower the accuracy of facial occlusion recognition and the higher the recognition efficiency.
[0077] S233: If the number of image frames in which the infant's face appears in the preset frame images is greater than a preset frame number threshold, it is recognized that the infant's face is not blocked;
[0078] Specifically, a preset frame number threshold is obtained, for example, the frame number threshold is set to 10 frames. If the above-mentioned preset frame image is input into the infant face detection model for processing, and the number of image frames that identify the front face or side face of the infant is greater than 10 frames, it is considered that the infant's face is not blocked. Due to the rolling and other movements of the infant, the face may be sometimes blocked and sometimes not blocked. At this time, the infant is not in danger of suffocation. If it is identified that the infant's face is blocked, a false alarm will be issued, and the user care experience will be poor. By presetting the frame number threshold, when the number of image frames of the infant's face is greater than the preset frame number threshold, it is identified that the infant's face is not blocked, thereby avoiding false alarms and improving the user's care experience.
[0079] S234: If the infant's face does not appear in any of the preset frame images or the number of image frames in which the infant's face appears is not greater than a preset frame number threshold, it is recognized that the infant's face is blocked.
[0080] Specifically, the preset frame images after the above-mentioned first frame image are input into the infant face detection model for processing. If the number of image frames showing the front or side face of the infant is no more than 10 frames or the front or side face of the infant does not appear in any of the preset frame images, the infant is in danger of suffocation. In this case, it is considered that the infant's face is blocked, and a safety alarm is promptly issued to the user to prevent the infant from being harmed.
[0081] S3: when it is recognized that the face of the infant is not blocked, performing facial analysis on the face of the infant and outputting the facial orientation of the infant;
[0082] Specifically, an image of an infant's face that is not obstructed is input into a pre-trained face orientation detection model for orientation detection, and the model outputs the infant's face orientation, such as front, left, or right.
[0083] In one embodiment, see Figure 4 , said S3 comprises:
[0084] S31: Acquire training image data containing infant faces, perform feature extraction on the training image data, and output key feature information of face orientation;
[0085] Specifically, a data set of infant facial images with different orientations is collected, wherein the infant facial image data set contains facial images in multiple orientations such as the front, left side, and right side; the infant facial image data set is preprocessed to improve the performance of the model, and the preprocessing may consider using image enhancement techniques, such as rotation, scaling, and cropping, to increase the diversity and robustness of the data, and using feature extraction methods to capture key feature information of the facial orientation, for example, the key feature information includes Haar features and HOG features, or consider using a deep learning model to learn facial features, such as a convolutional neural network (CNN). Collecting data from multiple orientations helps the model better understand and learn facial features in different orientations, thereby improving the generalization ability of the model. Using data enhancement and selecting appropriate feature extraction methods helps to improve the performance and robustness of the infant facial orientation recognition model, so that it can accurately determine the orientation of the infant's face.
[0086] S32: inputting the key feature information into a deep learning network for training, and outputting a facial analysis model;
[0087] Specifically, the extracted key feature information is used to train a classifier, which is used to determine the orientation of the infant's face. The classifier selects a common classifier algorithm, such as a support vector machine (SVM), a random forest (RandomForest) or a deep learning model, such as a convolutional neural network, and uses images in an infant face image dataset to train the model. The validation set is used to evaluate and tune the model, and a cross-validation method is used to evaluate the performance of the model, and the parameters are adjusted to output the face analysis model. By learning the key feature information, the classifier can better distinguish faces of different orientations, thereby improving recognition accuracy; the fully trained and tuned classifier model has strong robustness and can cope with the influence of factors such as different lighting conditions and changes in facial posture. This enables the model to run stably in various practical application scenarios and improves the reliability of the system.
[0088] S33: when it is recognized that all the tracked infants' heads have infants' faces or the number of image frames in which the infants' faces appear in the preset frame images is greater than a preset frame number threshold, obtaining an infant's face image corresponding to an unobstructed infant's face;
[0089] S34: Input the infant's facial image into the facial analysis model, and output the infant's facial orientation.
[0090] Specifically, the infant's facial image is input into the facial analysis model, and the infant's facial orientation is output. For the care and monitoring of infants, obtaining the infant's facial orientation can help keep them safe. For example, in a crib or car seat, correctly judging the orientation of the infant's face can ensure that their head is in the correct position to avoid possible suffocation or discomfort. Obtaining the infant's facial orientation is helpful for sleep monitoring. By identifying the orientation of the infant's face, their sleeping posture can be determined, including supine, side or prone, etc., to help monitor their sleep quality and posture habits.
[0091] In one embodiment, see Figure 5 , said S4 before includes:
[0092] S401: if the infant's face does not appear in any of the preset frame images or the number of image frames in which the infant's face appears is not greater than a preset frame number threshold, then identifying that the infant's face is blocked;
[0093] Specifically, if the infant's face does not appear in any of the preset frame images or the number of image frames in which the infant's face appears is not greater than the preset frame number threshold, the infant's face may be blocked by other objects, towels, toys, etc., resulting in the inability to recognize or partial recognition of the infant's face.
[0094] S402: Inputting the corresponding image of the infant's face being blocked into a pre-trained target detection model to detect preset facial key points, wherein the facial key points include mouth and nose key points;
[0095] Specifically, a data set containing infant facial images is collected and annotated, and the key points of the infant nose and mouth are marked. This can be done using image annotation tools or manual annotation; the annotated data set is preprocessed, including image scaling, cropping, rotation and other operations to increase the diversity and robustness of the data. At the same time, data enhancement operations such as translation, rotation, flipping, brightness adjustment, etc. are performed on infant facial images to increase the generalization ability of the model, and the target detection model architecture is selected, such as a model based on deep learning, such as Faster R-CNN, YOLO, SSD, etc. The existing pre-trained model can be used as the basic network, and additional key point regression branches can be added on its basis. The target detection model is trained using the annotated infant facial image data set. During the training process, optimization algorithms such as stochastic gradient descent (SGD) are used to minimize the loss function, and the coordinate information of the key points is used to calculate the loss of the key point regression. During the training process, it is necessary to set appropriate hyperparameters such as learning rate and batch size, and perform an appropriate number of iterations. The trained model is evaluated using the validation set, and tuned according to the evaluation results. Evaluation indicators such as mean average precision (mAP) can be used to evaluate the performance of the model. According to the evaluation results, the parameters and architecture of the model are adjusted to improve the detection accuracy and the accuracy of key point regression. The adjusted model is output as the target detection model. The corresponding image of the infant's face is input into the pre-trained target detection model to detect the preset facial key points, where the facial key points include the mouth and nose key points; by detecting the nose and mouth key points, the facial expression and the state of the mouth and nose area of the infant can be understood in real time. This is very helpful for monitoring the health, breathing and comfort of infants. If abnormal conditions are detected, such as a blocked nose, an abnormally open or closed mouth, etc., corresponding actions can be taken in time to ensure the comfort and safety of the infant.
[0096] S403: When it is detected that the facial key points do not appear, a safety reminder is output.
[0097] Specifically, when the absence of the facial key points is detected in the infant's sleeping scene, this may mean that the infant's face may be blocked, facing down or facing sideways, which may increase the risk of suffocation or discomfort. By monitoring the infant's facial key points in real time, abnormal situations can be detected in time and alarms can be provided. This can prompt parents or guardians to take immediate measures, such as turning the infant's body or adjusting their sleeping position to ensure that their face is properly ventilated and breathing; in addition, outputting safety reminders can also remind parents or guardians of safety issues in the infant's sleeping environment, such as ensuring that there are no loose sheets or toys on the bed, and avoiding over-covering the infant. These reminders can help parents or guardians stay alert and ensure the safety of infants during sleep.
[0098] S4: When the infant's face is facing forward, detecting the infant's turning over action and outputting the detection result.
[0099] Specifically, by detecting the turning over movement of infants and young children when their faces are facing forward and outputting the detection results, safety monitoring, guidance and recording can be provided, which helps ensure the safety and comfort of infants and young children during sleep, and helps parents or guardians better manage the sleeping behavior of infants and young children.
[0100] In one embodiment, see Figure 6 , said S4 comprises:
[0101] S41: according to the face orientation of the infant, when the face orientation of the infant is frontal, obtaining the position information of the target area, wherein the target area includes: the body area of the infant and the obstruction area;
[0102] In one embodiment, see Figure 7 , the S41 comprises:
[0103] S411: acquiring a frontal face image of the infant according to the facial orientation of the infant corresponding to the continuous multiple frames of images;
[0104] Specifically, using a continuous multi-frame video stream as input, face detection and positioning are performed on each frame of the image. Face detection algorithms such as Haar cascade, HOG+SVM, and deep learning models can be used to filter out frontal images based on face orientation information. The frontal face images of infants and young children are obtained to provide accurate input for subsequent analysis and processing, excluding images of side faces or other angles, and focusing on analyzing the frontal facial features of infants and young children.
[0105] S412: Inputting the frontal face image of the infant into a pre-trained infant facial key point detection model, and outputting the positions of the infant facial key points;
[0106] Specifically, a pre-trained infant facial key point detection model, such as a deep learning-based facial key point detection model, is used to input the infant's frontal face image into the model for inference to obtain the position of the facial key points. The accurate position of the infant's facial key points, such as the position information of feature points such as eyes, nose, and mouth, is obtained. The position information of these key points can be used for subsequent facial analysis, emotion recognition, sleep quality assessment and other applications.
[0107] S413: Acquire a plurality of preset infant age intervals and target area ratios corresponding to the age intervals, compare the current infant age with the infant age intervals, and output a real-time ratio corresponding to the current infant;
[0108] Specifically, multiple infant age ranges are predefined, such as 0-3 months, 3-6 months, 6-9 months, etc., and the target area ratio is defined for each age range, indicating the relative position of the face of the infant of this age range in the entire image. According to the age of the current infant, it is compared with each age range to determine the real-time ratio corresponding to the current infant. According to the age of the infant, the target area ratio of infants of different age groups is automatically adapted to improve the universality and adaptability of the system. The output of the real-time ratio can help further locate the infant's face area and accurately analyze the facial features of infants of a specific age group.
[0109] S414: Outputting the target area position information according to the key point positions of the infant's face and the real-time ratio.
[0110] Specifically, the position information of the key points of the infant's face is used in combination with the real-time ratio to calculate the position of the target area. The position of the target area can be represented by a rectangular frame that surrounds the infant's body area and the area where obstructions such as quilts on the body are located.
[0111] S42: performing motion detection on the target area according to the target area position information, and outputting target area motion information;
[0112] Specifically, the target area position information is used, usually the upper body area of the infant or the area where the occluder on the upper body of the infant is located, and motion detection algorithms such as optical flow method, background difference, frame difference, etc. are used to detect the motion of the target area, analyze the motion detection results, and output the motion information of the target area, such as motion direction, motion speed, motion amplitude, etc. Based on the motion information of the target area, the activity level, posture changes, etc. of the infant can be further analyzed and judged, and the motion information can be used for subsequent behavior monitoring, sleep posture analysis and other applications.
[0113] S43: Determine the facial orientation of each infant and the target area movement information, and when the facial orientation of the infant changes and the target area moves, output the detection result as the infant's turning over action.
[0114] Specifically, the infant's facial orientation information and target area motion information obtained in the previous steps are combined to determine whether the infant's facial orientation has changed, and the facial orientation information of the current frame is compared with the previous frame to determine whether the target area has moved. The determination is made based on the motion information of the target area. If the infant's facial orientation has changed and the target area has moved, the output detection result is the infant's turning over action. By timely detecting and identifying the infant's turning over action, timely monitoring and warning are provided to ensure the safety of the infant. Outputting the detection result of the turning over action can help guardians or childcare workers take necessary measures in a timely manner, such as adjusting the infant's sleeping position or providing support.
[0115] Example 2
[0116] See also Figure 8 Embodiment 2 of the present invention further provides a real-time detection device for infant turning over movements, characterized in that the device comprises:
[0117] An image acquisition module is used to acquire a real-time video stream in an infant care scene and decompose the real-time video stream into multiple frames of images;
[0118] A face occlusion judgment module, used to judge the face occlusion of infants and young children on each of the images, and identify the face occlusion of infants and young children;
[0119] A face orientation acquisition module, for performing face analysis on the face of the infant and outputting the face orientation of the infant when it is recognized that the face of the infant is not blocked;
[0120] The turning over detection module is used to detect the turning over action of the infant when the infant's face is facing forward, and output the detection result.
[0121] Specifically, the real-time detection device for infant turning over movements provided by the embodiment of the present invention comprises: an image acquisition module, used to acquire a real-time video stream in an infant care scene, and decompose the real-time video stream into multiple frames of images; a face occlusion judgment module, used to perform infant face occlusion judgment on each of the images, and identify the infant face occlusion situation; a face orientation acquisition module, used to perform face analysis on the infant face when it is identified that the infant face is not blocked, and output the infant face orientation; a turning over detection module, used to detect the infant turning over movement when the infant face orientation is frontal, and output the detection result. The device monitors the sleeping conditions and movements of infants and young children in real time by acquiring and processing real-time video streams, which helps parents or guardians to understand the status of infants and young children in a timely manner; by judging the face occlusion of the image, it can be determined whether the infants and young children have objects or other objects blocking their faces, which is very important for monitoring breathing or facial expression changes; if the infants and young children's faces are not blocked, further facial analysis is performed to detect the direction of the infants and young children's faces. When the infants and young children's faces are facing forward, the device can detect the infants and young children's turning over movements, which can provide parents or guardians with information about the infants and young children's sleep quality and safety. If the infants and young children are in the same posture or position for a long time, appropriate measures may need to be taken, such as changing the infants and young children's sleeping position or posture, to reduce potential risks of suffocation or discomfort.
[0122] Example 3
[0123] In addition, combined Figure 1 The real-time detection method for turning over movements of infants and young children described in Embodiment 1 of the present invention may be implemented by an electronic device. Fig. 9 A schematic diagram of the hardware structure of an electronic device provided in Embodiment 3 of the present invention is shown.
[0124] The electronic device may include a processor and a memory storing computer program instructions.
[0125] Specifically, the processor may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present invention.
[0126] The memory may include a large capacity memory for data or instructions. By way of example and not limitation, the memory may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. Where appropriate, the memory may include a removable or non-removable (or fixed) medium. Where appropriate, the memory may be inside or outside a data processing device. In a particular embodiment, the memory is a non-volatile solid-state memory. In a particular embodiment, the memory includes a read-only memory (ROM). Where appropriate, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM) or a flash memory or a combination of two or more of these.
[0127] The processor implements any one of the methods for real-time detection of infant turning over movements in the above embodiments by reading and executing computer program instructions stored in the memory.
[0128] In one example, the electronic device may further include a communication interface and a bus. Fig. 9 As shown, the processor, memory, and communication interface are connected via a bus and communicate with each other.
[0129] The communication interface is mainly used to implement communication between the modules, devices, units and / or equipment in the embodiments of the present invention.
[0130] The bus includes hardware, software or both, and the parts of the device are coupled to each other. For example, but not limitation, the bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In suitable cases, the bus may include one or more buses. Although the embodiment of the present invention describes and shows a specific bus, the present invention considers any suitable bus or interconnection.
[0131] Example 4
[0132] In addition, in combination with the real-time detection method for infant turning over in the above embodiment 1, the embodiment 4 of the present invention can also provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by the processor, any of the real-time detection methods for infant turning over in the above embodiments is implemented.
[0133] In summary, the embodiments of the present invention provide a method, device, equipment and storage medium for real-time detection of infant rolling movements.
[0134] It should be clear that the present invention is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present invention is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present invention.
[0135] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0136] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in a different order from the embodiments, or several steps can be performed simultaneously.
[0137] The above is only a specific implementation of the present invention. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the system, module and unit described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. It should be understood that the protection scope of the present invention is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be covered within the protection scope of the present invention.
Claims
1. A real-time detection method for infants' turning over movements, It is characterized in that The method comprises: When the infant's face is facing forward in the infant care scene, the target area position information is obtained, wherein the target area includes: the infant's body area and the obstruction area; According to the target area position information, motion detection is performed on the target area, and the target area motion information is output; The facial orientation of each infant and the movement information of the target area are determined, and when the facial orientation of the infant changes and the target area moves, the detection result is output as the infant's turning over action.
2. The real-time detection method for infant turning over according to claim 1, It is characterized in that When the infant's face is facing forward in the infant care scenario, before obtaining the target area position information, the method further includes: Acquire a real-time video stream in an infant care scene, and decompose the real-time video stream into multiple frame images; Performing infant face occlusion judgment on each of the images to identify infant face occlusion conditions; When it is recognized that the face of the infant is not blocked, a facial analysis is performed on the face of the infant, and the facial orientation of the infant is output.
3. The real-time detection method for infant turning over according to claim 2, It is characterized in that The step of judging the infant face occlusion on each image and identifying the infant face occlusion situation includes: Performing infant head detection on each of the images to obtain an infant head image; Performing infant face detection on the infant head image, and when a target image with an infant face is detected, performing head tracking on the infant head in the target image, wherein the infant face includes a front face and a side face; Perform infant face detection on the tracked infant head and output the infant face occlusion status.
4. The real-time detection method for infant turning over according to claim 3, It is characterized in that The performing infant face detection on the tracked infant head and outputting the infant face occlusion condition comprises: If the infant's face appears on the head of each tracked infant, the infant's face is not blocked; If the tracked infant's head does not have an infant's face, a current frame image without an infant's face is obtained, and infant face detection is performed on a preset frame image after the current frame image; If the number of image frames in which the infant's face appears in the preset frame images is greater than a preset frame number threshold, it is recognized that the infant's face is not blocked; If the infant's face does not appear in any of the preset frame images or the number of image frames in which the infant's face appears is not greater than a preset frame number threshold, it is recognized that the infant's face is blocked.
5. The real-time detection method for infant turning over according to claim 2, It is characterized in that When it is recognized that the face of the infant is not blocked, performing facial analysis on the face of the infant and outputting the facial orientation of the infant includes: Acquire training image data containing infant faces, perform feature extraction on the training image data, and output key feature information of face orientation; Inputting the key feature information into a deep learning network for training, and outputting a facial analysis model; When it is recognized that all the tracked infants' heads have infant faces or the number of image frames in which the infant faces appear in the preset frame images is greater than a preset frame number threshold, an infant face image corresponding to the infant face not being blocked is obtained; The infant face image is input into the face analysis model, and the infant face orientation is output.
6. The real-time detection method for infant turning over according to claim 1, It is characterized in that When the infant's face is facing forward in the infant care scenario, before obtaining the target area position information, the method further includes: If the infant's face does not appear in any of the preset frame images or the number of image frames in which the infant's face appears is not greater than a preset frame number threshold, it is recognized that the infant's face is blocked; Inputting the corresponding image of the infant's face being blocked into the pre-trained target detection model, and detecting the preset facial key points, wherein the facial key points include the mouth and nose key points; When it is detected that the facial key points do not appear, a safety reminder is output.
7. The real-time detection method for infant turning over according to claim 1, It is characterized in that When the infant's face is facing forward in the infant care scene, obtaining the target area position information includes: Obtaining a frontal face image of the infant according to the facial orientation of the infant corresponding to the continuous multiple frames of images; Inputting the frontal face image of the infant into a pre-trained infant facial key point detection model, and outputting the positions of the infant facial key points; Obtaining a plurality of preset infant age intervals and the target area ratios corresponding to the respective age intervals, comparing the current infant age with the respective infant age intervals, and outputting the real-time ratio corresponding to the current infant; The target area position information is output based on the positions of the key points on the infant's face and the real-time ratio.
8. A real-time detection device for infants’ turning over movements, It is characterized in that The device comprises: The region position information acquisition module is used to acquire the target region position information when the infant's face is facing forward in the infant care scene, wherein the target region includes: the infant's body region and the obstruction region; A motion detection module, used to perform motion detection on the target area according to the position information of the target area, and output motion information of the target area; The turning over detection module is used to determine the facial orientation of each infant and the movement information of the target area, and when the facial orientation of the infant changes and the target area moves, the detection result is output as the turning over action of the infant.
9. An electronic device, It is characterized in that include: At least one processor, at least one memory and computer program instructions stored in the memory, when the computer program instructions are executed by the processor, implement the method according to any one of claims 1 to 7.
10. A storage medium having computer program instructions stored thereon, It is characterized in that When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
