Improved YOLOv8-based old people fall-down detection method
By improving the YOLOv8 network, adding the GAM attention mechanism and P2 small object detection layer, combining the fall and facial expression detection model, the problem of low accuracy of fall detection in elderly people under dim conditions is solved, and high efficiency in low light environments is achieved Old man fell to check.
Patent Information
- Application Number
- CN202410940869.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-11-12
AI Technical Summary
The existing elderly fall detection technology has low detection accuracy under dim conditions, and the wearable sensor is uncomfortable wearing and the initial cost of environmental sensors is limited, which limits application scenarios.
Based on the improved YOLOv8 network, the GAM attention mechanism and P2 small object detection layer are added, the loss function is modified, and the pre-trained fall detection and facial expression detection model is combined to monitor video data in real time to improve falls for elderly people under dim conditions. Detection accuracy.
In low-light environment, it improves the accuracy and robustness of fall detection for elderly people, simplifies design, reduces equipment costs, and enhances detection efficiency.
Smart Images

Figure CN118942152A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method for detecting elderly falls based on an improved YOLOv8. Background Art
[0002] As the global population aging trend continues to intensify, the physical and mental health of the elderly has become a focus of close attention from all walks of life. Among them, accidental falls, as the primary hidden danger threatening the safety of the elderly, not only seriously affects their quality of life, but is also an important cause of injury and even death. Therefore, exploring and implementing efficient and timely fall monitoring and emergency response mechanisms is particularly urgent and important for ensuring the safety of the elderly, reducing the burden of medical care, and maintaining social harmony and stability.
[0003] Currently, there are three main technologies for detecting falls among the elderly: detection methods based on wearable sensors, detection methods based on environmental sensors, and methods based on machine vision recognition.
[0004] Detection method based on wearable sensors: This method mainly monitors the activity status and physiological indicators of the elderly by wearing smart bracelets, acceleration sensors, and gyroscope and accelerometer fusion devices. Once an abnormal fall is detected, the device can quickly issue an alarm. However, some wearable devices will cause discomfort to the elderly when worn for a long time, which makes the elderly unwilling to continue wearing them. In addition, some elderly people often forget to wear related devices. Therefore, this method cannot achieve ideal results.
[0005] Detection method based on environmental sensors: This method mainly monitors the activities and postures of the elderly by placing pressure sensing pads, infrared sensors, sound sensors and other devices in the home environment to determine whether the elderly have fallen. This method requires the home environment to be modified and a set of sensor networks to be installed. The initial cost is relatively high, and the application scenarios are relatively limited.
[0006] Methods based on machine vision recognition: This method mainly uses a camera to capture images or videos, analyzes the behavior patterns of the elderly through artificial intelligence algorithms, identifies the risk of falling, and intervenes in time. Although machine vision-based fall detection has made significant progress, there are still some shortcomings. Some existing detection methods do not consider the detection of elderly falls in dim conditions or the recognition accuracy in dim conditions is not high. Summary of the invention
[0007] In order to solve the above-mentioned problems, the present invention is based on machine vision technology and provides a method and system for detecting elderly people’s falls under dim conditions based on improved YOLOv8, so as to realize fall detection of the elderly under dim conditions and improve the accuracy and efficiency of detection.
[0008] The embodiment of the present invention provides a method for detecting elderly falls based on improved YOLOv8, comprising the following steps: Step 1) Pick up a section of surveillance video data and obtain each frame of image data; Step 2) Use the pre-trained fall detection model to detect the real-time status of the elderly. If the elderly is lying flat, go to step 3. If the elderly is lying flat with his face down, go to step 4. Otherwise, output "the elderly is normal". Step 3) Use the pre-trained facial expression detection model to detect the facial expression of the elderly. If the facial expression of the elderly is distress, go to step 4, otherwise end; Step 4) Every time "lying_facedown" or "distress" is detected, Count is increased by one. If Count is greater than the number of images in half a period, an alarm is issued, a reserved phone number is dialed, and the location is sent.
[0009] Optionally, the specific steps of step 2 are: Divide the video data collected in step 1 into multiple pictures frame by frame to generate a fall data set; Use the FSResizer tool to preprocess the images and divide them into training sets, validation sets, and test sets; Add the GAM attention mechanism to the Backbone part of the YOLOv8 configuration file and replace the bounding box loss function with the WIoU loss function. Then input the data to start training. At the end of each round of training, verify the model's mAP50, mAP50-95, precision, and recall indicators, and select the model with the highest mAP50 indicator to retain the weight to obtain the fall detection model. The monitoring video data is input into the fall detection model to detect the real-time status of the elderly. If the state of the elderly identified by the fall detection model is "lying_facedown" or "lying", the subsequent detection behavior will continue; otherwise, the output is "the elderly is normal".
[0010] Optionally, the specific steps of step 3 are: Divide the video data collected in step 1 into multiple pictures frame by frame, generate a facial expression dataset and continue to divide it into a training set, a validation set and a test set; Add the GAM attention mechanism to the Backbone part of the YOLOv8 configuration file, add the P2 small object detection layer to the Head layer, and replace the bounding box loss function with the WIoU loss function. Then input the data to start training. At the end of each round of training, verify the model's mAP50, mAP50-95, precision, and recall indicators, and select the model with the highest mAP50 indicator to retain the weight, and obtain the facial expression detection model. Input the image output from step 2 into the saved facial expression detection model for facial expression detection. If the recognized expression is "distress", go to step 4, otherwise end.
[0011] Optionally, the specific steps of step 4 are: Every time a video is captured, Count is initialized to 0; Whenever the state of the elderly person identified in step 2 is "lying_facedown" or the facial expression of the elderly person identified in step 3 is "distress", Count is increased by one. If Count is greater than the number of images in half a period, an alarm is issued, a reserved phone number is dialed, and the location is sent.
[0012] One or more technical solutions provided in the embodiments of the present invention have at least the following technical effects or advantages: The method of the present invention is simple and reasonably designed, and takes into account the situation where the elderly fall under dim conditions. The improved YOLOv8 network is used to detect the elderly falling in real time. On the basis of the original YOLOv8 network, the GAM_Attention mechanism and the P2 small target detection layer are added and the loss function is modified, which can make the network more focused on the key visual features related to the elderly falling in the video stream, and can effectively improve the accuracy and robustness of detection even in low-light environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 is a schematic diagram of an elderly fall detection method based on improved YOLOv8 in an embodiment of the present invention; Figure 2 It is the PR curve diagram of each state of the existing YOLOv8 fall detection model; Figure 3 It is a PR curve diagram of each state of the improved YOLOv8 fall detection model in an embodiment of the present invention. DETAILED DESCRIPTION
[0014] The technical solution of the present invention is further described below with reference to the accompanying drawings and through specific implementations. like Figure 1As shown, the present invention proposes a method for detecting elderly falls based on improved YOLOv8, which specifically includes the following steps: Step 1) Pick up a section of surveillance video data and obtain each frame of image data; Step 2) Use the pre-trained fall detection model to detect the real-time status of the elderly. If the elderly is lying flat, go to step 3. If the elderly is lying flat with his face down (lying_facedown), go to step 4. Otherwise, output "the elderly is normal"; Step 3) Use the pre-trained facial expression detection model to detect the facial expression of the elderly. If the facial expression of the elderly is distress, go to step 4, otherwise end; Step 4) Each time "lying_facedown" or "distress" is detected, Count is increased by one. If Count is greater than the number of images in half a period, an alarm is issued, a reserved phone number is dialed, and the location is sent.
[0015] Specific as Figure 1 As shown, the specific steps of step 2 are: Divide the video data collected in step 1 into multiple pictures frame by frame to generate a fall data set; Use the FSResizer tool to preprocess the images and divide them into training sets, validation sets, and test sets; Add the GAM attention mechanism to the Backbone part of the YOLOv8 configuration file and replace the bounding box loss function with the WIoU loss function. Then input the data to start training. At the end of each round of training, verify the model's mAP50, mAP50-95, precision, and recall indicators, and select the model with the highest mAP50 indicator to retain the weight to obtain the fall detection model. The monitoring video data is input into the fall detection model to detect the real-time status of the elderly. If the state of the elderly identified by the fall detection model is "lying_facedown" or "lying", the subsequent detection behavior will continue; otherwise, the output is "the elderly is normal".
[0016] The recall rate calculation formula is: Recall = , The formula for calculating the accuracy is: Precision = , Among them, TP (True Positives) is true positive, representing the positive samples that are correctly classified, FP (False Positives) is false positive, representing the negative samples that are misclassified, and FN (False negatives) is false negative, representing the positive samples that are misclassified.
[0017] mAP (Mean Average Precision): mAP is the mean average precision of all categories. It is obtained by calculating the Average Precision (AP) of each category and averaging these AP values. AP is the area under the Precision-Recall curve of a category. In the object detection task, mAP measures the comprehensive performance of the model's detection accuracy and recall rate for different object categories. Among them, mAP50 is the indicator of the mean average precision when the IoU threshold is 0.5.
[0018] The training results are shown in the following table. It can be seen from the table that the improved YOLOv8 has been improved in all aspects. Figure 2 and Figure 3 The recognition accuracy of each state is shown separately. Although the accuracy of one action is reduced after the improvement, the overall accuracy is still improved.
[0019] Comparison table of evaluation indicators of fall detection model
[0020] Specifically, the specific steps of step 3 are: Divide the video data collected in step 1 into multiple pictures frame by frame, generate a facial expression dataset and continue to divide it into a training set, a validation set and a test set; Add the GAM attention mechanism to the Backbone part of the YOLOv8 configuration file, add the P2 small object detection layer to the Head layer, and replace the bounding box loss function with the WIoU loss function. Then input the data to start training. At the end of each round of training, verify the model's mAP50, mAP50-95, precision, and recall indicators, and select the model with the highest mAP50 indicator to retain the weight, and obtain the facial expression detection model. like Figure 1 As shown, the specific steps of step 4 are Initialize Count to 0 for each captured video; Whenever the state of the elderly person identified in step 2 is "lying_facedown" or the facial expression of the elderly person identified in step 3 is "distress", Count is increased by one. If Count is greater than the number of images in half a period, an alarm is issued, a reserved phone number is dialed, and the location is sent.
[0021] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A method for detecting elderly falls based on improved YOLOv8, characterized in that: The following steps are involved: Step 1) Pick up a section of surveillance video data and obtain each frame of image data; Step 2) Use the pre-trained fall detection model to detect the real-time status of the elderly. If the elderly is lying flat, go to step 3. If the elderly is lying flat with his face down, go to step 4. Otherwise, output "the elderly is normal". Step 3) Use the pre-trained facial expression detection model to detect the facial expression of the elderly. If the facial expression of the elderly is distress, go to step 4, otherwise end; Step 4) Each time "lying_facedown" or "distress" is detected, Count is incremented by one. If Count is greater than the number of images in half a period, an alarm is issued, a reserved phone number is dialed, and the location is sent.
2. The method for detecting elderly falls based on improved YOLOv8 as claimed in claim 1, characterized in that: The specific steps of step 2 are: Divide the video data collected in step 1 into multiple pictures frame by frame to generate a fall data set; Use the FSResizer tool to preprocess the images and divide them into training sets, validation sets, and test sets; Add the GAM attention mechanism to the Backbone part of the YOLOv8 configuration file and replace the bounding box loss function with the WIoU loss function. Then input the data to start training. At the end of each round of training, verify the model's mAP50, mAP50-95, precision, and recall indicators, and select the model with the highest mAP50 indicator to retain the weight to obtain the fall detection model. The surveillance video data is input into the fall detection model to detect the real-time status of the elderly. If the state of the elderly identified by the fall detection model is "lying_facedown" or "lying", the subsequent detection behavior will continue. Otherwise, the output is "the elderly is normal".
3. The method for detecting elderly falls based on improved YOLOv8 as claimed in claim 1, characterized in that: The specific steps of step 3 are: Divide the video data collected in step 1 into multiple pictures frame by frame, generate a facial expression dataset and continue to divide it into a training set, a validation set and a test set; Add the GAM attention mechanism to the Backbone part of the YOLOv8 configuration file, add the P2 small object detection layer to the Head layer, and replace the bounding box loss function with the WIoU loss function. Then input the data to start training. At the end of each round of training, verify the model's mAP50, mAP50-95, precision, and recall indicators, and select the model with the highest mAP50 indicator to retain the weight, and obtain the facial expression detection model. Input the image output from step 2 into the saved facial expression detection model for facial expression detection. If the recognized expression is "distress", go to step 4, otherwise end.
4. The method for detecting elderly falls based on improved YOLOv8 as claimed in claim 1, characterized in that: The specific steps of step 4 are: Every time a video is captured, Count is initialized to 0; Whenever the state of the elderly person identified in step 2 is "lying_facedown" or the facial expression of the elderly person identified in step 3 is "distress", Count is increased by one. If Count is greater than the number of images in half a period, an alarm is issued, a reserved phone number is dialed, and the location is sent.
