A fall detection method, electronic device and storage medium
Through the method of combining adaptive interval frame skipping with human posture detection, the time overhead and stability problems of fall behavior detection in the existing technology are solved, the real-time performance and recognition accuracy of the fall model are improved, and the impact of the background environment is reduced.
Patent Information
- Application Number
- CN202010737111.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-28
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2040-07-28
AI Technical Summary
When existing fall behavior detection methods process video streams, processing images frame by frame leads to increased time overhead. Frame skipping at fixed intervals may cause frame target detection to fail. They cannot meet the real-time and stability requirements, and rely on the human body frame to be aligned with the background. Reduced moving object detection affects model recognition ability.
The adaptive interval frame skipping detection method is used to detect the human body frame on the temporary representative frame. If the human body frame is detected, it is added to the queue and the frames with the preset interval frame number are obtained for update detection. If the human body frame is not detected, the next human body frame is obtained. The frame is used as a representative frame, and the fall action detection is performed based on the human posture detection results. The posture information of two consecutive frames is used to calculate the motion information to improve the detection accuracy.
It reduces the frequency of frame target detection failures, improves the stability and recognition accuracy of the fall model, reduces the impact of the background environment and fall posture on model recognition, and avoids uncertainty and false detection rates in single frame detection.
Smart Images

