Lying-sleeping bench behavior identification method and device and electronic equipment
By acquiring and labeling the target boxes in the video stream, and using the improved YOLOv5 detection model, combining the wavelet convolution layer and attention mechanism module, we can identify lying sleeping behavior on the park bench, and solve the problem of inaccurate identification in the prior art, and improve the accuracy and efficiency of identification.
Patent Information
- Application Number
- CN202411862613.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-03-28
AI Technical Summary
The prior art lacks in-depth analysis of scenes, objects and actions details when identifying uncivilized behaviors of lying on park benches, resulting in inaccurate identification.
By obtaining a continuous multi-frame video stream, labeling the human body, bench and head target frames, and using the improved YOLOv5 detection model, combining the wavelet convolution layer and attention mechanism module, multi-scale spatiotemporal features are extracted to identify lying sleep behavior.
The accuracy of identification of lying sleeping behavior of park benches is improved, and through the extraction and analysis of detailed features, the close correlation between character characteristics and scenes is established, and misjudgment and false reminders are reduced.
Smart Images

Figure CN119723422A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer vision and artificial intelligence, and in particular to a method, device and electronic equipment for recognizing behavior on a reclining couch. Background Art
[0002] In city parks, benches are important facilities for citizens to rest. However, with the arrival of summer, some people sleep on benches for a long time, which affects the normal use of other people and may also cause safety and management problems. In existing technologies, manual patrols and traditional monitoring systems cannot effectively and in real time identify and respond to such behaviors.
[0003] Chinese patent CN117392752A proposes a method of building an action recognition model based on the SlowFast network to obtain multi-scale spatiotemporal features with a hierarchical structure. A non-uniform sampling method is proposed in the video frame acquisition stage to effectively improve the network's attention to the detailed change characteristics of similar behaviors, and embed the proposed cascade pooling three-dimensional space pyramid feature enhancement module that integrates shallow features behind the feature extraction network to enhance the applicability of features at different scales, effectively reduce the loss of action detail information in the feature extraction process and reduce the interference of background information, so as to achieve the effect of feature enhancement; a human position border detection model is built based on the one-stage lightweight target detection network YoloX, key frames are extracted to realize personnel detection, and the ROI extraction method is used to obtain the spatiotemporal features of the corresponding area of the human body and perform action classification to determine whether there is uncivilized behavior in the video. Experiments have proved that this method can effectively improve the spatiotemporal action detection effect.
[0004] Although the method proposed by Chinese patent CN117392752A has made significant progress in the field of action recognition, and can effectively capture multi-scale spatiotemporal features, and enhance features through cascade pooling three-dimensional space pyramid feature enhancement modules, thereby improving the effect of spatiotemporal action detection to a certain extent, it still faces some challenges. Specifically, although this method can identify the action of "lying down", in actual application scenarios, simply identifying "lying down" is not enough to accurately judge uncivilized behavior in certain specific situations, such as sleeping on a park bench. The recognition of this behavior requires a deeper understanding and analysis, including comprehensive consideration of scenes, objects, and action details. Summary of the invention
[0005] In view of this, it is necessary to provide a method, device and electronic device for identifying the behavior of lying on a bench to solve the technical problem that the existing technology does not conduct in-depth analysis of the recognition of action behavior by image recognition technology and does not consider the scene and object, resulting in the inability to accurately identify the uncivilized behavior of lying on a bench in the park.
[0006] In order to solve the above problems, the present invention provides a method for recognizing a sleeping bench behavior, comprising: Acquire a continuous multi-frame video stream, and annotate a human target frame, a bench target frame, and a head target frame of each frame image in the multi-frame video stream; Determining a human behavior category according to the human target frame; According to the human behavior category of each frame image in the multi-frame video stream and the positional relationship between the head target frame and the bench target frame, it is determined whether the human body is lying down and sleeping.
[0007] In a possible implementation, the step of acquiring a continuous multi-frame video stream and marking a human target frame, a bench target frame, and a head target frame of each frame image in the multi-frame video stream includes: Get continuous multi-frame video stream data; The continuous multi-frame video stream data is input into the improved YOLOv5 detection model to obtain the human target frame, bench target frame and head target frame of each frame image; wherein the improved YOLOv5 detection model includes a wavelet convolution layer and an attention mechanism module.
[0008] In a possible implementation, the continuous multi-frame video stream data is input into the improved YOLOv5 detection model to obtain the human target frame, bench target frame and head target frame of each frame image, including: Obtain multiple frames of target images based on continuous multi-frame video stream data, crop each frame of the image, and construct a multi-scale image dataset; Inputting the multi-scale image data set into a wavelet convolution layer for feature extraction to obtain an enhanced feature map; The enhanced feature map is input into the attention mechanism module to obtain the human body target frame, the bench target frame and the head target frame.
[0009] In a possible implementation, the step of inputting the enhanced feature map into an attention mechanism module to obtain a human target frame, a bench target frame, and a head target frame includes: Dividing the enhanced feature map into a plurality of local window features, and any two adjacent local windows are arranged in an overlapping manner; Perform pooling operation on each local window feature to extract local features; Performing feature transformation on the local features to generate attention weights; According to the attention weights and enhanced feature maps, the human target box, bench target box and head target box are obtained.
[0010] In a possible implementation, determining the human behavior category according to the human target frame includes: Identify the same person in multiple consecutive frames and mark the same person with a unique identification ID; Based on the machine learning behavior classification model, the human behavior category in each frame of the image is obtained, where the human behavior categories include sitting, standing, walking, running and lying; According to the human behavior category and unique identification ID in each frame image, the continuous behavior category results of the same human body are determined.
[0011] In a possible implementation, determining whether a human body is lying down and sleeping according to the human body behavior category of each frame image in the multi-frame video stream and the positional relationship between the human head target frame and the bench target frame includes: If the result of the continuous behavior category of the human body is lying, the position of the human head target frame and the coordinate relationship between the position of the human body and the position of the bench are determined; If the position of the human head target frame coincides with the edge of the bench, and the degree of coincidence between the human body and the bench coordinates exceeds a threshold, it is determined that the human body is lying down and sleeping.
[0012] In a possible implementation, when the degree of coincidence between the position coordinates of the human body and the position coordinates of the bench exceeds a threshold, it is determined that the human body is in a lying down behavior, including: The threshold is determined based on the overlapping area between the human body and the bench.
[0013] In a second aspect, the present invention further provides a device for recognizing a sleeping bench behavior, comprising: An acquisition module, used for acquiring a continuous multi-frame video stream, and marking a human body target frame, a bench target frame and a head target frame of each frame image in the multi-frame video stream; A category definition module, used to determine the human behavior category according to the human target frame; The behavior recognition module is used to determine whether the human body is lying down and sleeping according to the human body behavior category of each frame image in the multi-frame video stream and the positional relationship between the head target frame and the bench target frame.
[0014] In a third aspect, the present invention further provides an electronic device, comprising: a processor and a memory; The memory stores a computer-readable program executable by the processor; When the processor executes the computer-readable program, the steps in the above-mentioned method for reclining on a sleeping couch are implemented.
[0015] In a fourth aspect, the present invention further provides a computer-readable storage medium storing one or more programs, wherein the one or more programs can be executed by one or more processors to implement the steps in the method for reclining couch behavior as described above.
[0016] The beneficial effects of the present invention are as follows: firstly, a continuous multi-frame video stream is obtained, and the human body target frame, bench target frame and head target frame of each frame image in the multi-frame video stream are marked; by autonomously controlling the number of recognition frames according to the alarm requirements, the accuracy and efficiency of recognition can be improved, and by obtaining a variety of detailed information about human body morphology, and determining the human behavior category according to the human body target frame; the recognition accuracy of human behavior is improved, and finally, according to the human behavior category of each frame image in the multi-frame video stream, and the positional relationship between the head target frame and the bench target frame, it is determined whether the human body has a lying down behavior. Thus, the purpose of extracting and analyzing the detailed features, establishing a close correlation between the human features and the scene, and improving the accuracy of recognizing the lying down behavior on the park bench is achieved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A method flow chart of an embodiment of a method for recognizing lying-sleeping bench behavior provided by the present invention; Figure 2 A schematic diagram of the structure of the wavelet convolution layer in the method for recognizing the behavior of lying on a sleeping bench provided by the present invention; Figure 3 A schematic flow chart of an embodiment of step S102 in the method for recognizing lying-sleeping bench behavior provided by the present invention; Figure 4 is a schematic diagram of an embodiment of a device for recognizing behavior of lying down on a sleeping bench provided by the present invention; Figure 5 It is a schematic diagram of the operating environment of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0018] The preferred embodiments of the present invention are described in detail below in conjunction with the accompanying drawings, wherein the accompanying drawings constitute a part of this application and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not used to limit the scope of the present invention.
[0019] A specific embodiment of the present invention discloses a method for recognizing lying down on a couch, see Figure 1 ,include: S101, obtaining a continuous multi-frame video stream, and marking a human body target frame, a bench target frame, and a head target frame of each frame image in the multi-frame video stream; S102, determining a human behavior category according to the human target frame; S103, determining whether the human body is lying down and sleeping according to the human body behavior category of each frame image in the multi-frame video stream and the positional relationship between the head target frame and the bench target frame.
[0020] In this embodiment, a continuous multi-frame video stream is first obtained, and the human target frame, bench target frame and head target frame of each frame image in the multi-frame video stream are marked; by autonomously controlling the number of recognition frames according to the alarm requirements, the accuracy and efficiency of recognition can be improved, and by obtaining a variety of detailed information about human body morphology, and determining the human behavior category according to the human target frame; the recognition accuracy of human behavior is improved, and finally, according to the human behavior category of each frame image in the multi-frame video stream, and the positional relationship between the head target frame and the bench target frame, it is determined whether the human body has lying down behavior. The present invention extracts and analyzes detailed features, establishes a close correlation between human features and scenes, and improves the accuracy of recognizing lying down behavior on park benches.
[0021] It should be noted that by setting up cameras at reasonable locations in the park, video streams are obtained by shooting with the cameras. Image data can also be obtained in other ways, in which the image data must be kept as images for a continuous period of time. In this embodiment, a continuous multi-frame video stream is collected by a camera. The number of frames of the video stream can be set according to the early warning requirements. If it is necessary to stop and remind the behavior of lying down for more than 20 minutes, the number of image frames collected and analyzed once for 20 consecutive minutes is set. By autonomously controlling the number of video frames, false alarms and false reminders of a human body lying down for one or two minutes can be avoided.
[0022] Furthermore, the human target frame indicates the position of the human body in the image, the bench target frame indicates the position of the bench in the image, and the head target frame indicates the position of the head in the image. By marking the human body and the environment benches, a close correlation between the character features and the scene is established, thereby improving the accuracy of identifying the behavior of lying down on park benches.
[0023] In some embodiments, the step of acquiring a continuous multi-frame video stream and marking a human target frame, a bench target frame, and a head target frame of each frame image in the multi-frame video stream includes: Get continuous multi-frame video stream data; The continuous multi-frame video stream data is input into the improved YOLOv5 detection model to obtain the human target frame, bench target frame and head target frame of each frame image; wherein the improved YOLOv5 detection model includes a wavelet convolution layer and an attention mechanism module.
[0024] In order to overcome the problem that the input of the traditional yolov5+stgcn detection model is the detected human key point coordinates, when there is a lot of human body data and the key points are stacked, it is very difficult to confirm the relationship between the key points and the human body, and the input is the key point coordinates, lacking the background information of the target, thus affecting the judgment of the final result. In this embodiment, taking the yolov5 model as a benchmark, the wavelet convolution layer WTConv is used to replace the original CNN layer of yolov5 as feature extraction, which can effectively increase the receptive field and improve the detection ability of small targets such as human heads. And add an attention mechanism module to the yolov5 detection model, and improve the specific attention module. The original attention implementation is to operate directly in the global range, resulting in high computational complexity and a large amount of memory usage. To solve these problems, the attention mechanism model is improved, and the local window method is used to sparse features, thereby achieving the purpose of reducing the amount of calculation.
[0025] Specifically, we first collect data on sleeping benches in public parks, mainly monitoring scenes. The data that need to be labeled include human mask, head mask, bench mask, human ID, and human behavior category. The collected data is divided into training set, validation set, and test set according to a certain ratio. In order to improve the detection effect of the model, multi-scale image data is used in the training process, and the image size is randomly cropped during the training process. The specific implementation method of the wavelet convolution layer is: use cascaded wavelet decomposition and then perform a set of small kernel convolutions, such as Figure 2 shown.
[0026] The specific formula of WTConv is
[0027] X is the input and W is the weight of a k×k depth convolution kernel.
[0028] The original attention mechanism (such as SENet, CBAM, etc.) usually operates globally, capturing global features through global average pooling (GAP) or global maximum pooling (GMP), and then generating attention weights through a fully connected layer (FC) or a convolutional layer. Although this global operation is effective, it has high computational complexity and memory usage. Furthermore, in order to reduce computational complexity and memory usage, this embodiment uses a local window approach to transform the attention mechanism. The specific steps are as follows: The feature map is divided into multiple local windows, each of which has a size of w. In order to capture more context information, overlapping local windows can be used. For example, the step size of the window can be set to w / 2.
[0029] A local pooling operation is performed within each local window, and local average pooling or local maximum pooling can be used.
[0030] The local pooled features are then transformed through a convolutional layer or a fully connected layer to generate attention weights. A 1x1 convolutional layer can be used to reduce the number of channels, and the pooled features are flattened and then transformed through a fully connected layer.
[0031] The generated attention weights are multiplied element-by-element with the original feature map to achieve weighted feature map.
[0032] Furthermore, in this embodiment, YOLOv5 uses the Focus structure as the input layer, which halves the size of the input image and doubles its number of channels, which helps maintain high-resolution details. The backbone network is based on CSPDarknet53, an efficient feature extraction network that uses the structure of Cross Stage Partial Networks (CSPNet) to reduce computational complexity and memory consumption while maintaining high accuracy. Convolution-BatchNorm-LeakyReLU is used to construct the basic convolution unit in the network. The Cross Stage Partial Network structure is used to improve the information flow and gradient flow of the network and reduce computing resource consumption. Spatial Pyramid Pooling is used to capture features of different scales and enhance the model's ability to detect targets of different sizes.
[0033] The core idea of the SELayer module is to capture the inter-channel dependencies through global average pooling, and then weight the features of each channel through the fully connected layer. Therefore, in this embodiment, the attention mechanism is added to the Bottleneck of the C3 module of the CSPDarknet53 backbone network.
[0034] It should be noted that the loss function in this embodiment includes classification loss, positioning loss and confidence loss. Classification loss cls_loss: calculates whether the anchor box and the corresponding calibration classification are correct; Positioning loss box_loss: the error between the predicted box and the calibrated box (GIoU); Confidence loss obj_loss: calculates the confidence of the network; The total loss function of the detection model is determined by the sum of the three loss functions.
[0035] Data balance: In order to balance the sample distribution of various targets as much as possible, a category-weighted approach is adopted, that is, data with fewer categories are given higher weights.
[0036] Loss function: Focal Loss is used to deal with the imbalance of positive and negative samples.
[0037] The formula is defined as follows:
[0038] is the model’s predicted probability for the target class.
[0039] is a balancing factor used to adjust the impact between positive and negative samples.
[0040] γ is the focus factor, which is used to adjust the weight of difficult and easy samples. NMS improvement: In crowded scenes, target frames are highly overlapped. The traditional NMS non-maximum suppression processing method is to retain only the frames closest to the annotation when multiple predictions of an object are greater than a certain confidence level. This results in only one detection frame being output for two or even more people when the targets are highly overlapped. The detection frame is crucial for subsequent target tracking and behavior classification models. In view of this situation, NMS is improved. When doing NMS, both IOU and score are considered. That is, if there are two target frames with relatively high scores, after the frame with the higher score is selected after NMS, the other frame lowers its score and participates in the subsequent target frame matching.
[0041] Learning rate: Use the cosine annealing strategy to adjust the learning rate by dynamically adjusting the learning rate, so that the learning rate can be gradually reduced from the initial value to a minimum value according to the periodicity of the cosine function. This method can help the model learn quickly in the early stage of training, and gradually slow down the learning rate in the later stage, which helps the model converge better at the end of training.
[0042] After the model converges, the training is completed and the ability to detect the target box is obtained.
[0043] In some embodiments, the human behavior category is determined according to the human target frame. Figure 3 ,include: S301, identifying the same human body in multiple consecutive frames of images, and marking a unique identification ID for the same human body; S302, obtaining a human behavior category in each frame of the image based on a machine learning behavior classification model, where the human behavior categories include sitting, standing, walking, running, and lying; S303: Determine the continuous behavior category results of the same human body according to the human body behavior category and the unique identification ID in each frame image.
[0044] In this embodiment, by designing a unique identification ID, the purpose of continuously monitoring the same human body can be achieved, and the continuous monitoring of the same human body can be accurate. By continuously monitoring the behavior of the same human body over a period of time, it can be determined whether there is lying down behavior, thereby reducing the occurrence of misjudgments and false alerts caused by instantaneous judgments.
[0045] It should be noted that the human behavior categories include sitting, standing, walking, running, lying down and others.
[0046] In some embodiments, determining whether the human body is lying down and sleeping according to the human body behavior category of each frame image in the multi-frame video stream and the positional relationship between the human head target frame and the bench target frame includes: If the result of the continuous behavior category of the human body is lying, the position of the target frame of the human head and the coordinate relationship between the position of the human body and the position of the bench are determined; If the position of the human head target frame coincides with the edge of the bench, and the degree of coincidence between the human body and the position coordinates of the bench exceeds a threshold, it is determined whether the human body is lying down and sleeping.
[0047] In this embodiment, an improved YOLOV5 model is used to obtain the precise position of the human body, the position of the bench and the position of the human head, so as to determine whether the person is lying down and sleeping by judging the positional relationship between the human head and the bench, the human behavior category and the positional relationship between the human body and the bench.
[0048] It should be noted that when performing human behavior recognition, the human body small image target box is first resized to a size of 256*256, and the data is divided into training set, validation set, and test set according to a certain ratio. The categories are classified into six categories: sitting, standing, walking, running, lying, and others.
[0049] Architecture construction: vison_transformer_base model; Initialization parameters: The weights and biases of the model need to be initialized, and the weights of the pre-trained model are usually used for transfer learning; Batch generation: Split the dataset into batches, each batch contains 256 images; Forward propagation: Input the human body image into the model to extract features layer by layer; Loss calculation: Calculate the gap between the model output and the actual label, usually using the cross entropy loss function; Back propagation: Update the model weights according to the gradient of the loss function; Optimizer update: Use optimization algorithm (SGD) to update model parameters to minimize the loss function; train for 100 epochs, 8 A10 graphics cards; Verification and testing: Regularly evaluate model performance on the validation set, adjust model parameters or stop training (early stopping method) based on the validation results. Finally, evaluate the generalization ability of the model on the test set to ensure that the model not only performs well on the training data, but also works well on unseen data.
[0050] Model tuning: Based on the validation and testing results, it may be necessary to adjust the model structure, hyperparameters, or training strategies to further improve model performance.
[0051] This enables the training of a human behavior category recognition model, and the recognition of human behavior based on the well-trained human behavior category model. Based on the accurate recognition of human behavior, it is determined whether a scene of lying on a park bench occurs.
[0052] Based on the above-mentioned reclining and sleeping bench behavior recognition method, the embodiment of the present invention also provides a reclining and sleeping bench behavior recognition device, see Figure 4 ,include: An acquisition module 410 is used to acquire a continuous multi-frame video stream and mark a human target frame, a bench target frame and a head target frame of each frame image in the multi-frame video stream; A category definition module 420, used to determine a human behavior category according to the human target frame; The behavior recognition module 430 is used to determine whether the human body is lying down and sleeping according to the human body behavior category of each frame image in the multi-frame video stream and the position relationship between the head target frame and the bench target frame.
[0053] like Figure 5 As shown, based on the above-mentioned reclining couch behavior recognition method, the present invention also provides an electronic device, which can be a computing electronic device such as a mobile terminal, a desktop computer, a notebook, a PDA, and a server. The electronic device includes a processor 510, a memory 520, and a display 530. Figure 5 Only some components of the electronic device are shown, but it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0054] In some embodiments, the memory 520 may be an internal storage unit of the electronic device, such as a hard disk or memory of the electronic device. In other embodiments, the memory 520 may also be an external storage electronic device of the electronic device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 520 may also include both an internal storage unit of the electronic device and an external storage electronic device. The memory 520 is used to store application software and various types of data installed in the electronic device, such as program codes for installing the electronic device. The memory 520 may also be used to temporarily store data that has been output or is to be output. In one embodiment, a reclining couch behavior recognition program 540 is stored on the memory 520, and the reclining couch behavior recognition program 540 can be executed by the processor 510, thereby realizing the reclining couch behavior recognition method of each embodiment of the present application.
[0055] In some embodiments, the processor 510 may be a central processing unit (CPU), a microprocessor or other data processing chip, and is used to run program codes or process data stored in the memory 520, such as executing a reclining couch behavior recognition method.
[0056] In some embodiments, the display 530 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, etc. The display 530 is used to display information of the behavior recognition electronic device of the reclining couch and to display a visual user interface. The components 510-530 of the electronic device communicate with each other via a system bus.
[0057] Those skilled in the art will appreciate that all or part of the processes of the above-mentioned embodiments can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium, wherein the computer-readable storage medium is a disk, an optical disk, a read-only storage memory, or a random access memory, etc.
[0058] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.
Claims
1. A method for recognizing a sleeping bench behavior, characterized in that: include: Acquire a continuous multi-frame video stream, and annotate a human target frame, a bench target frame, and a head target frame of each frame image in the multi-frame video stream; Determining a human behavior category according to the human target frame; According to the human behavior category of each frame image in the multi-frame video stream and the positional relationship between the head target frame and the bench target frame, it is determined whether the human body is lying down and sleeping.
2. The method for reclining sleeping bench behavior according to claim 1, characterized in that: The step of acquiring a continuous multi-frame video stream and marking a human target frame, a bench target frame, and a head target frame of each frame image in the multi-frame video stream includes: Get continuous multi-frame video stream data; The continuous multi-frame video stream data is input into the improved YOLOv5 detection model to obtain the human target frame, bench target frame and head target frame of each frame image; wherein the improved YOLOv5 detection model includes a wavelet convolution layer and an attention mechanism module.
3. The method for recognizing a sleeping bench behavior according to claim 2, characterized in that: The continuous multi-frame video stream data is input into the improved YOLOv5 detection model to obtain the human target frame, bench target frame and head target frame of each frame image, including: Obtain multiple frames of target images based on continuous multi-frame video stream data, crop each frame of the image, and construct a multi-scale image dataset; Inputting the multi-scale image data set into a wavelet convolution layer for feature extraction to obtain an enhanced feature map; The enhanced feature map is input into the attention mechanism module to obtain the human target frame, the bench target frame and the head target frame.
4. The method for recognizing a sleeping bench behavior according to claim 2, characterized in that: The enhanced feature map is input into the attention mechanism module to obtain a human target frame, a bench target frame and a head target frame, including: Dividing the enhanced feature map into a plurality of local window features, and any two adjacent local windows are arranged in an overlapping manner; Perform pooling operation on each local window feature to extract local features; Performing feature transformation on the local features to generate attention weights; According to the attention weights and enhanced feature maps, the human body target box, bench target box and head target box are obtained.
5. The method for recognizing a sleeping bench behavior according to claim 1, characterized in that: Determining the human behavior category according to the human target frame includes: Identify the same person in multiple consecutive frames and mark the same person with a unique identification ID; Based on the machine learning behavior classification model, the human behavior category in each frame of the image is obtained, where the human behavior categories include sitting, standing, walking, running and lying; According to the human behavior category and unique identification ID in each frame image, the continuous behavior category results of the same human body are determined.
6. The method for recognizing a sleeping bench behavior according to claim 5, characterized in that: The determining whether the human body is lying down and sleeping according to the human body behavior category of each frame image in the multi-frame video stream and the positional relationship between the human head target frame and the bench target frame includes: If the result of the continuous behavior category of the human body is lying, the position of the target frame of the human head and the coordinate relationship between the position of the human body and the position of the bench are determined; If the position of the human head target frame coincides with the edge of the bench, and the degree of coincidence between the human body and the position coordinates of the bench exceeds a threshold, it is determined that the human body is lying down and sleeping.
7. The method for recognizing a sleeping bench behavior according to claim 6, characterized in that: When the degree of coincidence between the position coordinates of the human body and the position coordinates of the bench exceeds a threshold, it is determined that the human body is lying down and sleeping, including: The threshold is determined based on the overlapping area between the human body and the bench.
8. A device for recognizing a sleeping bench behavior, characterized in that: include: An acquisition module, used for acquiring a continuous multi-frame video stream, and marking a human body target frame, a bench target frame and a head target frame of each frame image in the multi-frame video stream; A category definition module, used to determine the human behavior category according to the human target frame; The behavior recognition module is used to determine whether the human body is lying down and sleeping according to the human body behavior category of each frame image in the multi-frame video stream and the positional relationship between the head target frame and the bench target frame.
9. An electronic device, characterized in that: include: Processor and memory; The memory stores a computer-readable program executable by the processor; When the processor executes the computer-readable program, the steps in the method for reclining and sleeping couch behavior recognition according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps in the reclining couch behavior recognition method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Human skeleton behavior recognition method, system and equipment based on local-global feature extraction and fusion
CN117392752A