Fall detection method and system
By improving the C2f module and neck network structure of the YOLOv8 model and combining it with the Focal-EIoU loss function, the OEF-YOLO model was constructed, which solved the problems of slow speed, low accuracy and high cost of existing fall detection methods and achieved more efficient fall detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ZHEJIANG NORMAL UNIV
- Filing Date
- 2023-12-19
- Publication Date
- 2026-04-24
AI Technical Summary
Existing fall detection methods suffer from problems such as slow detection speed, low detection accuracy, and high cost, and are not ideal in terms of lightweight design, making it difficult to meet the needs of industrial deployment.
The C2f module of YOLOv8 is improved by using the ODConv module, and the channel weights are calibrated in the neck network of YOLOv8 by combining the EMA module. The detection algorithm is optimized by the Focal-EIoU loss function, and the OEF-YOLO model is constructed to improve detection accuracy and speed.
The model is lightweight, improving the speed and accuracy of fall detection while reducing costs, making it suitable for industrial scenarios with low computing power.
Smart Images

Figure CN121921812A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of fall detection technology, and more specifically to a fall detection method and system. Background Technology
[0002] Fall detection is crucial in daily life, especially for the elderly and those with other physical disabilities. Timely fall detection is vital for their safety and health, and in critical moments, it can even save lives. Therefore, fall detection is extremely important. Currently, common fall detection methods include sensors, cameras, and artificial intelligence. However, these methods all have limitations, such as slow detection speed, low accuracy, and high cost. Furthermore, existing fall detection algorithms are not yet ideal in terms of lightweight design. Therefore, how to further lightweight the detection algorithms to facilitate industrial deployment and improve detection speed and accuracy is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0003] In view of this, the present invention provides a fall detection method and system that overcomes the above-mentioned defects.
[0004] To achieve the above objectives, the present invention provides the following technical solution:
[0005] A fall detection method, the specific steps of which are as follows:
[0006] Step 1: Obtain fall data and construct a fall dataset;
[0007] Step 2: Train the improved YOLOv8 model using the fall dataset to obtain the fall detection model;
[0008] Step 3: Input the fall image to be identified into the fall detection model to obtain the fall detection result of the fall image to be identified.
[0009] Optionally, the fall dataset includes several fall images and the pose type of the person in each fall image.
[0010] Optionally, the steps to obtain the improved YOLOv8 model are as follows:
[0011] Improve the traditional YOLOv8 C2f module using the ODConv module to construct the C2f-ODConv module;
[0012] An EMA module is added to the neck network of a traditional YOLOv8 network to calibrate the channel weights in each parallel branch;
[0013] The Focal loss function is incorporated into the traditional YOLOv8 CIoU loss function to construct the Focal-EIoU loss function.
[0014] Optionally, the C2f-ODConv module includes a convolutional layer, a split block, a Bottleneck-ODConv block, a splicing block, and a convolutional block connected in sequence; the split block and multiple Bottleneck-ODConv blocks are all connected to the splicing block.
[0015] Optionally, the EMA module divides the input feature map into G sub-features across the channel dimension, constructs grouped feature maps based on the sub-features, and extracts attention weights for the grouped feature maps based on three parallel branches.
[0016] Optionally, the three parallel branches include two 1×1 branches and one 3×3 branch.
[0017] Optionally, the Focal-EIoU loss function expression is:
[0018] L Focal-CIoU =IoU γ L CIoU
[0019] In the formula, γ is a hyperparameter used to control the curvature of the loss function curve.
[0020] A fall detection system, comprising:
[0021] The dataset acquisition module is used to acquire fall data and construct a fall dataset.
[0022] The model training module is used to train the improved YOLOv8 model using the fall dataset to obtain a fall detection model;
[0023] The fall detection module is used to input the fall image to be identified into the fall detection model and obtain the fall detection result of the fall image to be identified.
[0024] As can be seen from the above technical solutions, compared with the prior art, this invention discloses a fall detection method and system. It improves the C2f module of YOLOv8 by using the ODConv module, making the network more lightweight by reducing GFLOPs. Furthermore, it adds an EMA module to the neck network of YOLOv8, enabling the network structure to encode global information to recalibrate the channel weights in each parallel branch, which can better preserve the information of each channel. Based on the improvement of YOLOv8, this invention performs fall detection, improving detection speed and accuracy, while reducing costs. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0026] Figure 1 This is a schematic diagram of the method steps of the present invention;
[0027] Figure 2(a) is a schematic diagram of the traditional YOLOv8 model; Figure 2(b) is a schematic diagram of the improved YOLOv8 model (OEF-YOLO) of this invention, where components are put together to indicate that the two components have a data flow relationship.
[0028] Figure 3 This is a schematic diagram illustrating the function of ODConv in this invention;
[0029] Figure 4 This is an example diagram of the fall dataset in Example 2;
[0030] Figure 5 This is an example diagram showing the detection results of the OEF-YOLO of the present invention;
[0031] Figure 6 This is a schematic diagram of the C2f-ODConv structure of the present invention;
[0032] Figure 7 A schematic diagram of the EMA module structure of this invention. Detailed Implementation
[0033] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0034] Example 1
[0035] This invention discloses a fall detection method, the specific steps of which are as follows: Figure 1 As shown, it includes:
[0036] Step 1: Obtain fall data and construct a fall dataset;
[0037] Step 2: Train the improved YOLOv8 model using the fall dataset to obtain the fall detection model;
[0038] Step 3: Input the fall image to be identified into the fall detection model to obtain the fall detection result of the fall image to be identified.
[0039] In step 1, the fall dataset includes several fall images and the type of person's posture in each fall image.
[0040] In step 2, based on the fall dataset, the improved YOLOv8 model is trained with fall images as input and the type of person's posture in the fall images as output to obtain the fall detection model.
[0041] The improved YOLOv8 model is based on the traditional YOLOv8 model (its structure is shown in Figure 2(a)) and incorporates the following three improvements to obtain the OEF-YOLOv8 model (its structure is shown in Figure 2(b)). The improvement scheme includes:
[0042] 1) The ODConv module is used to improve the C2f module of YOLOv8; this can effectively reduce the GFLOPs of the network, making the computational complexity of the model lower and better suited for industrial scenarios with low computing power.
[0043] like Figure 3 As shown, the ODConv module can be viewed as a novel multidimensional attention mechanism that learns four types of attention along the four dimensions of the convolution kernel space in parallel. These four types of attention learned by the ODConv module are complementary, and their progressive application to the corresponding convolution kernels significantly enhances the feature extraction capabilities of basic convolutional operations in CNNs. Furthermore, even a single-kernel ODConv module can compete with, and even outperform, dynamic convolutions with multiple kernels, thereby greatly reducing the need for additional parameters.
[0044] The formulas in the ODConv module can be defined as follows:
[0045] y=(α w1 ⊙α f1 ⊙α c1 ⊙α s1 ⊙W1+…+α wn ⊙α fn ⊙α cn ⊙α sn ⊙W n )*x;
[0046] in, and W represents the input features and output features, respectively; i Indicated by c out The i-th convolutional kernel is composed of filters; represents the m-th filter of the i-th convolution kernel; ⊙ represents the multiplication operation along different dimensions of the kernel space.
[0047] α si ∈R k×k This indicates that different attention scalars are assigned to the convolution parameters (each filter of the convolution kernel) at a K*K spatial location; c represents the value of each convolutional filter. in Different scalars of interest are assigned to the channels; Represented as c out Each convolutional filter is assigned a different attention scalar; αw i表 This is used for weighted W. i The attention scalar is assigned to the entire convolution kernel, which is the same as the attention scalar in dynamic convolution.
[0048] The ODConv module is combined with the C2F block to form the C2f-ODConv module, such as... Figure 6 As shown, the C2f-ODConv module first undergoes a convolutional layer, followed by a splitting operation. The split portion is then subjected to gradient splitting. The original C2f module uses a convolutional Bootleck for splitting before concatenation, while C2f-ODConv uses the Bootleck-ODConv module for splitting. Its specific structure is shown in [link to diagram]. Figure 6 .
[0049] C2F: This module was proposed by YOLOv8 and was designed with reference to the C3 module and the ideas of ELAN. It allows the model to be more lightweight while enriching the gradient flow information.
[0050] 2) Adding an EMA module to the neck network of YOLOv8 allows the network structure to encode global information to recalibrate the channel weights in each parallel branch, thus better preserving the information of each channel. See the EMA module structure diagram. Figure 7 .
[0051] For any given input feature map X∈C×H×W, where C, H, and W represent the dimensions of the input features, the EMA module divides the input X into G sub-features across the channel dimensions for learning different semantics. Each sub-feature can be defined by X=[X0, X... i ,…,X G-1 ],X i∈C / / G×H×W. Since neurons capture multi-scale spatial information through local receptive fields, thereby improving their perceptual range and ability to perceive features at different scales, EMA uses three parallel branches to describe the attention weights used to extract grouped feature maps. Two of these branches are 1×1 branches, and the third is a 3×3 branch. To capture dependencies between all channels and reduce computational burden, the EMA module models cross-channel information interactions along channel directions. That is, in the 1×1 branch, two 1D global average pooling operations are used to encode channels along two spatial directions respectively, and in the 3×3 branch, only a single 3×3 convolutional kernel is stacked to capture multi-scale feature representations.
[0052] In the two 1×1 branches, EMA concatenates the two encoded features and makes them share the same 1×1 convolution, without reducing the dimensionality of the 1×1 branches. Then, the output of the 1×1 convolution is decomposed into two vectors, and two non-linear sigmoid functions are used to fit a 2D binomial distribution over the linear convolution. To achieve different cross-channel interaction features between the two parallel routes in the 1×1 branches, EMA aggregates the two channel attention maps within each group through simple multiplication. On the other hand, the 3×3 branch captures local cross-channel interactions through 3×3 convolutions to expand the feature space. Thus, EMA not only encodes inter-channel information to adjust the importance of different channels but also preserves precise spatial structure information within the channels.
[0053] The EMA module then provides cross-spatial information aggregation methods across different spatial dimensions to achieve richer feature aggregation. Here, the EMA module introduces two tensors: one is the output of the 1×1 branch, and the other is the output of the 3×3 branch. Then, 2D global average pooling is used to encode the global spatial information in the 1×1 branch output. The 2D global pooling operation is represented as:
[0054]
[0055] In the formula, x c This represents the input feature at the c-th channel, where i and j are the dimension numbers of the input feature.
[0056] To improve computational efficiency, a natural nonlinear function of a 2D Gaussian map, Softmax, is used to fit a linear transformation at the output of the 2D global average pooling. Then, the first spatial attention map is obtained by performing a dot product operation between this output and the output of the 3×3 branch. Furthermore, the EMA module utilizes 2D global average pooling to encode global spatial information in the 3×3 branch, deriving a second spatial attention map that preserves the entire precise spatial location information. Finally, the output feature map within each group is computed as an aggregation of the two generated spatial attention weight values, followed by a sigmoid function. This captures pixel-level pairwise relationships and highlights the global context of all pixels. The final output of the EMA module is the same size as the input X.
[0057] 3) Improve the loss function for YOLOv8. Focal loss addresses the issue that some samples in a dataset are easy to classify, while others are relatively difficult. During model training, the accuracy for easily classified samples can be very high, but the accuracy for difficult-to-classify samples is very low. Therefore, Focal loss adjusts the sample weights, decreasing the weights of easily classified samples and increasing the weights of difficult-to-classify samples, thus making the model focus more on the difficult-to-classify samples. This has the same effect as giving the model more difficult-to-classify samples. The Focal-EIoU loss function expression is:
[0058] L Focal-CIoU =IoU γ L CIoU ;
[0059] γ is a hyperparameter used to control the curvature of the loss function curve; in this embodiment, γ = 0.5. The magnitude of IoU can be regarded as the difficulty of sample classification; the larger the IoU, the easier the sample is to classify; the smaller the IoU, the more difficult the sample is to classify. γ = 0.5 allows a smaller IoU to obtain a larger increment, thereby increasing the weight of difficult-to-classify samples.
[0060] The formula for the CIoU loss function is as follows:
[0061]
[0062]
[0063]
[0064] In the above formula, the center points of the two rectangles are represented by b and b', respectively. gt Let b represent the center point of the currently predicted rectangle. gtThe center point of the rectangle representing the true label is denoted by β. The Euclidean distance between the rectangles is denoted by β, and c represents the distance between the diagonals of the closure regions of the two rectangles. The main function of c is to prevent the loss function from becoming too large, thereby accelerating the convergence speed of the model.
[0065] In this embodiment, YOLOv8 is an open-source, single-stage object detection algorithm developed by Ultralytics.
[0066] Example 2
[0067] This embodiment demonstrates the beneficial effects of the method of the present invention by performing target detection on a fall image through a specific experiment.
[0068] Experimental Platform: This experiment was conducted on a Linux operating system, using PyCharm Community as the integrated development environment (IDE) and implementing the model framework in Python. The main hardware configuration was: Ubuntu 22.04 64-bit operating system, Intel Core i5-13600KF CPU, GeForce RTX 3090 (24GB) GPU, and 64GB RAM. The deep learning development environment consisted of: PyCharm 2023.1.2, Python 3.9, CUDA 12.1, cuDNN 8.9.0, and PyTorch 2.0.1.
[0069] Dataset: The images in this dataset are re-annotated manually based on three publicly available datasets: URFall Detection Dataset (URFD), Fall detectionDataset, and Multiple cameras fall dataset (MCFD). The dataset contains four pose types: fall, sit, stoop, and stand. Figure 4 Example images selected from the aforementioned fall dataset.
[0070] Experimental Setup: To verify the effectiveness of this invention, all experiments were conducted from scratch. The parameters were set as follows: a total of 200 epochs, a batch size of 64, an initial learning rate of 0.01, SGD as the optimizer, and a weight decay of 0.0005. The first 3 epochs were the warmup phase, during which the learning rate decayed from 0.1 to 0.01 over three learning cycles. Mosica enhancement was disabled in the last 10 epochs. Specific parameter settings are shown in Table 1.
[0071] Table 1 Experimental parameter settings
[0072] Dataset Falling Dataset Maximum number of training epochs 200 Learning rate (starting) 0.01 Batch size 64 Weight decay 0.0005 Optimizer SGD
[0073] Experimental Results: This experiment compared the performance of the YOLOv8 algorithm after incorporating the improved model, and also compared it with the results of YOLOv5. Four metrics were considered: parameter count, GFLOPs, mAP@.5, and mAP@.95. The model performance and complexity were compared. The comparison revealed that the proposed OEF-YOLO model improves detection accuracy with only a slight increase in parameters, and GFLOPs are also reduced. See Table 2 for details. The final detection results are shown below. Figure 5 .
[0074] Table 2 Comparison of OEF-YOLOv8 with various detector versions.
[0075]
[0076] Meanwhile, this embodiment implements each of the three steps on the YOLOv8 detector. The YOLOv8 model size used in the experiment is the lightest n, and the experimental results are shown in Table 3.
[0077] Table 3 OEF-YOLOv8 Ablation Experiment
[0078] Model Param(M) GFLOPs mAP@.5 mAP@.95 YOLOV8 3 8.1 96.4 59.2 YOLOV8+C2f-ODConv 3 5.8 96.6 73.7 YOLOV8+C2f-ODConv+EMA 3 6.5 97.5 73.3 YOLOV8+C2f-ODConv+EMA+Focal-CIoU 3.1 6.5 97.9 73.7
[0079] Another embodiment of the present invention discloses a fall detection system, comprising:
[0080] The dataset acquisition module is used to acquire fall data and construct a fall dataset.
[0081] The model training module is used to train the improved YOLOv8 model using the fall dataset to obtain a fall detection model;
[0082] The fall detection module is used to input the fall image to be identified into the fall detection model and obtain the fall detection result of the fall image to be identified.
[0083] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0084] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A fall detection method, characterized in that, The specific steps are as follows: Step 1: Obtain fall data and construct a fall dataset; Step 2: Train the improved YOLOv8 model using the fall dataset to obtain the fall detection model; Step 3: Input the fall image to be identified into the fall detection model to obtain the fall detection result of the fall image to be identified.
2. The fall detection method according to claim 1, characterized in that, The fall dataset includes several fall images and the pose types of people in each fall image.
3. The fall detection method according to claim 1, characterized in that, The steps to obtain the improved YOLOv8 model are as follows: Improve the traditional YOLOv8 C2f module using the ODConv module to construct the C2f-ODConv module; An EMA module is added to the neck network of a traditional YOLOv8 network to calibrate the channel weights in each parallel branch; The Focal loss function is incorporated into the traditional YOLOv8 CIoU loss function to construct the Focal-EIoU loss function.
4. The fall detection method according to claim 3, characterized in that, The C2f-ODConv module includes a convolutional layer, a split block, a Bottleneck-ODConv block, a splicing block, and a convolutional block connected in sequence; the split block and multiple Bottleneck-ODConv blocks are all connected to the splicing block.
5. A fall detection method according to claim 3, characterized in that, The EMA module divides the input feature map into G sub-features across the channel dimension, then constructs grouped feature maps based on the sub-features, and extracts the attention weights of the grouped feature maps based on three parallel branches.
6. The fall detection method according to claim 5, characterized in that, The three parallel branches include two 1×1 branches and one 3×3 branch.
7. The fall detection method according to claim 3, characterized in that, The expression for the Focal-EIoU loss function is: L Focal-CIoU =IoU γ L CIoU In the formula, γ is a hyperparameter used to control the curvature of the loss function curve.
8. A fall detection system, characterized in that, include: The dataset acquisition module is used to acquire fall data and construct a fall dataset. The model training module is used to train the improved YOLOv8 model using the fall dataset to obtain a fall detection model; The fall detection module is used to input the fall image to be identified into the fall detection model and obtain the fall detection result of the fall image to be identified.