Figure CN111898518B
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the field of computer vision, and in particular to a fall detection method, an electronic device, and a storage medium. Background Art
[0002] Fall behavior detection has a wide range of applications in practice, mainly for elderly people living alone, young children and weak patients in a home environment. By monitoring human activities, abnormal fall behaviors can be detected in real time to obtain abnormal fall warnings.
[0003] The inventors have found that there are at least the following problems in the prior art: the current fall behavior detection method processes the video information stream, processes the image frame by frame or skips frames at fixed intervals, obtains the human body condition, and detects the fall behavior. However, processing the image frame by frame will increase the time overhead of processing the image, and processing the image by skipping frames at fixed intervals may cause frame target detection failure, which cannot meet the requirements of high real-time and high stability of data when building the model. In addition, some current fall detection methods only use moving objects that subtract the human body frame from the background to detect the fall action, which leads to a large impact of the background environment and the fall posture on the model recognition ability. Summary of the invention
[0004] The purpose of the embodiments of the present invention is to provide a fall detection method, an electronic device and a storage medium, so that when performing fall detection on a video stream, the time overhead of processing the frame images of the video stream can be reduced, the frequency of frame target detection failure can be reduced, thereby weakening the negative effects caused by the frame target detection failure, and human body posture information can be fully utilized to detect fall actions, reducing the influence of the background environment and fall posture on the model recognition ability.
[0005] To solve the above technical problems, an embodiment of the present invention provides a fall detection method, comprising: detecting a human body frame on a temporary representative frame, wherein the temporary representative frame is derived from a frame image of a video stream; if a human body frame is detected, adding the temporary representative frame to a queue, and obtaining a frame with a preset interval frame number from the temporary representative frame as an updated temporary representative frame for detecting the human body frame; if no human body frame is detected, obtaining the next frame of the temporary representative frame as an updated temporary representative frame for detecting the human body frame; performing human posture detection on the frames in the queue; and detecting a fall action according to the result of the human posture detection.
[0006] An embodiment of the present invention also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned fall detection method applied to the terminal device.
[0007] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which implements the above-mentioned fall detection method when executed by a processor.
[0008] Compared with the prior art, the embodiments of the present invention select a temporary representative frame from the frame information of the video stream to detect the human frame; if a human frame is detected, the temporary representative frame is added to a queue, and a frame with a preset interval frame number from the temporary representative is obtained as an updated temporary representative frame to detect the human frame; if a human frame is not detected, the next frame of the temporary representative frame is obtained as an updated temporary representative frame to detect the human frame; human posture detection is performed on the frames in the queue; and the falling action is detected according to the result of the human posture detection. The frame skipping detection method of the present invention avoids the high time overhead caused by frame-by-frame detection, and reduces the frequency of frame target detection failure compared to fixed interval frame skipping detection frame images, thereby reducing the problem of lack of real-time data in establishing a fall model due to frame target detection failure, and improving the stability of the established fall model. In addition, the present invention utilizes human posture detection, which can fully utilize human posture information, make the features richer and more comprehensive, and reduce the influence of background environment and fall posture on model recognition ability.
[0009] In addition, detecting a falling action according to the result of the human posture detection includes: detecting a falling action according to the result of the human posture detection of two consecutive frames in the queue. In this implementation, the falling action is detected by combining the posture information of two consecutive frames, which effectively represents the coherent movement posture of the human body and avoids the defect of unclear movement trend in single frame detection.
[0010] In addition, detecting a falling action according to the result of the human posture detection includes: calculating motion information according to the results of the human posture detection of two consecutive frames in the queue, wherein the motion information includes lateral motion information and longitudinal motion information;
[0011] The falling action is detected according to the motion information. In this implementation, the lateral motion information and the longitudinal motion information are calculated using the human posture detection results during the fall detection process, taking into account both the longitudinal information and the lateral information, thereby reducing the false detection rate of squatting, sitting, bending and other similar behaviors and improving the detection accuracy of the model.
[0012] In addition, detecting a fall action according to the motion information includes: taking a frame in the queue that meets a preset condition as a fall frame, wherein the preset condition includes: if the lateral motion information is within a preset lateral motion parameter range, and the longitudinal motion information is within a preset longitudinal motion parameter range; detecting a fall action according to the fall frame and a frame in the queue adjacent to the fall frame. In this implementation, detecting two adjacent frames takes into account the continuity of the fall action and avoids the uncertainty of single-frame detection.
[0013] In addition, detecting a fall action according to the fall frame and the frames adjacent to the fall frame in the queue includes: if the adjacent frames meet the preset conditions, and the frame spacing between the fall frame and the previous fall frame in the queue exceeds the preset number of frames, then determining that a fall action is detected. In this implementation, judging whether the frame spacing between the current fall frame and the previous fall frame meets the requirements can reduce the occurrence of repeated detection of one fall action as multiple fall actions.
[0014] In addition, the detecting of the falling action based on the falling frame and the frames adjacent to the falling frame in the queue includes: if the adjacent frames do not satisfy the preset condition, determining whether the longitudinal distance between the neck node and the ankle node of the adjacent frames is within a preset range; if within the preset range, determining that the falling action is detected.
[0015] In addition, before detecting the human frame of the temporary representative frame, the method further includes: obtaining a frame image of the video stream from a monocular camera. In this implementation, information obtained by the monocular camera is used to construct features, thereby reducing the cost of hardware equipment.
[0016] In addition, after obtaining the frame image of the video stream from the monocular camera, the method further includes: compressing the frame image according to the real image ratio, and mapping the real distance to the pixel distance by image compression to make up for the defect of the monocular camera lacking depth information. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] One or more embodiments are exemplarily described by the pictures in the corresponding drawings, and these exemplary descriptions do not constitute limitations on the embodiments.
[0018] Figure 1 This is a flowchart of a thread for adaptively skipping frames to filter frames with human body frames in the first embodiment of the present application;
[0019] Figure 2 This is a flowchart of a thread for implementing 2D posture detection and fall discrimination in the first embodiment of the present application;
[0020] Figure 3 This is a flowchart of a thread for implementing 2D posture detection and fall discrimination in the second embodiment of the present application;
[0021] Figure 4 This is a flowchart of a thread for adaptively skipping frames to filter frames with human body frames in the third embodiment of the present application;
[0022] Figure 5 It is a schematic diagram of the structure of an electronic device in the fourth embodiment of the present application. Specific embodiments
[0024] To make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the embodiments of the present invention, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can be implemented. The division of the following embodiments is for the convenience of description, and should not constitute any limitation on the specific implementation of the present invention. The various embodiments can be combined and referenced with each other without contradiction.
[0025] The first embodiment of the present invention relates to a fall detection method. In this embodiment, the fall detection method can be applied to a fall detection device, which can be an embedded device or computer connected to a camera for communication, or a monitoring device with a built-in camera. This embodiment includes: detecting a human frame on a temporary representative frame, wherein the temporary representative frame is derived from a frame image of a video stream; if a human frame is detected, the temporary representative frame is added to a queue, and a frame with a preset interval frame number from the temporary representative is obtained as an updated temporary representative frame for detecting the human frame; if a human frame is not detected, the next frame of the temporary representative frame is obtained as an updated temporary representative frame for detecting the human frame; human posture detection is performed on the frames in the queue; and a fall action is detected according to the result of the human posture detection. When performing fall detection on a video stream, the time overhead of processing the frame images of the video stream can be reduced, the frequency of frame target detection failure can be reduced, thereby reducing the negative effects caused by frame target detection failure, and the human posture information can be fully utilized to detect the fall action, reducing the influence of the background environment and the fall posture on the model recognition ability. The implementation details of the fall detection method of this embodiment are described in detail below. The following content is only provided for easy understanding of the implementation details and is not necessary for implementing this solution.
[0026] In this embodiment, two threads are initialized. One thread is used to read the frame-by-frame information of the monitoring video stream and perform adaptive interval frame skipping to filter frames with human frames, and initialize a queue. The thread flow chart is as follows: Figure 1 As shown, another thread is used to implement 2D posture detection and fall discrimination. The thread flow chart is as follows Figure 2 As shown below. Figure 1 and Figure 2 The process is described in detail.
[0027] The following Figure 1 The thread shown is used to read the frame-by-frame information of the monitoring video stream and perform adaptive interval frame skipping to filter the frames with human body frames.
[0028] Step 101, obtaining a temporary representative frame from a video stream to detect a human body frame.
[0029] Specifically, a frame is taken from the video stream captured by the camera as a temporary representative frame, such as the first frame in the video stream is taken as the temporary representative frame, and the human body frame is detected on the temporary representative frame.
[0030] Step 102, determine whether the temporary representative frame has a human frame, if not, jump to step 103; if there is a human frame, jump to step 104. That is, if a human frame is detected in the temporary representative frame, go to step 104, if not, go to step 103.
[0031] Step 103, obtaining the next frame of the temporary representative frame as the updated temporary representative frame, and continuing to detect the human body frame.
[0032] Step 104, add the temporary representative frame to the queue, and obtain the frame with the preset interval frame number from the temporary representative as the updated temporary representative frame, and continue to detect the human frame. It is worth mentioning that if the number of frames between the temporary representative frame and the last frame of the video stream is less than the preset interval frame number, the last frame of the video stream is used as the updated temporary representative frame, and the human frame detection is continued.
[0033] In one example, the fall detection device starts a thread to read the frame-by-frame information of the video stream. The first frame of the video stream is selected as a temporary representative frame; target detection is performed on the taken temporary representative frame based on the human posture detection algorithm YoloV3; it is determined whether there is a human frame in the temporary representative frame; if a human frame is detected, the frame is added to the queue Q, and the frame with a preset interval frame number from the temporary representative is obtained as the updated temporary representative frame for human frame detection; if a human frame is not detected in the temporary representative frame, the next frame is selected as the temporary representative frame for human frame detection, and if a human frame is detected, the frame is added to the queue Q. In one example, if a human frame is not detected in the temporary representative frame, the next frame is selected as the temporary representative frame for human frame detection, and if a human frame is detected, the frame is added to the queue Q, including: if in the subsequent temporary representative frame If there is a frame with a human body frame detected in the frame, the frame with the human body frame detected is added to the queue Q. If the subsequent If no human frame is detected in any frame, the gap between the initial frame and the frame is taken as the integer gap (gap> ) is detected in the next frame, where is a preset number of times threshold, which is used to indicate the upper limit of the number of times the next frame is selected as the temporary representative frame. The value is 2, the gap value is 5, the first frame is selected to detect the human frame, if the human frame is detected in the first frame, the first frame is added to the queue and the sixth frame is selected to detect the human frame; if the human frame is not detected in the first frame, the second frame is selected to detect the human frame; if the human frame is detected in the second frame, the second frame is added to the queue and the sixth frame is selected to detect the human frame; if the human frame is not detected in the second frame, the third frame is selected to detect the human frame; if the human frame is detected in the third frame, the third frame is added to the queue and the sixth frame is selected to detect the human frame; if the human frame is not detected, because the operation of selecting the next frame to detect the human frame has been performed twice, the set number of times threshold 2 has been reached, so continuous frame skipping is no longer performed. At this time, the sixth frame is selected to detect the human frame.
[0034] The following Figure 2 The thread shown for implementing 2D posture detection and fall discrimination is specifically described.
[0035] Step 201, performing human posture detection on the frames in the queue.
[0036] In one example, the fall detection device starts another thread to perform human posture detection on the frames in the created queue, takes a frame of image from queue Q, performs human posture detection on it based on the human posture detection algorithm AlphaPose, and outputs 18 node information in a specified data format, such as OpenPose. From the results of human posture detection, such as the 18 node information, the horizontal and vertical pixel coordinates of the neck node (node 1), waist node (node 8 and node 11), and ankle node (node 10 and node 13) of the current frame are obtained, where the pixel coordinates of the neck, left waist, right waist, left ankle, and right ankle nodes are recorded as , , , , ; The coordinates of the neck node are ; When calculating the waist node When calculating pixel coordinates, if the pixel coordinates of the left waist node and the right waist node are detected, the average coordinates are taken; if only one of the left waist node and the right waist node is detected, the coordinates of the node are taken; if neither the left waist node nor the right waist node is detected, the pixel coordinates of the waist node are (0, 0); when calculating the ankle node When calculating pixel coordinates, if the pixel coordinates of the left ankle node and the right ankle node are detected, the average of their coordinates is taken; if only one of the left ankle node and the right ankle node is detected, the coordinate of that node is taken; if neither the left ankle node nor the right ankle node is detected, the pixel coordinates of the ankle node are (0, 0).
[0037] Step 106: Detect the falling action according to the human body posture detection result.
[0038] In one example, the relative positions of the human body nodes are determined based on the posture detection results of a single frame image, such as the coordinates of 18 node information of the human body, and a fall is detected based on the relative positions of the human body nodes.
[0039] In this embodiment, the frame skipping detection method avoids the high time overhead caused by frame-by-frame detection. Compared with the fixed-interval frame skipping detection frame image, the frequency of frame target detection failure is reduced, thereby reducing the problem of lack of real-time data in establishing a fall model due to frame target detection failure, and improving the stability of the established fall model. In addition, the present invention utilizes human posture detection, which can fully utilize human posture information, making the features richer and more comprehensive, and reducing the influence of background environment and fall posture on model recognition ability.
[0040] The second embodiment of the present invention relates to a fall detection method. This embodiment is roughly the same as the first embodiment and requires the initialization of two threads. One thread is used to read the frame-by-frame information of the monitoring video stream and perform adaptive interval frame skipping to filter frames with human frames, and initialize a queue. The other thread is used to implement 2D posture detection and fall discrimination.
[0041] The thread used in this embodiment to read the frame-by-frame information of the monitoring video stream and perform adaptive interval frame skipping to filter the frames with human frames is the same as that in the first embodiment. Figure 1 The steps of this thread are the same as those of the first embodiment. The steps of this thread include: obtaining a temporary representative frame from the video stream to detect a human frame; determining whether the temporary representative frame has a human frame. If there is no human frame, obtaining the next frame of the temporary representative frame as the updated temporary representative frame, and continuing to detect the human frame; if there is a human frame, adding the temporary representative frame to the queue, and obtaining a frame with a preset interval of frames from the temporary representative as the updated temporary representative frame, and continuing to detect the human frame. The difference between this embodiment and the first embodiment is that the threads used to implement 2D posture detection and fall discrimination are different, such as Figure 3 The steps are described in detail below.
[0042] Step 301, performing human posture detection on the frames in the queue, the steps here are the same as step 201 in Example 1, and will not be repeated here.
[0043] Step 302, calculating motion information based on human body posture results of two consecutive frames.
[0044] In one example, the lateral motion information is calculated based on the 18 node information obtained by the human body posture detection. For example, the lateral coordinate transformation of the waist node of two adjacent frames is obtained, and the modulus of the lateral coordinate difference of the waist node of two adjacent frames is taken. As the lateral velocity value , further, take the modulus of the difference between the horizontal coordinates of the previous frame and the horizontal coordinates of the current frame to get ; Take the modulus of the difference between the horizontal coordinate of the current frame and the horizontal coordinate of the frame after the current frame to get ;Pick and The average value is taken as the average horizontal speed value of the current frame , the formula is as follows:
[0045] ,
[0046] Get the longitudinal distance based on 18 node information : The longitudinal distance is the longitudinal coordinate of the ankle node Subtract the longitudinal coordinate of the neck node , the formula is as follows:
[0047] ,
[0048] Get the longitudinal motion information based on the 18 node information: calculate the longitudinal distance of the current frame Vertical distance from the previous frame The ratio is taken as the distance change rate of the current frame , the formula is as follows:
[0049] .
[0050] Step 303 , determining whether the motion information of two consecutive frames is within a preset range, if not, jump to 304 , if within the preset range, jump to 305 .
[0051] In one example, a fall action is detected based on motion information. First, a counter is initialized. ; Determine whether the longitudinal motion information and lateral motion information of the current frame meet the fall condition. If the longitudinal motion information of the current frame is within the longitudinal motion parameters, for example, the distance change rate is within , and the lateral motion information is within the lateral motion parameters, such as the lateral offset velocity of the waist node , then the counter Add 1; if the current frame does not meet the speed requirement, the counter If two consecutive frame counters are reset Add 1, and when the frame interval from the last time a fall was detected is greater than a preset number of frames, such as 10 frames, it is considered that a fall has occurred.
[0052] Step 304: No falling action is detected.
[0053] In one example, when no fall action is detected, frames in the queue continue to be taken for fall detection until all frames in the queue are detected.
[0054] Step 305: detecting a fall action.
[0055] In one example, the frame where the fall is detected is saved, and frames in the queue are continuously taken for fall detection until all frames in the queue are detected.
[0056] In one example, a counter is initialized ; Perform human posture detection on the frames in the queue, and calculate the lateral motion information and the longitudinal motion information based on the human posture detection results of two consecutive frames, such as 18 node information, to determine whether the longitudinal motion information and the lateral motion information of the current frame meet the fall condition. Specifically, if the longitudinal motion information of the current frame, such as the distance change rate , and lateral motion information, such as the lateral displacement velocity of the waist node , then the counter Add 1; if the current frame does not meet the speed requirement, the counter Clear. If there is only one frame counter Add 1, but the longitudinal distance between the neck node and the ankle node in the current frame , it is considered as a fall action. If a fall action is detected, the counter is cleared.
[0057] In this embodiment, the posture information of two consecutive frames is combined to detect the falling action, which effectively shows the coherent movement posture of the human body and avoids the defect of unclear movement trend in single frame detection when performing fall detection. In the process of fall detection, the lateral movement information and longitudinal movement information are calculated using the human posture detection results, which takes into account both longitudinal information and lateral information, thereby reducing the false detection rate of squatting, sitting, bending and other similar behaviors and improving the detection accuracy of the model.
[0058] The third embodiment of the present invention relates to a fall detection method. This embodiment is roughly the same as the first embodiment, and needs to initialize two threads. One thread is used to read the frame-by-frame information of the monitoring video stream and perform adaptive interval frame skipping to filter frames with human body frames, and initialize a queue. The other thread is used to implement 2D posture detection and fall discrimination.
[0059] Among them, the steps for implementing the thread of 2D posture detection and fall judgment in this embodiment are the same as those in the first embodiment. Figure 2 The steps of this thread are the same as those of , and the steps of this thread include: performing human posture detection on the frames in the queue, and detecting the falling action according to the human posture detection results.
[0060] The difference between this embodiment and the first embodiment is that the thread for reading frame-by-frame information of the monitoring video stream and performing adaptive interval frame skipping to filter human frames in this embodiment is different from that in the first embodiment. Figure 4 The steps are described in detail below.
[0061] Step 401: Acquire a frame image of a video stream from a monocular camera.
[0062] In one example, taking the fall detection device as an embedded device or a computer that is communicatively connected to a monocular camera, the fall detection device obtains frame images of a video stream from the monocular camera and reads the frame images frame by frame.
[0063] Step 402: compress the frame images of the video stream according to the real image ratio.
[0064] In one example, a compression ratio is preset, and the frame image is compressed according to the ratio. If the horizontal and vertical lengths of the frame image obtained from the fall detection device are , , according to the frame image side length: compressed image side length ratio of 2:1, the compressed horizontal and vertical lengths are / 2, / 2.
[0065] In one example, if the horizontal and vertical lengths of the frame image obtained from the fall detection device are , , and record its long side as , the short side is recorded as , set a fixed value , the long side Set to this fixed value , and the short side of the frame image is compressed proportionally, and the compression formula of the short side is .
[0066] Step 403: Obtain a temporary representative frame from the compressed frame image to detect a human frame.
[0067] In addition, if the temporary representative frame is the last frame of the frame image of the video stream, no frame will be obtained from the frame image for detecting the human frame unless there is an instruction to re-detect the frame image of the video.
[0068] Step 404, determine whether the temporary representative frame has a human frame, if not, jump to step 405; if there is a human frame, jump to step 406.
[0069] Step 405: Obtain the next frame of the temporary representative frame as the updated temporary representative frame, and continue to detect the human body frame.
[0070] Step 405, add the temporary representative frame to the queue, and obtain the frame with the preset interval frame number from the temporary representative as the updated temporary representative frame, and continue to detect the human frame. It is worth mentioning that if the number of frames between the temporary representative frame and the last frame of the video stream is less than the preset interval frame number, the next frame detection of the temporary representative frame is obtained until the last frame of the video stream is detected.
[0071] In one example, a fall detection device initializes two threads. One thread obtains a video stream from a monocular camera, reads frame images frame by frame, and compresses the frame images according to the actual ratio. For example, if the horizontal and vertical lengths of the frame images obtained by the fall detection device are , , and record its long side as , the short side is recorded as , set a fixed value , the long side Set to this fixed value , and the short side of the frame image is compressed proportionally, and the compression formula of the short side is , select the first frame from the compressed frame image to detect the human frame. If the human frame is detected, add the temporary representative frame to the queue Q, and obtain the frame with a preset interval frame number gap from the temporary representative as the updated temporary representative frame, and continue to detect the human frame. In addition, if the interval between the temporary representative frame and the last frame of the video stream is less than the gap, obtain the next frame of the temporary representative frame to detect the human frame until the frame images of the video stream are detected; if the human frame is not detected, obtain the next frame of the temporary representative frame as the updated temporary representative frame, and continue to detect the human frame; another thread performs 2D human posture detection on the frames in the queue Q, and detects the falling action according to the human posture detection results.
[0072] In this embodiment, an embedded device or computer connected to a monocular camera acquires a frame image from the monocular camera; the frame image is proportionally reduced, and a human frame is detected on the reduced frame image; it is determined whether the temporary representative frame has a human frame; if there is a human frame, the next frame of the temporary representative frame is obtained as the updated temporary representative frame, and the human frame detection is continued; if there is no human frame, the temporary representative frame is added to a queue, and a frame with a preset interval frame number from the temporary representative is obtained as the updated temporary representative frame, and the human frame detection is continued, and the human posture detection is performed on the frames in the queue, and the fall action is detected according to the human posture detection result. This embodiment uses the frame image information obtained by the monocular camera to construct the fall detection specification, and selects the frame image from the video stream of the monocular camera for fall detection, which reduces the cost of the hardware device compared to the method that needs to use expensive cameras such as depth cameras or multi-eye cameras to detect the fall action. At the same time, the frame image is proportionally compressed. This image compression method maps the real distance to the pixel distance, and also makes up for the defect of the monocular camera lacking depth information.
[0073] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0074] A fourth embodiment of the present invention relates to an electronic device, comprising at least one processor 501; and a memory 502 communicatively connected to the at least one processor 501; wherein the memory 502 stores instructions executable by the at least one processor 501, and the instructions are executed by the at least one processor 501 so that the at least one processor 501 can execute the fall detection method in the above-mentioned embodiment.
[0075] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.
[0076] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.
[0077] A fifth embodiment of the present invention relates to a computer-readable storage medium storing a computer program, which implements the above method embodiment when executed by a processor.
[0078] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0079] Those skilled in the art will appreciate that the above embodiments are specific embodiments for implementing the present invention, and that in actual applications, various changes may be made in form and detail without departing from the spirit and scope of the present invention.
Claims
1. A fall detection method, characterized in that: include: Detecting a human frame on a temporary representative frame, wherein the temporary representative frame is derived from a frame image of a video stream; If a human frame is detected, the temporary representative frame is added to a queue, and a frame that is a preset interval frame number away from the temporary representative is obtained as an updated temporary representative frame to detect the human frame; If the human frame is not detected, the next frame of the temporary representative frame is obtained as the updated temporary representative frame to detect the human frame. If there is a frame in which the human frame is detected in the frame, the frame in which the human frame is detected is added to the queue. If the subsequent frame of the temporary representative frame If the human frame is not detected in any frame, the next frame with an integer gap between the initial frame and the initial frame is taken for detection, where gap> , is a preset number threshold, used to indicate the upper limit number of times of continuously selecting the next frame as the temporary representative frame; Performing human posture detection on the frames in the queue; A falling action is detected according to the result of the human body posture detection.
2. The fall detection method according to claim 1, characterized in that: The detecting of a falling action according to a result of the human body posture detection comprises: The falling action is detected according to the results of the human body posture detection of two consecutive frames in the queue.
3. The fall detection method according to claim 2, characterized in that: The detecting of a falling action according to a result of the human body posture detection comprises: Calculating motion information according to the results of human posture detection of two consecutive frames in the queue, wherein the motion information includes lateral motion information and longitudinal motion information; A falling action is detected according to the motion information.
4. The fall detection method according to claim 3, characterized in that: The detecting a falling action according to the motion information comprises: The frame in the queue that meets the preset condition is taken as a fall frame, wherein the preset condition includes: if the lateral motion information is within a preset lateral motion parameter range, and the longitudinal motion information is within a preset longitudinal motion parameter range; A fall action is detected according to the fall frame and frames in the queue adjacent to the fall frame.
5. The fall detection method according to claim 4, characterized in that: The detecting a fall action according to the fall frame and frames in the queue adjacent to the fall frame comprises: If the adjacent frames meet the preset condition, and the frame spacing between the fall frame and the frame in which the fall action was detected last time exceeds the preset number of frames, it is determined that the fall action is detected.
6. The fall detection method according to claim 4, characterized in that: The detecting a fall action according to the fall frame and frames in the queue adjacent to the fall frame comprises: If the adjacent frames do not meet the preset condition, determining whether the longitudinal distance between the neck node and the ankle node of the adjacent frames is within a preset range; If it is within the preset range, it is determined that a fall action is detected.
7. The fall detection method according to any one of claims 1 to 6, characterized in that: Before detecting the human frame on the temporary representative frame, the method further includes: Acquire a frame image of the video stream from a monocular camera.
8. The fall detection method according to claim 7, characterized in that: After acquiring the frame image of the video stream from the monocular camera, the method further includes: The frame image is compressed according to the real image ratio.
9. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the fall detection method according to any one of claims 1 to 8.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the fall detection method according to any one of claims 1 to 8 is implemented.
