Having sufficient sleep time and highly quality sleep state is one of the necessary conditions for people to maintain a good mental state.However,in the face of increasing social pressure and heavy family and work tasks,people often resort to mobile phone entertainment and other means at night to release pressure,resulting in a significant reduction in effective sleep time.On the other hand,people tend to toss and turn in bed difficult to get a good sleep.In particular,for hospital patients,elderly people at home or nursing homes,patients with depression,child care and other special personnel,if they are tossing and turning at night can’t sleep,or even fall out of bed,it will cause more adverse effects on their health.Therefore,it is particularly important to provide them with sleep behavior detection to ensure sleep safety.However,the traditional sleep behavior detection methods still rely too much on equipment,and even need professional medical personnel to operate the special equipment.Besides the contact detection methods,the existing non-contact detection methods also have the problem of low detection accuracy.In addition,compared with traditional behavior recognition,the main difficulty of using video for sleep behavior detection lies in the fact that people’s bodies are covered(such as quilts)when they are sleeping,which increases the difficulty of sleep behavior identification and detection.In view of the above background and problems,this thesis studies the contactless sleep behavior detection method based on deep learning,which can use the night sleep video to realize the detection of five kinds of behaviors,including turning over,falling out of bed,getting up at night,playing mobile phone and normal sleep.The main research work of this thesis is as follows:1.In view of the lack of sleep behavior data set,we recruited campus volunteers to record sleep videos in normal state at night(from 12 p.m.to 8 a.m.)in the dormitory,and made our own Sleep Action(SA)dataset.The dataset contained 2,393 videos of five sleep behaviors(turning over,falling out of bed,getting up at night,playing with mobile phones,and sleeping normally).The construction of this dataset provides a foundation for the subsequent model analysis and performance verification.its performance is also superior to that of R(2+1)D network which is also pseudo 3D convolution.2.A sleep behavior detection model based on pseudo 3D convolution and attention mechanism is proposed.We use pseudo-3D convolution to extract spatiotemporal features,and propose three dual-channel structures considering the arrangement of spatial and temporal convolution filters and whether the corresponding arrangement directly affects the final output.In addition,the 3D Squeeze-Excitation block is constructed and applied to the spatial convolutional filter to build the DCS network model.The experimental results show that DCS network is superior to traditional 3D convolution and pseudo 3D convolution based R(2+1)D network in terms of model accuracy,prediction time and model size.The accuracy rate of DCS network on SA dataset reaches 90.89%,the network model size is 14.47MB,and the average prediction time is 0.89 seconds.3.A sleep behavior detection model based on Transformer and cyclic neural network is proposed.Inspired by Swin Transformer network,we propose an overlapping sliding window mechanism and construct the SWF-Transformer block which adopts series and parallel structures.Secondly,we have built a Transformer network structure and combined it with a gate recurrent unit(GRU)to form a network model of SWF-Transformer+GRU to extract temporal and spatial characteristics of videos.The experimental results show that although the parameter size of the network model reaches 40.77M,the accuracy of the model on the sleep action dataset can reach 93.52%. |