Human cardiac arrest tumble detection method based on ResNet algorithm
By using a 3D convolutional neural network model based on the ResNet algorithm, the problem of distinguishing between out-of-hospital cardiac arrest falls and ordinary falls was solved, achieving high accuracy and low false alarm rate, thus improving the survival rate of cardiac arrest patients.
Patent Information
- Application Number
- CN202511012265.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-22
- Publication Date
- 2025-11-14
AI Technical Summary
Current technology makes it difficult to accurately distinguish between cardiac arrest falls and ordinary falls outside of hospitals, resulting in a high false alarm rate and affecting the survival rate of cardiac arrest patients.
A 3D convolutional neural network model based on the ResNet algorithm is used. By collecting, preprocessing and segmenting video stream datasets, a 3D ResNet 18 network model is trained to obtain the optimal weight model for distinguishing between cardiac arrest falls and ordinary falls.
It improves the accuracy of fall detection for cardiac arrest in out-of-hospital settings, reduces false alarm rates, and improves the survival rate of cardiac arrest patients.
Smart Images

Figure CN120953757A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical and health testing, and in particular to a method for detecting falls during cardiac arrest in humans based on the ResNet algorithm. Background Technology
[0002] Cardiac arrest is a major public health challenge worldwide, with high rates of disability and death. When cardiac arrest occurs, patients typically experience loss of consciousness and falls. Early intervention is crucial for improving survival rates. The first 4-6 minutes after cardiac arrest are known as the "golden time" for brain resuscitation; without timely intervention, patients rapidly die biologically. If an alarm can be triggered the moment a patient falls due to cardiac arrest, rather than waiting for others to discover them, thus avoiding missing the optimal rescue window, the survival rate of cardiac arrest patients can be significantly improved.
[0003] When cardiac arrest occurs, the fall is often sudden, unsupported, and characterized by loss of postural control. The body experiences a series of chain reactions due to the sudden cessation of the heart's pumping function. This differs from a typical fall, which often involves an involuntary self-protective instinct, manifesting as the body using its own strength to cushion the fall. Additionally, external objects may trigger the fall. These two types of falls have relatively clear distinguishing characteristics, making them suitable for classification and testing.
[0004] Based on the above, it is feasible to detect cardiac arrest falls and general falls by studying the continuous movements of the person falling before, during, and at the moment of the fall. Furthermore, most current research only focuses on judging and detecting static movements such as standing and squatting during the fall. This invention focuses on detecting the continuous movements of cardiac arrest falls and other falls, using a video stream dataset for training, which is innovative and can further improve the survival rate of out-of-hospital cardiac arrest. Summary of the Invention
[0005] The technical problem this invention aims to solve is to provide a method for detecting falls during cardiac arrest based on the ResNet algorithm. This method can distinguish between falls during cardiac arrest and ordinary falls, and when used outside of hospitals, it can reduce the probability of false alarms and improve the survival rate of cardiac arrest patients.
[0006] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is: a method for detecting falls during cardiac arrest in humans based on the ResNet algorithm, comprising the following steps:
[0007] Step 1: Collect a dataset of video streams from the entire internet showing cardiac arrest falls and general falls.
[0008] Step 2: Perform preprocessing operations such as super-resolution and sharpening on the collected video stream dataset to improve the quality of the dataset;
[0009] Step 3: Divide the preprocessed dataset into training set, validation set, and test set;
[0010] Step 4: Build a 3D ResNet 18 network model and train it on the video stream dataset to obtain the optimal weight model;
[0011] Step 5: Use the best weight model obtained from training to perform inference verification on cardiac arrest falls and general falls.
[0012] A further improvement to the technical solution of this invention lies in the collection of videos related to cardiac arrest falls and general falls from the entire internet. The collected videos of cardiac arrest falls include clutching the heart, falling and convulsing, falling forward, sitting down, and falling backward. The collected videos of general falls include tripping, slipping, falling over, and misstepping. The classification label for cardiac arrest falls is "fall," and the classification label for general falls is "fall_Nor." The collected video dataset includes fall states in different scenes, under different lighting conditions, and with different body types.
[0013] A further improvement to the technical solution of the present invention is as follows: Step 2 is specifically as follows:
[0014] Step 2.1: The obtained raw dataset contains other behaviors and actions of other people, which will affect the feature learning of the fall action. Based on this, the video is edited frame by frame, including only the segments before and after the fall and the moment of the fall, to improve the efficiency and accuracy of learning.
[0015] Step 2.2: Select relatively blurry videos from the dataset, perform super-resolution processing on the videos based on RealBasicVSR, and synthesize clearer videos;
[0016] Step 2.3: The super-resolution video is further enhanced by a 1.5x increase in resolution using bicubic interpolation. New pixels are generated by weighted averaging of surrounding pixel values, preserving edge details without introducing additional texture. Next, the image is converted to the LAB color space. Considering noise issues, contrast-limited histogram equalization (CLAHE) is applied only to the luminance channel (L). Convolutional kernels are defined to enhance edges. To avoid artifacts caused by over-sharpening, 70% of the original image and 30% of the sharpened result are blended. The blended result is then denoised using non-local pixel matching. Finally, gamma correction is applied for color adjustment, resulting in the pre-processed video dataset.
[0017] A further improvement to the technical solution of the present invention is that: in step 3, the video dataset is divided into a training set, a validation set, and a test set in a ratio of 8:1:1.
[0018] A further improvement to the technical solution of this invention lies in the following: The 3D ResNet 18 network model constructed in step 4 is based on 3D convolution and residual block design, used to process the temporal and spatial information of fall videos. It includes five modules: an input layer, initial convolutional and pooling layers, residual blocks, a closing layer, and an output layer. The input layer has dimensions (3, 16, 224, 224), representing 3 channels in the video frame, 16 frames in the video segment, and a single-frame image resolution, i.e., a spatial dimension of 224×224. The output layer corresponds to the binary classification result, namely, cardiac arrest falls and general falls.
[0019] A further improvement to the technical solution of this invention lies in the following: The initial convolutional layer and pooling layer in step 4 specifically use a 7×7×7 3D convolutional kernel with 64 channels, a stride of (1, 2, 2), a temporal stride of 1 to preserve temporal information, and a spatial stride of 2 to compress the image size. The initial convolution serves to initially extract spatiotemporal features. The BatchNorm3d operation normalizes the convolutional results, accelerating training while mitigating the gradient vanishing problem, and finally, ReLU activation is applied. The pooling layer uses max pooling to further compress the spatial dimension while preserving the temporal dimension. Subsequent convolutional layers follow the same principle and will not be elaborated further.
[0020] A further improvement to the technical solution of this invention lies in the following: the residual block in step 4 specifically comprises two parts: the main branch and the residual branch. The main branch is the convolutional part, while the residual branch contains multiple sets of residual blocks, divided into four stages according to the number of channels. From the first layer to the fourth layer, the number of channels changes from 64 to 128 to 256 to 512, with the output dimensions being (64, 16, 56, 56), (128, 16, 28, 28), (256, 16, 14, 14), and (512, 16, 7, 7). In the residual branch module, in addition to direct connections, it also includes downsampling of 1×1×1 convolutions. Finally, the main branch and the residual branch are activated using ReLU to retain the advantages of residual learning.
[0021] A further improvement to the technical solution of this invention lies in the following: the final layer in step 4 specifically includes three parts: adaptive average pooling, feature flattening, and a fully connected layer. Among them, adaptive average pooling compresses any spatiotemporal dimension to 1×1×1, with an output dimension of (512,1,1,1), unifying the feature dimension and preparing for the fully connected layer.
[0022] A further improvement to the technical solution of the present invention is that: in step 4, the learning rate is set to 0.001, the momentum is set to 0.9, the number of training rounds is 100, the batch size is 8, and the video size is set to 16×224×224.
[0023] A further improvement of the technical solution of the present invention is that: in the inference and prediction stage of step 5, the best trained model weight file is used to extract frames from the video, convert them into tensor format that the model can input, and perform forward propagation with the preprocessed frames to obtain the final binary classification probability, thereby verifying the detection of cardiac arrest falls and general falls.
[0024] The technological advancements achieved by this invention, due to the adoption of the aforementioned technical solution, are as follows: By using a video stream dataset and performing preprocessing operations, a well-constructed 3D ResNet 18 network model is trained, yielding relatively excellent training results. Using the accuracy on the validation set as the criterion, the optimal model achieves the following results: accuracy 0.8461, loss rate 0.4545, recall 0.875, and specificity 0.8261. Using the optimal model weight file for video inference validation, high confidence levels are achieved in both classifications, demonstrating a relatively accurate distinction between cardiac arrest falls and ordinary falls. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the embodiments described below 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.
[0026] Figure 1 This is a flowchart of a method for detecting falls in human cardiac arrest based on the ResNet algorithm provided in this invention;
[0027] Figure 2 This is a schematic diagram of the preprocessing process for the video stream dataset provided in this invention;
[0028] Figure 3 This is a block diagram illustrating the principle of the ResNet algorithm provided in this invention;
[0029] Figure 4 This is a graph showing the results of the training set, validation set, and test set obtained by the method proposed in this invention.
[0030] Figure 5 This is a diagram showing the results of inference using the best-weighted model trained in this invention. Detailed Implementation
[0031] The present invention will be further described in detail below with reference to embodiments:
[0032] like Figure 1 The diagram shows a flowchart of a fall detection method for cardiac arrest in humans based on the ResNet algorithm, including the following steps:
[0033] Step 1: There is no publicly available video dataset for cardiac arrest falls, so this embodiment collects high-quality videos of cardiac arrest falls and general falls from the entire internet as a dataset;
[0034] Step 2: Perform preprocessing operations such as super-resolution and sharpening on the collected video stream dataset to improve the quality of the dataset. The specific preprocessing operation process is as follows: Figure 2 As shown;
[0035] Step 2.1: The obtained raw dataset contains other behaviors and actions of other people, which will affect the feature learning of the fall action. Based on this, the video is edited frame by frame, including only the segments before and after the fall and the moment of the fall, to improve the efficiency and accuracy of learning.
[0036] Step 2.2: Select relatively blurry videos from the dataset, perform super-resolution processing on the videos based on RealBasicVSR, and synthesize clearer videos;
[0037] Step 2.3: The super-resolution video is further enhanced by a 1.5x increase in resolution using bicubic interpolation. New pixels are generated by weighted averaging of surrounding pixel values, preserving edge details without introducing additional texture. Next, the image is converted to the LAB color space. Considering noise issues, contrast-limited histogram equalization (CLAHE) is applied only to the luminance channel (L). Convolutional kernels are defined to enhance edges. To avoid artifacts caused by over-sharpening, 70% of the original image and 30% of the sharpened result are blended. The blended result is then denoised using non-local pixel matching. Finally, gamma correction is applied for color adjustment, resulting in the pre-processed video dataset.
[0038] Step 3: Divide the preprocessed dataset into training, validation, and test sets in an 8:1:1 ratio;
[0039] Step 4: Build a 3D ResNet 18 network model and train it on the video stream dataset to obtain the optimal weight model;
[0040] like Figure 3As shown, the 3D ResNet 18 network model includes a Backbone composed of multiple BasicBlocks, convolutional layers (Conv3d), batch normalization layers (BatchNorm3d), activation functions (ReLU), pooling layers (MaxPool3d, AdaptiveAverage Pool3d), flattened layers, and fully connected layers. The Backbone is composed of several BasicBlocks connected sequentially, with different BasicBlocks undertaking different dimensional feature transformation tasks.
[0041] The backbone network is constructed using repeatedly stacked BasicBlocks as its core components. Each BasicBlock contains operations such as Conv3d, BatchNorm3d, and ReLU. Features are extracted through convolution, training is stabilized through normalization, and non-linearity is introduced through activation functions. The input is 3D data of a specific dimension. The backbone extracts features from the input data layer by layer, progressively building from low-dimensional features to high-dimensional features, thereby obtaining fundamental features containing deep structural information about the data.
[0042] The Conv3d convolutional layer further extracts spatial features from features at different stages, adjusts the number of channels and feature map size, and enhances the expression of local region features; the BatchNorm3d layer normalizes the features after convolution, accelerating training convergence and improving stability; the ReLU activation function introduces non-linearity into the network, increasing the model's expressive power.
[0043] The MaxPool3d pooling layer is used for downsampling, reducing the feature map size and computational cost while retaining key features; the subsequent AdaptiveAveragePool3d(1,1,1) normalizes the feature map size to a uniform size, facilitating subsequent processing.
[0044] The Flatten layer flattens 3D features into a one-dimensional vector, and the Fully Connected layer integrates the feature dimensions from 512 to 2, ultimately outputting the result for a binary classification task. This enables the classification of input 3D data, such as distinguishing between two different states or categories related to a 3D human body.
[0045] Furthermore, in traditional 3D ResNet-18, the first convolutional layer uses stride=1 to preserve the input size, and the max pooling layer uses kernel_size=3 and stride=2 to downsample all dimensions. Subsequent downsampling in residual blocks applies stride=2 to both time and spatial dimensions. The network used in this invention uses stride=1 in the time dimension and stride=2 in the spatial dimension for the first convolutional layer. The max pooling layer also maintains stride=1 in the time dimension, downsampling only in the spatial dimension. Subsequent downsampling in residual blocks still applies stride=2 to all dimensions. This design, by maintaining stride=1 in the time dimension early in the network to retain more temporal dynamic information and using stride=2 in the spatial dimension to quickly compress redundant spatial information, solves the problem of long temporal information loss caused by early synchronous downsampling in traditional 3DResNet, while balancing computational cost through efficient spatial compression.
[0046] By delaying the downsampling of the time dimension, this invention enables the model to better capture slow-moving actions and long-term changes in videos. It has a stronger ability to represent complex behaviors that require understanding across multiple frames, such as the action of falling during cardiac arrest, and reduces feature ambiguity caused by the loss of early temporal information.
[0047] Traditional 3D CNNs, by focusing excessively on spatial details and neglecting sequential relationships, suffer from motion information loss due to over-compression of the temporal dimension. This network model maintains high temporal resolution in the shallow layers of the network, focusing on extracting temporal features, while rapidly downsampling in the spatial dimension to reduce redundant spatial information and focus on key areas during a fall. This forms a "spatiotemporal separation" feature extraction mode, which is more suitable for the analysis of video datasets.
[0048] While retaining more information in the time dimension increases computation to some extent, the fast downsampling in the spatial dimension effectively offsets some of the increased computational cost. Compared to the standard 3DResNet-18, the number of parameters is only slightly increased, and under the same GPU memory constraints, it can process longer video sequences or larger batch sizes.
[0049] like Figure 4 The results shown are the training, validation, and test sets obtained using the pre-built 3DResNet18 training video dataset. To more clearly analyze the training results, the loss rate, accuracy, recall, and specificity metrics in the following three sets of 12 result graphs are presented in a list format with average and maximum values, as shown in Tables 1, 2, and 3.
[0050] Table 1. Analysis of Training Set Evaluation Indicators
[0051]
[0052] Table 2 Analysis of Validation Set Evaluation Indicators
[0053]
[0054] Table 3 Analysis of Test Set Evaluation Indicators
[0055]
[0056]
[0057] Analysis of the training data in the three tables above reveals that the detection network model demonstrated strong potential and practical value during both the training and testing phases. On the training set, the loss rate was as low as 0.0709, with multiple metrics reaching 100%, confirming the model's excellent learning and fitting capabilities. On the test set, the average loss rate was 0.3567, and the accuracy, recall, and specificity reached 87.71%, 88.86%, and 86.30%, respectively, demonstrating good generalization performance. Furthermore, the model exhibited high recall and specificity on the training, validation, and test sets, effectively avoiding missed and false positives, and can, to a certain extent, safeguard life safety in out-of-hospital application scenarios.
[0058] Step 5: Use the best weight model obtained from training to perform inference verification on cardiac arrest falls and general falls.
[0059] like Figure 5 The image shows the results of inference on two types of video data using the same 3DResNet18 network model as the training model. The video for inference is cropped to a fixed size and input into the network model. A 3D convolutional neural network is used to extract spatiotemporal features from the video frames. Based on the extracted features, the probabilities of the two classes are evaluated, the probabilities of the two classes are compared, and the class with the highest probability is extracted as the prediction result. In addition, a dynamic alarm effect is added, using a sine function to generate a periodic flashing effect. When the model detects a cardiac arrest fall in the video, the video flashes red and is labeled "fall" in red. Conversely, the video flashes green and is labeled "Normalfall" in green. A confidence score is added to measure the model's certainty regarding the reliability of the inference results. Figure 5 As shown, the reliability of both classifications is over 99%.
[0060] In summary, this invention provides a method for detecting falls during cardiac arrest based on the ResNet algorithm. It can more accurately distinguish between falls during cardiac arrest and ordinary falls by observing dynamic and continuous falling movements. When applied in out-of-hospital scenarios, it reduces the probability of false alarms during cardiac arrest and provides patients with highly reliable life safety protection.
[0061] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for detecting falls during cardiac arrest in humans based on the ResNet algorithm, characterized in that: include: Collect video stream datasets of human cardiac arrest falls and general falls; The collected video stream dataset is preprocessed using super-resolution and sharpening. The preprocessed dataset is divided into a training set, a validation set, and a test set; Build a 3D ResNet 18 network model, train the network model using the training set, and obtain the optimal weight model; The best-weighted model that has been trained is used to perform inference validation for cardiac arrest falls and general falls; The 3D ResNet 18 network model is built based on 3D convolution and residuals. The model includes an input layer, an initial convolutional layer and a pooling layer, a residual block, a closing layer and an output layer.
2. The method for detecting falls in the human body during cardiac arrest based on the ResNet algorithm according to claim 1, characterized in that: The video information on falls due to cardiac arrest includes information on cases of clutching the heart, falling to the ground and convulsing, falling forward, sitting down, and falling backward. The video information on general falls includes information on cases of tripping, slipping, falling down, and falling due to missteps. The classification label for falls due to cardiac arrest is "fall", and the classification label for general falls is "fall_Nor". The collected video dataset includes fall states of patients in different scenes, under different lighting conditions, and with different body types.
3. The method for detecting falls in the human body based on the ResNet algorithm according to claim 1, characterized in that: Preprocessing of the video stream dataset includes frame-by-frame editing, processing only cardiac data information in segments before and after the fall and at the moment of the fall; The system also employs RealBasicVSR for super-resolution processing of blurry video data in the video stream dataset to obtain high-definition video. Then, bicubic interpolation is used to improve the resolution of the super-resolution video, new pixels are generated by weighted averaging of surrounding pixel values, and the image is converted to the LAB color space. 70% of the original image and 30% of the sharpened image are blended, and the blended result is denoised using non-local pixel matching. Finally, gamma correction is used for color adjustment, resulting in the pre-processed video dataset.
4. The method for detecting falls in the human body during cardiac arrest based on the ResNet algorithm according to claim 1, characterized in that: The video dataset was divided into training, validation, and test sets in a ratio of 8:1:
1.
5. A method for detecting falls in the human body during cardiac arrest based on the ResNet algorithm according to claim 5, characterized in that: The initial convolutional and pooling layers use a 7×7×7 3D convolutional kernel with 64 output channels, stride = (1, 2, 2), a temporal stride of 1 to preserve temporal information, and a spatial stride of 2. The initial convolutional layer is used to extract the spatiotemporal features of the image, and the pooling layer uses max pooling to compress the spatial dimension of the image.
6. The method for detecting falls in the human body during cardiac arrest based on the ResNet algorithm according to claim 5, characterized in that: The residual block includes multiple sets of residual blocks, which are divided into 4 stages according to the number of channels. From the first layer to the fourth layer, the channel changes from 64->128->256->512, and the output dimensions are (64,16,56,56), (128,16,28,28), (256,16,14,14), (512,16,7,7).
7. A method for detecting falls in the human body during cardiac arrest based on the ResNet algorithm according to claim 5, characterized in that: The closing layer includes adaptive average pooling, flattened features, and a fully connected layer. The adaptive average pooling compresses any spatiotemporal dimension to 1×1×1, with an output dimension of (512,1,1,1), unifying the feature dimension and preparing for the fully connected layer.
8. A method for detecting falls in the human body during cardiac arrest based on the ResNet algorithm according to claim 5, characterized in that: When training the 3D ResNet 18 network model: the learning rate was set to 0.001, the momentum to 0.9, the number of training epochs to 100, the batch size to 8, and the video size to 16×224×224.
9. A method for detecting falls in the human body based on the ResNet algorithm according to claim 5, characterized in that: When performing inference verification for cardiac arrest falls and general falls: using the trained optimal model weight file, frames are extracted from the video, converted into tensor format that the model can input, and forward propagation is performed with the preprocessed frames to obtain the final binary classification probability, thereby verifying and detecting cardiac arrest falls and general falls.