Human fall detection method, device, equipment and medium combined with depth measurement
Through real-time video streaming and pre-trained models in video surveillance scenarios, combined with depth analysis and depth difference calculation, low-cost and efficient human fall detection is achieved, solving the problems of high misjudgment rate and high cost in the existing technology.
Patent Information
- Application Number
- CN202311742651.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-15
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2043-12-15
AI Technical Summary
Existing human fall detection technology has a high probability of misjudgment and high cost. In particular, the use of depth sensors increases hardware costs, and the uncertainty of environmental conditions leads to noise and misjudgment.
Acquire multiple frames of real-time images through the real-time video stream in the video surveillance scenario. If the human target is not recognized and the perspective is not rotated, image segmentation is performed to obtain the ground area position information, and the image is input into the pre-trained human detection model to obtain the human body area position. Information, depth analysis is performed, the average depth sequence of the human body and the ground area is calculated, and fall detection is performed based on the depth difference sequence, which reduces the dependence on depth sensors and hardware costs.
It reduces the probability of misjudgment of human falls, reduces detection costs, improves the system's adaptability to dynamic environments and detection stability, and avoids complex depth image processing.
Smart Images

Figure CN117671799B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video surveillance technology, and in particular to a human fall detection method, device, equipment and storage medium combined with depth measurement. Background Art
[0002] The existing human fall detection technologies are: accelerometer and gyroscope sensors: The sensors installed on the body detect the acceleration and angular velocity changes of the body. When the body falls, the sensors will detect the sudden acceleration changes, thereby determining whether a fall has occurred. Pressure sensor: The pressure sensor installed on the ground or mattress detects the position change of the body. When the body suddenly touches the ground or mattress, the sensor will detect the sudden pressure change, thereby determining whether a fall has occurred. Sound detection technology: The microphone installed in the room captures the sound signal when the body lands, and analyzes it through a machine learning algorithm to determine whether a fall has occurred. Smart bracelet or watch: By installing sensors on the bracelet or watch, the body's movement and posture changes are monitored in real time, and a machine learning algorithm is used to analyze whether a fall has occurred. On the one hand, the above traditional methods are expensive due to the use of multiple sensors. On the other hand, the use of sensors alone can easily misjudge normal states such as lying down as a fall, and issue false alarms to interfere with the user's normal life and work.
[0003] The existing Chinese patent CN105279483A discloses a real-time detection method for fall behavior based on depth image, including: obtaining a depth image of an indoor scene through a depth sensor; comparing the depth images of the previous and next frames, and finding pixels with obvious depth changes according to the depth change degree value; obtaining pixels belonging to the human body according to the adjacent similarity principle; the pixels belonging to the human body form a connected area, which is the recognized human body image; extracting the eight-neighborhood differential features of each pixel in the human body image to obtain a multidimensional feature vector; obtaining the depth of the pixel according to the depth of the pixel and the offset position depth of the pixel. Degree differential feature: d(s) is the depth of the human body image at pixel s, v refers to the offset vector, which is the offset position depth of pixel s; according to the depth differential features of each pixel, a random forest classifier is used to parse the human body parts and determine the category to which each pixel belongs; the position coordinates of the joints of the head and torso are determined by the mean shift algorithm; the distance between the head joints and the ground in multiple consecutive frames is used to form a height feature vector; the training samples of the height features are used to train the fall classifier offline, and the trained fall classifier is used to classify and detect the height feature vector to obtain the fall detection result. However, in order to achieve the acquisition of depth images, the above patents need to use depth sensors, which will increase the hardware cost of the system. Depth sensors are usually relatively expensive, especially high-precision and high-resolution models; at the same time, due to the uncertainty of environmental conditions, such as lighting changes and occlusions, the depth images obtained by the depth sensor will have noise, resulting in false falls.
[0004] Therefore, how to reduce the probability of misjudgment of human falls and reduce the detection cost is an urgent problem to be solved. Summary of the invention
[0005] In view of this, the present invention provides a human fall detection method, device, equipment and storage medium combined with depth measurement, so as to solve the problems of high probability of misjudgment of falls and high cost of fall detection in the prior art.
[0006] The technical solution adopted by the present invention is:
[0007] In a first aspect, the present invention provides a human fall detection method combined with depth measurement, characterized in that the method comprises:
[0008] S1: Acquire a real-time video stream in a video surveillance scenario, and decompose the real-time video stream into multiple frames of real-time images;
[0009] S2: If no human target is identified in the current monitoring scene and the current monitoring view angle is not rotated, the real-time image is segmented to obtain the ground area position information;
[0010] S3: inputting each of the real-time images into a pre-trained human body detection model, and outputting human body region position information;
[0011] S4: performing depth analysis on the human body region position information and the ground region position information to obtain an average depth sequence of the ground region and an average depth sequence of the human body region corresponding to multiple frames of time-series images;
[0012] S5: Calculate the depth difference between the average depth sequence of the human body area and the average depth sequence of the ground area, and detect human falls based on the depth difference sequence.
[0013] Preferably, the S2 includes:
[0014] S21: If no human target is identified in the current monitoring scene and the current monitoring view angle is not rotated, filtering and color space conversion are performed on the real-time image to obtain a color space image, wherein the real-time image is a monocular image;
[0015] S22: extracting features from the color space image, fusing the extracted local features with the global features, and obtaining multi-scale features;
[0016] S23: Obtaining the probability of each pixel point being in the ground area according to the multi-scale features, and obtaining a probability map;
[0017] S24: Obtain a preset probability threshold, and convert the probability map into a binary segmentation map;
[0018] S25: Perform morphological processing on the binary segmentation map, and use the pixel point position information in the ground area as the ground area position information.
[0019] Preferably, the S4 includes:
[0020] S41: Obtain a training image with a deep label in a video surveillance scene, input the training image into a deep learning network, and obtain a training model;
[0021] S42: Inputting the real-time image into the training model for forward propagation to obtain depth values corresponding to all pixels in the real-time image;
[0022] S43: According to the human body region position information and the ground region position information, combined with the depth values corresponding to all pixels in the real-time image, a human body region depth value sequence and a ground region depth value sequence corresponding to multiple frames of time-series images are obtained;
[0023] S44: deriving the ground area average depth sequence and the human area average depth sequence according to the human area depth value sequence and the ground area depth value sequence.
[0024] Preferably, the S43 includes:
[0025] S431: outputting depth values corresponding to pixel points in the human body region to the human body region depth value sequence according to the human body region position information;
[0026] S432: Outputting depth values corresponding to pixel points in the ground area to the ground area depth value sequence according to the ground area position information.
[0027] Preferably, the S44 includes:
[0028] S441: acquiring a first pixel point sequence in the human body region and a second pixel point sequence in the ground region according to the human body region position information and the ground region position information;
[0029] S442: Obtaining a first sliding window and a second sliding window according to the first pixel point sequence and the second pixel point sequence;
[0030] S443: Obtaining a first filtered depth value sequence and a second filtered depth value sequence according to the first sliding window and the second sliding window;
[0031] S444: Perform sliding window processing on the human body area depth value sequence and the ground area depth value sequence according to the first filtered depth value sequence and the second filtered depth value sequence to obtain an average depth of the ground area and an average depth of the human body area.
[0032] Preferably, the S5 includes:
[0033] S51: Obtaining a preset depth difference threshold;
[0034] S52: Compare each depth difference in the depth difference sequence with the depth difference threshold in sequence to obtain a comparison result;
[0035] S53: When the comparison results corresponding to the continuous multiple frames of images all show that the depth difference is less than the depth difference threshold, the result of the human body falling is that the human body falls on the ground.
[0036] Preferably, the step S2 includes:
[0037] S201: Get the pre-trained human target detection model based on yolov6s architecture;
[0038] S202: Inputting the real-time image into the human target detection model to identify whether a human target appears in the current monitoring scene;
[0039] S203: Using the visual odometry calculation method, the camera rotation is monitored to identify whether the current monitoring angle of view is rotated.
[0040] In a second aspect, the present invention provides a human fall detection device combined with depth measurement, characterized in that the device comprises:
[0041] An image acquisition module is used to acquire a real-time video stream in a video surveillance scenario and decompose the real-time video stream into multiple frames of real-time images;
[0042] An image segmentation module is used to segment the real-time image to obtain ground area position information if no human target is identified in the current monitoring scene and the current monitoring angle of view is not rotated;
[0043] A human body detection module, used to input each of the real-time images into a pre-trained human body detection model and output human body region position information;
[0044] A depth analysis module, used to perform depth analysis on the human body region position information and the ground region position information, and obtain an average depth sequence of the ground region and an average depth sequence of the human body region corresponding to multiple frames of time-series images;
[0045] The fall detection module calculates the depth difference between the average depth sequence of the human body area and the average depth sequence of the ground area, and detects human falls based on the depth difference sequence.
[0046] 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.
[0047] 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.
[0048] In summary, the beneficial effects of the present invention are as follows:
[0049] The present invention provides a human fall detection method, device, equipment and storage medium combined with depth measurement. The method includes: obtaining a real-time video stream in a video surveillance scene, and decomposing the real-time video stream into multiple frames of real-time images; if no human target is identified in the current surveillance scene and the current surveillance angle of view is not rotated, performing image segmentation on the real-time image to obtain ground area position information; inputting each of the real-time images into a pre-trained human detection model, and outputting human area position information; performing depth analysis on the human area position information and the ground area position information, and obtaining a ground area average depth sequence and a human area average depth sequence corresponding to multiple frames of time-series images; performing depth difference calculation on the human area average depth sequence and the ground area average depth sequence, and detecting a human fall based on the depth difference sequence. The present invention relies on real-time video streams in video surveillance scenarios, which are obtained through common surveillance cameras without the introduction of additional depth sensors, thereby reducing hardware costs; pre-training of human body detection models means that there is no need to train the model from scratch, reducing development costs, and many pre-trained models have been trained on large-scale data for human body detection in general scenarios; the position information of the ground area is obtained through real-time image segmentation and implemented through common computer vision algorithms without the need for complex depth image processing, which helps to reduce costs; by analyzing the average depth sequence of the ground and human body areas corresponding to multiple frames of time-series images, the system's adaptability to dynamic environmental changes is increased, thereby reducing the probability of misjudgment; through depth difference calculation, the system can pay more attention to changes in relative depth rather than just absolute depth values, which helps to improve the stability of detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] 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.
[0051] Figure 1 It is a schematic diagram of the overall working process of the human fall detection method combined with depth measurement in Example 1 of the present invention;
[0052] Figure 2 Schematic diagram of the process of identifying a human target and camera rotation in Embodiment 1 of the present invention;
[0053] Figure 3 It is a schematic diagram of the process of performing image segmentation on the real-time image in Embodiment 1 of the present invention;
[0054] Figure 4 This is a schematic diagram of the process of performing in-depth analysis in Example 1 of the present invention;
[0055] Figure 5 This is a schematic diagram of a process for determining a depth value sequence in Embodiment 1 of the present invention;
[0056] Figure 6 It is a schematic diagram of a process for determining the average depth in Example 1 of the present invention;
[0057] Figure 7 A schematic diagram of a process for determining a human fall detection result in Embodiment 1 of the present invention;
[0058] Figure 8 is a structural block diagram of a human fall detection device combined with depth measurement in Embodiment 2 of the present invention;
[0059] Fig. 9 It is a schematic diagram of the structure of the electronic device in Embodiment 3 of the present invention. DETAILED DESCRIPTION
[0060] 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.
[0061] Example 1
[0062] See also Figure 1 Embodiment 1 of the present invention discloses a human fall detection method combined with depth measurement, the method comprising:
[0063] S1: Acquire a real-time video stream in a video surveillance scenario, and decompose the real-time video stream into multiple frames of real-time images;
[0064] Specifically, a real-time video stream captured by a tilted monocular camera in a video surveillance scene is obtained, and the obtained video stream is decoded and converted into an image sequence. This step is performed using common video codecs (such as H.264 and H.265); the decoded video stream is decomposed into multiple frames, each frame represents a moment of the video stream, and the image sequence is composed of these frames; a monocular camera refers to a camera with only one optical lens, through which image information of a plane view can be obtained. Commonly used monocular cameras include ordinary digital cameras, network cameras, industrial cameras, etc. On the one hand, when installing a monocular camera, if it is installed vertically, the field of view of the camera will be very limited. By installing it at an angle, its field of view can be expanded and the monitoring effect can be improved; on the other hand, when installing a monocular camera, if it is installed vertically, the camera will be easily discovered by people. Installing it at an angle can make the camera more concealed and improve safety.
[0065] In one embodiment, see Figure 2 , said S2 before includes:
[0066] S201: Get the pre-trained human target detection model based on yolov6s architecture;
[0067] S202: Inputting the real-time image into the human target detection model to identify whether a human target appears in the current monitoring scene;
[0068] S203: Using the visual odometry calculation method, the camera rotation is monitored to identify whether the current monitoring angle of view is rotated.
[0069] Specifically, a machine learning or deep learning algorithm, such as the yolov6s algorithm, is used to learn a large amount of labeled training data to establish a human detection model to detect whether there is a human body in the current video surveillance scene; the visual mileage calculation method is used to compare the posture changes between adjacent frames to determine whether the camera has rotated. When it is determined by the above method that no human body is detected in the current video surveillance scene and the camera stops rotating, it is considered that the preset start condition is met and the ground area in the image is segmented.
[0070] S2: If no human target is identified in the current monitoring scene and the current monitoring view angle is not rotated, the real-time image is segmented to obtain the ground area position information;
[0071] Specifically, a starting condition is pre-set, and the preset starting condition includes: no human body is detected in the current video surveillance scene and the camera stops rotating. Only when the preset starting condition is met, the ground area position information in the monocular image is segmented out. On the one hand, the interference of human body information in the surveillance scene on the segmented ground area is avoided; on the other hand, when the camera does not rotate, the surveillance scene does not change much, and a human fall will definitely cause a drastic change in the surveillance scene. Therefore, image segmentation is only performed when the camera stops rotating, avoiding unnecessary waste of work resources.
[0072] In one embodiment, see Figure 3 , said S2 comprises:
[0073] S21: If no human target is identified in the current monitoring scene and the current monitoring view angle is not rotated, filtering and color space conversion are performed on the real-time image to obtain a color space image, wherein the real-time image is a monocular image;
[0074] Specifically, a monocular image is obtained, which is a color image. The input color image is preprocessed. The noise that may exist in the image will affect the segmentation result, so Gaussian filtering is used to eliminate the noise in the image; the preprocessed color image is converted into HSV color space. The reason for choosing HSV color space is that HSV color space can decompose color information into three components: hue, saturation and brightness. The hue component corresponds to the human eye's perception of color, so it can more accurately distinguish elements of different colors, so as to better distinguish ground and non-ground elements.
[0075] S22: extracting features from the color space image, fusing the extracted local features with the global features, and obtaining multi-scale features;
[0076] Specifically, the converted color space image is segmented at multiple scales to obtain multiple sub-regions. For each sub-region, the LBP operator is used to extract local features. The LBP operator is an algorithm for texture feature extraction. It can compare the adjacent pixels around a pixel with the pixel to obtain a binary code to describe the texture features around the pixel. For the entire image, the pre-trained ResNet model is used to extract global features. The ResNet model is a deep convolutional neural network that can perform high-level feature extraction and classification on the image. Through the MLFN feature fusion network, the extracted local features and global features are fused to construct a multi-scale feature representation. Through the application of multi-scale segmentation and the LBP operator, sub-regions with local texture features can be extracted, which enhances the distinguishability of features. At the same time, the use of the ResNet model to extract global features can capture the contextual information of the entire image and improve the accuracy of classification. Finally, by fusing local features and global features, the expressiveness and classification performance of features can be further improved.
[0077] S23: Obtaining the probability of each pixel point being in the ground area according to the multi-scale features, and obtaining a probability map;
[0078] S24: Obtain a preset probability threshold, and convert the probability map into a binary segmentation map;
[0079] Specifically, the above local features and global features are spliced together to form a feature vector for each pixel. These feature vectors are used to train a classifier, which divides each pixel into two categories: ground elements and non-ground elements. After the training is completed, the classifier is used to classify each pixel to obtain a probability map. This probability map represents the probability that each pixel belongs to a ground element, and the value range is between 0 and 1. The Otsu method is used to determine a suitable probability threshold. The Otsu method is an adaptive threshold selection method based on histogram, which can automatically determine an optimal threshold to divide the image into two parts. The Otsu method regards the grayscale value of the image as a probability distribution, and determines an optimal grayscale threshold by minimizing the weighted sum of the intra-class variance and the inter-class variance. In our method, we regard the probability map as a grayscale image, determine an optimal probability threshold by the Otsu method, and convert the probability map into a binary segmentation map, which divides each pixel in the image into two categories: ground elements and non-ground elements. The probability map method can be used to calculate the probability value of a pixel belonging to a ground element based on its color and texture characteristics, thereby avoiding the problem of inaccurate segmentation caused by changes in pixel color and texture characteristics in traditional segmentation methods. At the same time, the Otsu method can be used to adaptively determine the probability threshold, making the segmentation result more accurate.
[0080] S25: Perform morphological processing on the binary segmentation map, and use the pixel point position information in the ground area as the ground area position information.
[0081] Specifically, morphological operations (opening, closing, etc.) are performed on the binary segmentation map. The opening operation eliminates small noises and small connections, thereby obtaining a more accurate segmentation result. The closing operation can fill the holes and cracks inside the object, making the object more complete and connected. Such operations can improve the accuracy of subsequent processing. The pixels of the ground area are saved in coordinate order to obtain the ground area position information P (p1, p2, p3..., Pn), where p1, p2, p3..., Pn represent the coordinate information corresponding to the first pixel point to the coordinate information corresponding to the nth pixel point in the camera coordinate system.
[0082] S3: inputting each of the real-time images into a pre-trained human body detection model, and outputting human body region position information;
[0083] S4: performing depth analysis on the human body region position information and the ground region position information to obtain an average depth sequence of the ground region and an average depth sequence of the human body region corresponding to multiple frames of time-series images;
[0084] Specifically, the position of the human body is detected through target detection algorithms such as yolov6s, and the pixel set of the human body area is obtained. Based on the pixel set of the human body area, the position information of the human body area is obtained. Combined with the above-mentioned ground area position information, we can convert the image captured by the monocular camera into a three-dimensional scene. Then, the average depth of the ground area and the average depth of the human body area are calculated; because a fallen human body usually has abnormal depth changes, such as a sudden decrease or increase in the distance between the human body and the ground, the average depth of the ground area and the average depth of the human body area are used to detect human falls, thereby reducing false detections and missed detections, and improving the accuracy and stability of human fall detection.
[0085] In one embodiment, see Figure 4 , said S4 comprises:
[0086] S41: Obtain a training image with a deep label in a video surveillance scene, input the training image into a deep learning network, and obtain a training model;
[0087] Specifically, first, it is necessary to obtain a training image with a depth label and input it into a deep learning network for training to obtain a model that can perform depth estimation on monocular images. During the training process, the deep learning network will learn the correspondence between the depth information in the input training image and the pixel value of the training image.
[0088] S42: Inputting the real-time image into the training model for forward propagation to obtain depth values corresponding to all pixels in the real-time image;
[0089] Specifically, after obtaining the trained model, the required monocular image is input into the model for forward propagation to obtain the depth value corresponding to each pixel in the input monocular image. These depth values provide more accurate data support for subsequent fall detection.
[0090] S43: acquiring a human region depth value sequence and a ground region depth value sequence corresponding to multiple frames of sequential images according to the human region position information and the ground region position information and in combination with depth values corresponding to all pixels in the real-time image;
[0091] In one embodiment, see Figure 5 , the S43 comprises:
[0092] S431: outputting depth values corresponding to pixel points in the human body region to the human body region depth value sequence according to the human body region position information;
[0093] Specifically, for the human body area, we can determine the coordinate position of each pixel in the human body area based on the segmentation results of the previous human body detection model, and then filter out the depth value belonging to the human body area from the depth values corresponding to all pixels in the above monocular image, and output it to the human body area depth value sequence.
[0094] S432: Outputting depth values corresponding to pixel points in the ground area to the ground area depth value sequence according to the ground area position information.
[0095] Specifically, the position information of the ground area is obtained, and a set of depth values corresponding to the pixels in the ground area is taken as the ground area depth value sequence D (d1, d2, d3, ..., dn), wherein d1, d2, d3, ..., dn represent the depth value corresponding to the first pixel to the nth pixel in the segmented ground area.
[0096] S44: deriving the ground area average depth sequence and the human area average depth sequence according to the human area depth value sequence and the ground area depth value sequence.
[0097] Specifically, according to the human body area depth value sequence and the ground area depth value sequence, the ground area average depth and the human body area average depth are obtained. After the ground area average depth and the human body area average depth are obtained, it is possible to more accurately judge whether the human body has fallen. When falling, the average depth of the human body area will be significantly reduced, and compared with the average depth of the ground area, the average depth of the human body area will have a large deviation. Therefore, by comparing the average depth of the human body area and the average depth of the ground area, it is possible to more reliably judge whether the human body has fallen and avoid misjudgment.
[0098] In one embodiment, see Figure 6 , the S44 comprises:
[0099] S441: acquiring a first pixel point sequence in the human body region and a second pixel point sequence in the ground region according to the human body region position information and the ground region position information;
[0100] S442: Obtaining a first sliding window and a second sliding window according to the first pixel point sequence and the second pixel point sequence;
[0101] S443: Obtaining a first filtered depth value sequence and a second filtered depth value sequence according to the first sliding window and the second sliding window;
[0102] Specifically, for each pixel in the first pixel sequence, its adjacent points (such as w adjacent points before and after) are taken to form a 2w+1 sliding window, and the sliding window is used as the first sliding window. The median of the depth values corresponding to all pixels in the first sliding window is calculated, and it is used as the depth value after filtering. The first filtered depth value sequence is obtained by calculating the depth values of all pixels in the first pixel sequence after filtering. Similarly, the second filtered depth value sequence can be obtained. It should be noted that the size of the sliding window can be adjusted according to the actual application requirements. Using a sliding window to perform median filtering of the depth value can effectively eliminate isolated noise points and false detection points in the depth map, making the depth map smoother and more reliable. Since depth maps often have noise and false detection points in actual applications, if filtering is not performed, it may have a greater impact on subsequent algorithms. Therefore, the use of sliding window median filtering can effectively improve the robustness and accuracy of the algorithm. In addition, the size of the sliding window can be adjusted according to the actual application requirements to achieve the best filtering effect.
[0103] S444: Perform sliding window processing on the human body area depth value sequence and the ground area depth value sequence according to the first filtered depth value sequence and the second filtered depth value sequence to obtain an average depth of the ground area and an average depth of the human body area.
[0104] Specifically, the first filtered depth value sequence D1_filtered and the second filtered depth value sequence D2_filtered are obtained, and the average depth of the ground area and the average depth of the human body area are calculated using the following formula:
[0105] D_person_avg= (d11_filtered+d12_filtered+……+d1n_filtered) / n;
[0106] D_ground_avg= (d21_filtered+d22_filtered+……+d2m_filtered) / m;
[0107] Among them, D_person_avg represents the average depth of the human body area, D_ground_avg represents the average depth of the ground area, d11_filtered, d12_filtered, d12_filtered, ... d1n_filtered respectively represent the filtered depth values corresponding to the first pixel to the nth pixel in the first filtered depth value sequence, d22_filtered, d22_filtered, ... d2m_filtered respectively represent the filtered depth values corresponding to the first pixel to the mth pixel in the second filtered depth value sequence, n is the number of points in the first filtered depth value sequence, and m is the number of points in the second filtered depth value sequence.
[0108] S5: Calculate the depth difference between the average depth sequence of the human body area and the average depth sequence of the ground area, and detect human falls based on the depth difference sequence.
[0109] Specifically, by acquiring the average depth sequence of the human body area corresponding to multiple frames of monocular images, more accurate human body position and posture information is obtained, and then based on the depth difference sequence between the average depth sequence of the human body area and the average depth of the ground area, the human fall behavior is more accurately detected.
[0110] In one embodiment, see Figure 7 , the S5 comprises:
[0111] S51: Obtaining a preset depth difference threshold;
[0112] Specifically, in actual applications, due to different ways of acquiring depth information in different scenes and cameras, the required depth difference threshold will also be different. If the threshold is set too small, it may lead to a high false detection rate, that is, a situation where there is no fall is misjudged as a fall; if the threshold is set too large, it may lead to a high missed detection rate, that is, a situation where a fall is not detected. Therefore, a suitable threshold T is pre-set to determine whether the depth difference between the human body and the ground is small enough. This threshold can be adjusted according to the actual scene and camera parameters.
[0113] S52: Compare each depth difference in the depth difference sequence with the depth difference threshold in sequence to obtain a comparison result;
[0114] Specifically, for each frame of the input monocular image, the difference between the average depth of the human body and the depth of the ground is calculated according to the following formula:
[0115] delta_D_i = abs(D_person_avg_i–D_ground_avg)
[0116] Among them, delta_D_i is the depth difference between the average depth of the human body in the i-th frame image and the ground depth, D_person_avg_i is the average depth of the human body area in the i-th frame image, D_ground_avg is the average depth of the ground area, and abs is the absolute value; the calculated depth difference is compared with the depth difference threshold in sequence. When the depth difference is less than the depth difference threshold, it is considered that the human body has fallen; when the depth difference is not less than the depth difference threshold, it is considered that the human body has not fallen. By judging according to the set depth difference threshold, it is possible to accurately detect whether the human body has fallen, thereby achieving effective video monitoring and safety management.
[0117] S53: When the comparison results corresponding to the continuous multiple frames of images all show that the depth difference is less than the depth difference threshold, the result of the human body falling is that the human body falls on the ground.
[0118] Specifically, traverse the depth difference delta_D_i of all frames. If the depth difference delta_D_i of multiple consecutive frames (for example, 3 consecutive frames or more) is less than the threshold T, then we can assume that the person has fallen to the ground. The depth difference of multiple consecutive frames is used to determine whether the person has fallen, thereby improving the accuracy and reliability of detection. Since the position and posture of the human body will change greatly when falling, simply judging the depth difference of a certain frame may lead to misjudgment. However, by judging the depth difference of multiple consecutive frames, the possibility of misjudgment can be reduced, thereby improving the accuracy of fall detection. At the same time, by adjusting the number of consecutive frames and the threshold size, the sensitivity and real-time performance of the detection can also be controlled to better meet the needs of different scenarios.
[0119] Example 2
[0120] See also Figure 8 Embodiment 2 of the present invention further provides a human fall detection device combined with depth measurement, the device comprising:
[0121] An image acquisition module is used to acquire a real-time video stream in a video surveillance scenario and decompose the real-time video stream into multiple frames of real-time images;
[0122] An image segmentation module is used to segment the real-time image to obtain ground area position information if no human target is identified in the current monitoring scene and the current monitoring angle of view is not rotated;
[0123] In one embodiment, if no human target is identified in the current monitoring scene and the current monitoring angle of view is not rotated, the real-time image is segmented to obtain the ground area position information, and the following steps are also included:
[0124] A human target detection model acquisition unit is used to obtain a pre-trained human target detection model based on the yolov6s architecture;
[0125] A human target detection unit is used to input the real-time image into the human target detection model to identify whether a human target appears in the current monitoring scene;
[0126] The monitoring view rotation recognition unit is used to monitor the camera rotation by using the visual mileage calculation method and to recognize whether the current monitoring view rotation occurs.
[0127] In one embodiment, the image segmentation module includes:
[0128] A filtering and color space conversion unit, used for filtering and color space conversion of the real-time image to obtain a color space image if no human target is identified in the current monitoring scene and the current monitoring angle of view is not rotated, wherein the real-time image is a monocular image;
[0129] A feature extraction and fusion unit, used to extract features from the color space image, fuse the extracted local features with the global features, and obtain multi-scale features;
[0130] A probability map acquisition unit, used to acquire the probability of each pixel point being in the ground area according to the multi-scale features, and obtain a probability map;
[0131] A probability map conversion unit, used to obtain a preset probability threshold and convert the probability map into a binary segmentation map;
[0132] The morphological processing unit is used to perform morphological processing on the binary segmentation map, and use the pixel point position information in the ground area as the ground area position information.
[0133] A human body detection module, used to input each of the real-time images into a pre-trained human body detection model and output human body region position information;
[0134] A depth analysis module, used to perform depth analysis on the human body region position information and the ground region position information, and obtain an average depth sequence of the ground region and an average depth sequence of the human body region corresponding to multiple frames of time-series images;
[0135] In one embodiment, the in-depth analysis module includes:
[0136] A model training unit, used to obtain a training image with a deep label in a video surveillance scene, input the training image into a deep learning network, and obtain a training model;
[0137] A forward propagation unit, used to input the real-time image into the training model for forward propagation to obtain depth values corresponding to all pixels in the real-time image;
[0138] A depth value sequence acquisition unit is used to acquire a human region depth value sequence and a ground region depth value sequence corresponding to multiple frames of time-series images based on the human region position information and the ground region position information and in combination with the depth values corresponding to all pixels in the real-time image;
[0139] In one embodiment, the depth value sequence acquisition unit includes:
[0140] A human body region depth value sequence acquisition subunit, configured to output depth values corresponding to pixel points in the human body region to the human body region depth value sequence according to the human body region position information;
[0141] The ground area depth value sequence acquisition subunit is used to output the depth values corresponding to the pixel points in the ground area to the ground area depth value sequence according to the ground area position information.
[0142] The average depth sequence unit acquisition unit is used to obtain the ground area average depth sequence and the human area average depth sequence according to the human area depth value sequence and the ground area depth value sequence.
[0143] In one embodiment, the average depth sequence unit acquisition unit includes:
[0144] A pixel point sequence and acquisition subunit, used to acquire a first pixel point sequence in the human body area and a second pixel point sequence in the ground area according to the human body area position information and the ground area position information;
[0145] A sliding window acquisition subunit, used to obtain a first sliding window and a second sliding window according to the first pixel point sequence and the second pixel point sequence;
[0146] A filtering processing subunit, configured to obtain a first filtered depth value sequence and a second filtered depth value sequence according to the first sliding window and the second sliding window;
[0147] The sliding window processing subunit is used to perform sliding window processing on the human body area depth value sequence and the ground area depth value sequence according to the first filtered depth value sequence and the second filtered depth value sequence to obtain the average depth of the ground area and the average depth of the human body area.
[0148] The fall detection module calculates the depth difference between the average depth sequence of the human body area and the average depth sequence of the ground area, and detects human falls based on the depth difference sequence.
[0149] In one embodiment, the fall detection module comprises:
[0150] A depth difference threshold acquisition unit, used to acquire a preset depth difference threshold;
[0151] a depth difference comparison unit, configured to compare each depth difference in the depth difference sequence with the depth difference threshold in sequence to obtain a comparison result;
[0152] The fall judgment unit is used to determine that the human body has fallen to the ground when the comparison results corresponding to multiple consecutive frames of images all show that the depth difference is less than the depth difference threshold.
[0153] Specifically, a human fall detection device combined with depth measurement provided by an embodiment of the present invention is adopted, and the device includes: an image acquisition module, which is used to acquire a real-time video stream in a video surveillance scene, and decompose the real-time video stream into multiple frames of real-time images; an image segmentation module, which is used to perform image segmentation on the real-time image if no human target is recognized in the current surveillance scene and the current surveillance angle is not rotated, so as to obtain ground area position information; a human body detection module, which is used to input each of the real-time images into a pre-trained human body detection model, and output human body area position information; a depth analysis module, which is used to perform depth analysis on the human body area position information and the ground area position information, and obtain the ground area average depth sequence and the human body area average depth sequence corresponding to multiple frames of time-series images; a fall detection module, which performs depth difference calculation on the human body area average depth sequence and the ground area average depth sequence, and detects human falls based on the depth difference sequence. This device relies on real-time video streams in video surveillance scenarios, which are obtained through common surveillance cameras. There is no need to introduce additional depth sensors, thereby reducing hardware costs; pre-training of human detection models means that there is no need to train the model from scratch, reducing development costs. Many pre-trained models have been trained on large-scale data for human detection in general scenarios; the location information of the ground area is obtained through real-time image segmentation and implemented through common computer vision algorithms without the need for complex depth image processing, which helps to reduce costs; by analyzing the average depth sequence of the ground and human areas corresponding to multiple frames of time-series images, the system's adaptability to dynamic environmental changes is increased, thereby reducing the probability of misjudgment; through depth difference calculation, the system can pay more attention to changes in relative depth rather than just absolute depth values, which helps to improve the stability of detection.
[0154] Example 3
[0155] In addition, combined Figure 1 The human fall detection method combined with depth measurement 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.
[0156] The electronic device may include a processor and a memory storing computer program instructions.
[0157] 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 embodiment of the present invention.
[0158] 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 the 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.
[0159] The processor implements any one of the human fall detection methods combined with depth measurement in the above embodiments by reading and executing computer program instructions stored in the memory.
[0160] 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.
[0161] The communication interface is mainly used to implement communication between the modules, devices, units and / or equipment in the embodiments of the present invention.
[0162] The bus includes hardware, software or both, and the components of the device are coupled to each other. For example, but not limitation, the bus may include an accelerated graphics port (AGP) or other graphics bus, an enhanced industrial standard architecture (EISA) bus, a front-side bus (FSB), a hypertransport (HT) interconnection, an industrial standard architecture (ISA) bus, an infinite bandwidth interconnection, a low pin count (LPC) bus, a memory bus, a microchannel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standard association local (VLB) bus or other suitable bus or a combination of two or more of these. Where appropriate, the bus may include one or more buses. Although the embodiments of the present invention describe and illustrate a specific bus, the present invention contemplates any suitable bus or interconnection.
[0163] Example 4
[0164] In addition, in combination with the human fall detection method combined with depth measurement in the above embodiment 1, 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 human fall detection method combined with depth measurement in the above embodiments is implemented.
[0165] In summary, the embodiments of the present invention provide a method, device, equipment and storage medium for human fall detection combined with depth measurement.
[0166] 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.
[0167] The functional blocks shown in the structural block diagram described above 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 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. "Machine-readable medium" may include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROMs, flash memories, erasable ROMs (EROMs), 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.
[0168] 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.
[0169] 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 human fall detection method combined with depth measurement, It is characterized in that The method comprises: S1: Acquire a real-time video stream in a video surveillance scenario, and decompose the real-time video stream into multiple frames of real-time images; S2: If no human target is identified in the current monitoring scene and the current monitoring view angle is not rotated, the real-time image is segmented to obtain the ground area position information; S3: inputting each of the real-time images into a pre-trained human body detection model, and outputting human body region position information; S4: performing depth analysis on the human body region position information and the ground region position information to obtain an average depth sequence of the ground region and an average depth sequence of the human body region corresponding to multiple frames of time-series images; S5: Calculating the depth difference between the average depth sequence of the human body area and the average depth sequence of the ground area, and detecting a human fall according to the depth difference sequence; The S4 includes: S41: Obtain a training image with a deep label in a video surveillance scene, input the training image into a deep learning network, and obtain a training model; S42: Inputting the real-time image into the training model for forward propagation to obtain depth values corresponding to all pixels in the real-time image; S43: acquiring a human region depth value sequence and a ground region depth value sequence corresponding to multiple frames of sequential images according to the human region position information and the ground region position information and in combination with depth values corresponding to all pixels in the real-time image; S44: according to the human body area depth value sequence and the ground area depth value sequence, obtaining the ground area average depth sequence and the human body area average depth sequence; The S43 includes: S431: outputting depth values corresponding to pixel points in the human body region to the human body region depth value sequence according to the human body region position information; S432: Outputting depth values corresponding to pixel points in the ground area to the ground area depth value sequence according to the ground area position information; The S44 includes: S441: acquiring a first pixel point sequence in the human body region and a second pixel point sequence in the ground region according to the human body region position information and the ground region position information; S442: Obtaining a first sliding window and a second sliding window according to the first pixel point sequence and the second pixel point sequence; S443: Obtaining a first filtered depth value sequence and a second filtered depth value sequence according to the first sliding window and the second sliding window; S444: Perform sliding window processing on the human body area depth value sequence and the ground area depth value sequence according to the first filtered depth value sequence and the second filtered depth value sequence to obtain an average depth of the ground area and an average depth of the human body area.
2. The human fall detection method combined with depth measurement according to claim 1, It is characterized in that The S2 includes: S21: If no human target is identified in the current monitoring scene and the current monitoring view angle is not rotated, filtering and color space conversion are performed on the real-time image to obtain a color space image, wherein the real-time image is a monocular image; S22: extracting features from the color space image, fusing the extracted local features with the global features, and obtaining multi-scale features; S23: Obtaining the probability of each pixel point being in the ground area according to the multi-scale features, and obtaining a probability map; S24: Obtain a preset probability threshold, and convert the probability map into a binary segmentation map; S25: Perform morphological processing on the binary segmentation map, and use the pixel point position information in the ground area as the ground area position information.
3. The human fall detection method combined with depth measurement according to any one of claims 1 to 2, It is characterized in that The S5 includes: S51: Obtaining a preset depth difference threshold; S52: Compare each depth difference in the depth difference sequence with the depth difference threshold in sequence to obtain a comparison result; S53: When the comparison results corresponding to the continuous multiple frames of images all show that the depth difference is less than the depth difference threshold, the result of the human body falling is that the human body falls on the ground.
4. The human fall detection method combined with depth measurement according to claim 1, It is characterized in that The S2 previously includes: S201: Get the pre-trained human target detection model based on yolov6s architecture; S202: Inputting the real-time image into the human target detection model to identify whether a human target appears in the current monitoring scene; S203: Using the visual odometry calculation method, the camera rotation is monitored to identify whether the current monitoring angle of view is rotated.
5. A human fall detection device combined with depth measurement, It is characterized in that The device comprises: An image acquisition module is used to acquire a real-time video stream in a video surveillance scenario and decompose the real-time video stream into multiple frames of real-time images; An image segmentation module is used to segment the real-time image to obtain ground area position information if no human target is identified in the current monitoring scene and the current monitoring angle of view is not rotated; A human body detection module, used to input each of the real-time images into a pre-trained human body detection model and output human body region position information; A depth analysis module, used to perform depth analysis on the human body region position information and the ground region position information, and obtain an average depth sequence of the ground region and an average depth sequence of the human body region corresponding to multiple frames of time-series images; A fall detection module calculates the depth difference between the average depth sequence of the human body area and the average depth sequence of the ground area, and detects human falls based on the depth difference sequence; The performing depth analysis on the human body region position information and the ground region position information to obtain the ground region average depth sequence and the human body region average depth sequence corresponding to multiple frames of time-series images comprises: Obtaining a training image with a deep label in a video surveillance scene, inputting the training image into a deep learning network, and obtaining a training model; Input the real-time image into the training model for forward propagation to obtain depth values corresponding to all pixels in the real-time image; According to the human body area position information and the ground area position information, combined with the depth values corresponding to all pixels in the real-time image, a human body area depth value sequence and a ground area depth value sequence corresponding to multiple frames of time-series images are obtained; According to the human body area depth value sequence and the ground area depth value sequence, the ground area average depth sequence and the human body area average depth sequence are obtained; The method of obtaining a human region depth value sequence and a ground region depth value sequence corresponding to multiple frames of sequential images based on the human region position information and the ground region position information and combining the depth values corresponding to all pixels in the real-time image comprises: Outputting depth values corresponding to pixel points in the human body region to the human body region depth value sequence according to the human body region position information; Outputting depth values corresponding to pixel points in the ground area to the ground area depth value sequence according to the ground area position information; The step of obtaining the ground area average depth sequence and the human area average depth sequence according to the human area depth value sequence and the ground area depth value sequence comprises: Acquire a first pixel point sequence in the human body region and a second pixel point sequence in the ground region according to the human body region position information and the ground region position information; Obtaining a first sliding window and a second sliding window according to the first pixel point sequence and the second pixel point sequence; According to the first sliding window and the second sliding window, a first filtered depth value sequence and a second filtered depth value sequence are obtained; According to the first filtered depth value sequence and the second filtered depth value sequence, sliding window processing is performed on the human body area depth value sequence and the ground area depth value sequence to obtain an average depth of the ground area and an average depth of the human body area.
6. 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 4.
7. 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 4 is implemented.
