Sleep detection method, device and equipment
The thermal infrared image data of the baby is obtained through the thermal infrared camera, segmented and analyzed the image area, and combined with the deep learning model to realize contactless sleep detection, solving the problems of easy damage and poor comfort of contact sensors in the prior art, and achieving efficient and accurate sleep state detection.
Patent Information
- Application Number
- CN202510295572.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-06-27
AI Technical Summary
The prior art requires contact with sensors when detecting the sleep state of a baby, which is prone to damage and reduces sleep comfort, making it difficult to be suitable for daily household use.
Thermal infrared camera is used to obtain timing thermal infrared image data. By segmenting high-temperature areas and low-temperature areas, the target head and unobstructed body area are extracted, the unobstructed body proportion is calculated, and the deep learning model is called within a specific threshold range for pedal detection.
It realizes contactless and accurate detection of infant sleep state, improves the real-time and accuracy of detection, is suitable for home use, and works normally in low-light or no-light environments.
Smart Images

Figure CN120220060A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the technical field of intelligent monitoring, and particularly relates to a sleep detection method, device, and equipment. Background Art
[0002] Currently, most of the kicking / covering detection methods for infants are based on contact sensors, which mainly rely on sensors placed on the infant or the bed. For example, an electromagnetic radiation sensor is used to detect whether the quilt covers the infant's body. A pressure sensor is used to detect the infant's turning over or the pressure change of the quilt. A temperature sensor is used to detect whether the infant's skin temperature changes due to exposure or covering. Although this method has high detection accuracy, it requires installing sensors on the infant, which is prone to damage due to problems such as turning over, and reduces the comfort of the infant's sleep. This method is suitable for scenarios with high requirements for monitoring accuracy, such as hospital infant care; but it is not suitable for long-term wearing due to comfort and maintenance problems, and is not applicable to daily household use.
[0003] In view of this, how to accurately detect the sleep of a target (especially an infant) without contact is an issue that needs to be solved by those skilled in the art. Summary of the Invention
[0004] In view of the above analysis, embodiments of the present invention aim to provide a sleep detection method, device, and equipment, aiming to non-contact accurately obtain the sleep state of the target.
[0005] In the first aspect of this application, a sleep detection method is provided, including:
[0006] Obtain the sequential thermal infrared image data of the target;
[0007] Extract the current frame infrared image from the sequential thermal infrared image data, and based on the comparison between the current frame infrared image and the first temperature threshold, divide the current frame infrared image into a high-temperature region and a low-temperature region;
[0008] Extract the target head region and the unobstructed body region of the target from the current frame infrared image;
[0009] Calculate the proportion of the unobstructed body based on the target head region and the unobstructed body region of the target;
[0010] When the proportion of the unobstructed body is greater than the first threshold, it is determined that the target has a kicking quilt situation; when the proportion of the unobstructed body is less than the second threshold, it is determined that the target does not have a kicking quilt situation; when the proportion of the unobstructed body is between the second threshold and the first threshold, input the current frame infrared image into a pre-trained sleep detection model, and output the detection result of whether there is a kicking quilt situation;
[0011] Among them, the sleep detection model is trained using a training set of thermal infrared image data with known labels.
[0012] Optionally, extracting the target head region from the current frame infrared image includes:
[0013] Detecting circular targets from the high-temperature region using the Hough circle transform;
[0014] If multiple detected circular targets exist, calculate the temperature mean of each circular target, and determine the circular target with the highest temperature as the target head region.
[0015] Optionally, extracting the unoccluded body region of the target from the current frame infrared image includes:
[0016] After determining the target head region, extract the region connected to the target head region and with a temperature greater than the second temperature threshold through the connected component method to determine the unoccluded body region of the target.
[0017] Optionally, after extracting the target head region from the current frame infrared image, it further includes:
[0018] For consecutive multiple frames of thermal infrared images, perform head trajectory tracking on the extracted target head region;
[0019] If the head trajectory disappears and does not cross the boundary of the thermal infrared image, it is determined that there is a situation of covering the head.
[0020] Optionally, the head trajectory tracking of the extracted target head region includes:
[0021] Perform head trajectory tracking on the extracted target head region based on the Kalman filter algorithm.
[0022] Optionally, after extracting the target head region from the current frame infrared image, it further includes:
[0023] Input the current frame infrared image into a pre-trained sleep detection model to output the detection result of whether there is a situation of covering the head.
[0024] Optionally, the training process of the sleep detection model includes: collecting thermal infrared images of the target sleep state in different scenarios to construct a thermal infrared image dataset;
[0025] Manually annotate each of the thermal infrared images with the corresponding sleep state category, and the sleep state categories include no one, normal sleep, presence of kicking the quilt situation, presence of covering the head situation;
[0026] Use the thermal infrared image dataset to train the YOLOv5 classification model.
[0027] Optionally, the first temperature threshold is determined by using an adaptive threshold algorithm:
[0028] Obtain the current ambient temperature data;
[0029] Calculate the adjusted first temperature threshold based on the current ambient temperature data and historical data.
[0030] In a second aspect of the present application, there is provided a sleep detection device, including a memory and a processor, where the memory stores a computer program, and when the computer program is executed by the processor, it implements the sleep detection method according to any one of the above.
[0031] In a third aspect of the present application, there is provided a sleep detection device, including: a sensor device, an alarm device, and the sleep detection device according to the above;
[0032] Wherein, the sensor device is configured to collect the sequential thermal infrared image data of the target and transmit the sequential thermal infrared image data to the sleep detection device;
[0033] The sleep detection device is configured to output a detection result of whether there is a quilt-kicking situation of the target based on the sequential thermal infrared image data;
[0034] The alarm device is configured to receive the detection result output by the sleep detection device and generate an alarm prompt.
[0035] The sleep detection method provided by the present application uses a thermal infrared camera to obtain sequential thermal infrared image data, extracts the target head region and the unobscured body region of the target from the extracted current frame infrared image; by calculating the proportion of the unobscured body, sets a first threshold and a second threshold to quickly screen the quilt-kicking situation and improve the real-time performance. Only when in the critical range, that is, between the second threshold and the first threshold, the deep learning model is called for further accurate determination, which improves the judgment efficiency and the judgment accuracy while. The present application can also work normally in low-light or no-light environments at night, makes up for the defects of the ordinary RGB camera detection method, avoids misjudgment caused by indoor light changes, and improves the stability of detection. In addition, the present application also provides a sleep detection device and equipment having the above technical effects. Description of the Drawings
[0036] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings described below are only some embodiments recorded in the embodiments of this specification, and those of ordinary skill in the art can also obtain other drawings based on these drawings.
[0037] Figure 1 A flowchart of a specific implementation manner of the sleep detection method provided by this application;
[0038] Figure 2 A flowchart of a specific implementation manner of detecting whether there is a situation of covering the head for the target provided by this application;
[0039] Figure 3 A flowchart of another specific implementation manner of detecting whether there is a situation of covering the head for the target provided by this application;
[0040] Figure 4 A structural block diagram of the sleep detection device provided by this application;
[0041] Figure 5 A structural block diagram of the sleep detection device provided by this application. Specific implementation manner
[0042] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are some, but not all, of the embodiments of this application. It should be noted that, without conflict, the implementation manners and features in the present disclosure can be combined with each other, separated, interchanged, and / or rearranged. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.
[0043] The terms used here are for the purpose of describing specific embodiments and are not intended to be restrictive. As used herein, unless the context clearly indicates otherwise, the singular forms "a", "an", and "the" are also intended to include the plural forms. In addition, when the terms "comprise" and / or "include" and their variants are used in this specification, it is stated that there are the stated features, wholes, steps, operations, components, assemblies, and / or groups thereof, but it does not exclude the presence or addition of one or more other features, wholes, steps, operations, components, assemblies, and / or groups thereof. It should also be noted that, as used here, the terms "substantially", "about", and other similar terms are used as approximate terms rather than degree terms, so they are used to explain the inherent deviations of the measured values, calculated values, and / or provided values that those of ordinary skill in the art will recognize.
[0044] A flowchart of a specific implementation manner of the sleep detection method provided by this application is as Figure 1 shown, and the method specifically includes:
[0045] S101: Obtain the time-series thermal infrared image data of the target.
[0046] Continuously collect thermal infrared images through a thermal infrared camera to form time-series thermal infrared image data.
[0047] It can be understood that this application can be applied to detect kicking off the quilt or covering the head during sleep for groups such as infants, disabled people, and the elderly, which is not limited here. Correspondingly, the target can be an infant, a disabled person, or an elderly person.
[0048] S102: Extract the current-frame infrared image from the time-series thermal infrared image data, and based on the comparison between the current-frame infrared image and the first temperature threshold, segment the current-frame infrared image into a high-temperature region and a low-temperature region.
[0049] Extract the current-frame infrared image from the time-series thermal infrared image data for real-time analysis. Through the first temperature threshold, segment the current-frame infrared image into a high-temperature region and a low-temperature region. Among them, the high-temperature region corresponds to the target's body region, and the low-temperature region corresponds to the environmental region, such as the quilt.
[0050] The infrared camera used in this application can achieve an error of ±1°C in the usage scenario (for example, within a distance of 1m). After verification with multiple groups of data, this application finds that the environmental temperature, such as that of quilts and mattresses, is generally between 26 - 29°C, the body temperature of the target is distributed between 30 - 34°C according to different clothes, and the temperature of the head is generally around 35 - 37°C. Therefore, the threshold method can be used to segment the temperature image into a high-temperature region and a low-temperature region. The first temperature threshold can be selected as 33°C.
[0051] At different environmental temperatures, the difference between the target's body temperature and the environmental temperature will change, and a fixed threshold may lead to misjudgment. Therefore, as a specific implementation, the first temperature threshold can be calculated adaptively to ensure that the target body region and the environmental region can be accurately segmented stably at different environmental temperatures.
[0052] S103: Extract the target head region and the unobstructed body region of the target from the current-frame infrared image.
[0053] Among them, extracting the target head region from the current-frame infrared image includes: using the Hough circle transform to detect circular targets in the high-temperature region; if multiple circular targets are detected, calculate the temperature mean of each circular target, and determine the circular target with the highest temperature as the target head region.
[0054] Hough circle transform is applicable to detecting targets close to circular shape (such as the head of a target human body). Before detection, the high-temperature area segmented by the threshold method can be binarized. Multiple candidate targets may be detected and need to be screened subsequently. Traverse all the detected circular regions. Calculate the average temperature of each circular region, screen the circle with the highest temperature, and determine the target head region. Temperature data can also be combined during the process to ensure that the selected circle is the actual head rather than other high-temperature objects (such as heaters or lights).
[0055] The head is usually the area with the highest temperature and can be used as the starting point for segmenting the body. In this process, multiple detected circular targets can be represented by red frames, and the target with the highest selected temperature, that is, the target head region, can be represented by a green frame.
[0056] Extracting the unobstructed body area of the target from the current frame infrared image includes: after determining the target head region, extracting the region connected to the target head region and with a temperature greater than the second temperature threshold through the connected component method to determine the unobstructed body area of the target.
[0057] After detecting the target head region, use connected component analysis to find all high-temperature regions (possibly the baby's body) connected to the head region. This process is further screened based on the second temperature threshold: if it is greater than the second temperature threshold, it is considered an unobstructed body. If it is lower than the second temperature threshold: it is considered the covered part by the quilt or the environment. Finally, the unobstructed body area is obtained for subsequent kicking-off-the-quilt / montaging-the-head judgment.
[0058] S104: Calculate the proportion of the unobstructed body based on the target head region and the unobstructed body area of the target.
[0059] The proportion of the unobstructed body is the ratio of the unobstructed body area of the target to the target head region. If the value of the proportion of the unobstructed body is small, it means that the exposed body part connected to the head is very small, and it can be judged that there is no situation of kicking off the quilt without using the model. Similarly, if the value of the proportion of the unobstructed body is large, it can be judged that there is a situation of kicking off the quilt without using the model. If the value of the proportion of the unobstructed body is in the middle region, the model is further called and the model output is used as the standard.
[0060] S105: When the proportion of the unobstructed body is greater than the first threshold, it is determined that the target has a situation of kicking off the quilt; when the proportion of the unobstructed body is less than the second threshold, it is determined that the target does not have a situation of kicking off the quilt; when the proportion of the unobstructed body is between the second threshold and the first threshold, the current frame infrared image is input into the pre-trained sleep detection model, and the detection result of whether there is a situation of kicking off the quilt is output.
[0061] When the unoccluded body ratio is greater than the first threshold, it is directly determined that the target has kicked the quilt. When the unoccluded body ratio is less than the second threshold, it is directly determined that the target does not have the situation of kicking the quilt. When the unoccluded body ratio is between the second threshold and the first threshold, the deep learning module is called for further judgment. As a specific implementation, the first threshold is 3 and the second threshold is 1.5.
[0062] Among them, the sleep detection model is trained by using a training set of thermal infrared image data with known labels. Each collected thermal infrared image is manually annotated with the corresponding sleep state category, and the sleep state categories include no person, normal sleep, having the situation of kicking the quilt, and having the situation of covering the head. The sleep detection model is trained by the training set so that after training, based on the input thermal infrared image, the detection result of the target sleep state can be output.
[0063] The sleep detection model can specifically adopt the YOLOv5 classification model. Of course, other deep learning models can also be adopted, which is not limited here.
[0064] The sleep detection method provided by this application uses a thermal infrared camera to obtain sequential thermal infrared image data, extracts the target head region and the unoccluded body region of the target from the extracted current frame infrared image; by calculating the unoccluded body ratio, setting the first threshold and the second threshold, the situation of kicking the quilt is quickly screened, improving the real-time performance. Only in the critical range, that is, between the second threshold and the first threshold, the deep learning model is called for further accurate determination, improving the judgment efficiency and at the same time enhancing the judgment accuracy. This application can also work normally in low-light or no-light environments at night, making up for the defects of the ordinary RGB camera detection method, avoiding misjudgment caused by indoor light changes, and improving the stability of detection.
[0065] This application can also detect whether the target has the situation of covering the head. For example Figure 2 shown, in a specific implementation, after extracting the target head region from the current frame infrared image, this process specifically includes:
[0066] S201: For a series of consecutive thermal infrared images, perform head trajectory tracking on the extracted target head region.
[0067] Among them, the head trajectory tracking is performed on the extracted target head region based on the Kalman filter algorithm.
[0068] S202: If the head trajectory disappears and does not cross the boundary of the thermal infrared image, it is determined that there is a situation of covering the head.
[0069] Through the analysis of a sequence of thermal infrared images, combined with the Kalman filter and trajectory tracking algorithms, stable tracking of the target's head trajectory is achieved. When the head trajectory disappears without leaving the frame boundary, a situation of covering the head is determined.
[0070] In another specific implementation, after extracting the target head region from the current frame infrared image, the process specifically includes: inputting the current frame infrared image into a pre-trained sleep detection model, and outputting a detection result of whether there is a situation of covering the head.
[0071] This application can achieve trajectory tracking of the head region. If the head trajectory does not pass through the frame edge and disappears, or the model outputs a result of covering the head, it is determined that there is a situation of covering the head.
[0072] Specifically, as Figure 3 shown, the training process of the sleep detection model can include:
[0073] S301: Collect thermal infrared images of the target's sleep state in different scenarios to construct a thermal infrared image dataset.
[0074] The data sources can include: using a thermal infrared camera to record the infrared image data of the target; it is also possible to check whether there is a similar thermal imaging dataset in the public dataset. In addition, partial data can be generated by a thermal infrared simulator to expand the training set.
[0075] S302: Manually annotate each of the thermal infrared images with the corresponding sleep state category, and the sleep state category includes no one, normal sleep (without abnormal conditions), presence of kicking the quilt (a large area of the target's body is exposed), and presence of covering the head (the target's head is blocked).
[0076] S303: Use the thermal infrared image dataset to train the YOLOv5 classification model to generate a sleep detection model.
[0077] Use a training set of thermal infrared image data with known labels to train through a deep learning model to achieve classification of the target's sleep state, and the target's sleep state can be divided into normal sleep, presence of kicking the quilt, and presence of covering the head.
[0078] Collect thermal infrared image data of the target's different sleep states for a certain period of time under different environmental conditions, including but not limited to different room temperatures, different quilt thicknesses, and different lighting conditions. Manually annotate the collected thermal infrared image data, and the annotation labels can be: normal sleep, presence of kicking the quilt, presence of covering the head, no one.
[0079] After collecting and obtaining the dataset, the training set and the test set are divided according to the ratio of 8:2. The deep learning module can adopt the YOLOv5 classification model or Vision Transformer (ViT), which can improve the detection accuracy. Optionally, the present application can also use methods of data augmentation including flipping, rotating 90° / 180°, adding Gaussian noise, etc. to improve the robustness and accuracy of the model and prevent environmental temperature interference.
[0080] As a specific implementation manner, the first temperature threshold can be determined by using an adaptive threshold algorithm. By obtaining the current environmental temperature data; calculating the adjusted first temperature threshold based on the current environmental temperature data and historical data. Automatically adjusting the threshold according to historical data improves the detection stability.
[0081] The present application also provides a sleep detection device, such as Figure 4 As shown in the structural block diagram of the sleep detection device provided by the present application, the device specifically includes a memory 41 and a processor 42. The memory 41 stores a computer program, and when the computer program is executed by the processor 42, it implements the sleep detection method according to any one of the above.
[0082] The present application also provides a sleep detection device, such as Figure 5 As shown in the structural block diagram of the sleep detection device provided by the present application, the device specifically includes: a sensor device 51, an alarm device 53, and the sleep detection device 52 according to the above.
[0083] Among them, the sensor device 51 is configured to collect the sequential thermal infrared image data of the target and transmit the sequential thermal infrared image data to the sleep detection device 52. The sensor device is a thermal infrared camera for environmental perception, including environmental heat maps, environmental temperature, and body surface temperature data.
[0084] The sleep detection device 52 is used to detect and judge whether the target kicks the quilt or covers the head by using the data collected by the sensor device, and outputs the detection result of whether the target kicks the quilt.
[0085] The alarm device 53 is configured to receive the detection result output by the sleep detection device 52 and generate an alarm prompt. For example, once it is determined that there is a situation of kicking the quilt and / or covering the head, a text message is automatically sent to the emergency contact for alarm.
[0086] Among them, the embodiments of the present application can also adopt an intelligent multi-level alarm strategy, and dynamically adjust the alarm level according to the sleep state, risk level, and time persistence of the target. For example, in the case of a low-level alarm, LED flashing or a buzzer beeping can be used for alarm; in the case of a medium-level alarm, a text message alarm can be used for prompting; when a high-level alarm is detected, a phone call alarm can be directly made. In addition, an intelligent camera can be connected. When the target has the situation of kicking the quilt and / or covering the head, the camera is automatically turned on, and parents can remotely view the monitoring screen.
[0087] Specifically, the following key factors can be used to determine whether to trigger a low-level, medium-level, or high-level alarm:
[0088] Risk level: In the case of a short-term quilt kicking or slight movement, it corresponds to a low-level risk; in the case of the quilt covering the head but not disappearing within a short period of time (e.g., 10 - 30 seconds), it corresponds to a medium-level risk; in the case of the head completely disappearing or being covered for a long time (e.g., more than 30 seconds), it corresponds to a high-level risk. If the parent does not respond within the predetermined response time, such as not checking the message or the camera, the corresponding alarm level is upgraded.
[0089] It can be understood that the sleep detection device provided by the present application operates entirely at the edge, that is, without cloud computing, and all computing tasks are completed on the local device. This can reduce data transmission delay and achieve real-time monitoring. At the same time, it can also avoid uploading the target image data to the cloud, thereby protecting privacy.
[0090] In addition, the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, it implements any of the above sleep detection methods.
[0091] Computer-readable storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information accessible by a computing device. As defined herein, computer-readable media do not include transitory computer-readable media, such as modulated data signals and carrier waves.
[0092] Those skilled in the art should further realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described according to functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of this application.
[0093] The steps of the methods or algorithms described in combination with the embodiments disclosed herein can be implemented by hardware, software modules executed by a processor, or a combination of both. The software modules can be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium well-known in the technical field.
[0094] The specific embodiments described above further elaborate on the purpose, technical solution, and beneficial effects of this application. It should be understood that the above description is only the specific embodiments of this application and is not used to limit the protection scope of this application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of this application should be included in the protection scope of this application.
Claims
1. A sleep detection method, characterized in that: include: Acquire time-series thermal infrared image data of the target; Extracting a current frame infrared image from the time-series thermal infrared image data, and segmenting the current frame infrared image into a high temperature area and a low temperature area based on a comparison between the current frame infrared image and a first temperature threshold; Extracting the target head area and the target unobstructed body area from the current frame infrared image; Calculating an unobstructed body proportion based on the target head region and the target unobstructed body region; When the unobstructed body proportion is greater than a first threshold, it is determined that the target is in a state of stepping on the quilt; when the unobstructed body proportion is less than a second threshold, it is determined that the target is not in a state of stepping on the quilt; when the unobstructed body proportion is between the second threshold and the first threshold, the current frame infrared image is input into a pre-trained sleep detection model, and a detection result of whether the target is in a state of stepping on the quilt is output; The sleep detection model is obtained by training with a training set of thermal infrared image data with known labels.
2. The sleep detection method according to claim 1, characterized in that: Extracting the target head area from the current frame infrared image includes: Using Hough circle transform to detect circular targets from the high temperature area; If multiple circular targets are detected, the temperature average of each circular target is calculated, and the circle with the highest temperature is determined as the target head area.
3. The sleep detection method according to claim 2, characterized in that: Extracting the unobstructed body area of the target from the current frame infrared image includes: After the target head region is determined, a region connected to the target head region and having a temperature greater than a second temperature threshold is extracted using a connected domain method to determine an unobstructed body region of the target.
4. The sleep detection method according to any one of claims 1 to 3, characterized in that: After extracting the target head area from the current frame infrared image, the method further includes: For multiple frames of continuous thermal infrared images, the head trajectory of the extracted target head area is tracked; If the head track disappears and does not cross the boundary of the thermal infrared image, it is determined that the head is covered.
5. The sleep detection method according to claim 4, characterized in that: Tracking the head trajectory of the extracted target head area includes: The head trajectory of the extracted target head area is tracked based on the Kalman filter algorithm.
6. The sleep detection method according to any one of claims 1 to 3, characterized in that: After extracting the target head area from the current frame infrared image, the method further includes: The current frame infrared image is input into a pre-trained sleep detection model, and a detection result of whether the head is covered is output.
7. The sleep detection method according to claim 6, characterized in that: The training process of the sleep detection model includes: collecting thermal infrared images of the target's sleep state in different scenes to construct a thermal infrared image dataset; Manually annotating each thermal infrared image with a corresponding sleep state category, wherein the sleep state categories include no one, normal sleep, kicking the quilt, and covering the head; The thermal infrared image dataset is used to train the YOLOv5 classification model.
8. The sleep detection method according to any one of claims 1 to 3, characterized in that: The first temperature threshold is determined by an adaptive threshold algorithm: Get current ambient temperature data; An adjusted first temperature threshold is calculated based on the current ambient temperature data and the historical data.
9. A sleep detection device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the sleep detection method according to any one of claims 1 to 8 is implemented.
10. A sleep detection device, characterized in that: include: A sensor device, an alarm device, and a sleep detection device according to claim 9; Wherein, the sensor device is configured to collect time-series thermal infrared image data of the target and transmit the time-series thermal infrared image data to the sleep detection device; The sleep detection device is configured to output a detection result of whether the target is kicking the quilt based on the time-series thermal infrared image data; The alarm device is configured to receive the detection result output by the sleep detection device and generate an alarm prompt.