Feature extraction method, gait analysis method, recognition method, device and medium

By extracting multi-dimensional information from video frames and training the gait feature extraction model, the problem of insufficient accuracy in gait feature extraction in the existing technology is solved, and higher-accuracy gait analysis and abnormal gait identification are achieved.

CN118212697BActive Publication Date: 2024-09-06SHANGHAI SHANGYONG TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410620243.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-05-20
Publication Date
2024-09-06
Estimated Expiration
2044-05-20

AI Technical Summary

Technical Problem

Gait feature extraction in the existing technology relies on a single piece of information, resulting in inaccurate gait analysis and abnormal gait identification.

Method used

By extracting multiple video frames from the video frame, the coordinate information of the key nodes of the human body, the human body contour information and the time information are obtained. After merging, the gait feature extraction model is input, and the multi-layer fully connected layer and the self-attention mechanism are used for training, and the subject is extracted. The gait characteristics of the tester in each gait cycle stage are analyzed and identified.

Benefits of technology

It improves the accuracy of gait characteristics, enhances the accuracy of gait analysis and abnormal gait identification, and does not rely on other information collection equipment, and has good accessibility and ease of use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118212697B
    Figure CN118212697B
Patent Text Reader

Abstract

In view of the problem in the prior art that the extraction of gait features only relies on single information, resulting in inaccurate gait analysis and abnormal gait recognition of subjects, the present invention provides a feature extraction method, a gait analysis method, an identification method, a device and a medium, which rely on the coordinate information of key nodes of the human body, the contour information of the human body and time information to extract the gait features of the subject at each gait cycle stage. The obtained gait features are more accurate, and gait analysis or abnormal gait recognition based on this has higher accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of gait assessment, and in particular relates to a feature extraction method, a gait analysis method, an identification method, a device and a medium. Background Art

[0002] Human gait depends on the complex interaction of the main parts of the nervous, musculoskeletal and cardiopulmonary systems, and is profoundly influenced by age, personality, emotions, and socio-cultural factors. Gait assessment also has important clinical guidance for the diagnosis of some movement disorders, such as stroke, Parkinson's disease, and osteoarthritis. It is widely used in the elderly or patients with specific diseases, mainly involving gait analysis and abnormal gait recognition of subjects. The premise for achieving both is to extract the gait characteristics of the subjects from the video.

[0003] In the prior art, the extraction of gait features relies on only single information, such as key limb nodes obtained through posture recognition, which results in inaccurate gait analysis and abnormal gait recognition of the subject. Summary of the invention

[0004] Based on this, in order to solve the above technical problems, a feature extraction method, a gait analysis method, a recognition method, a device and a medium are provided.

[0005] The technical solution adopted by the present invention is as follows:

[0006] As a first aspect of the present invention, a gait feature extraction method is provided, characterized in that it includes:

[0007] S101, extracting multiple video frames from a sample video, and replacing some of the multiple video frames with empty frames, wherein the sample video is a video of a pedestrian walking naturally from one end of a trail to the other end;

[0008] S102, obtaining frame information of each video frame that has not been replaced by an empty frame:

[0009] a. Obtain the coordinate information of key human nodes, human body contour information and time information of the video frame;

[0010] b. Merge the coordinate information of the key nodes of the human body, the human body contour information and the time information corresponding to the video frame to obtain the frame information;

[0011] S103, training the gait feature extraction model:

[0012] The gait feature extraction model is connected to at least two fully connected layers to form a gait cycle phase prediction model, each frame information and annotation information is input into the gait cycle phase prediction model, the gait cycle phase of the target leg in the original video frame corresponding to the empty frame is predicted, and the parameters of the gait feature extraction model are updated using a loss function and a training algorithm, wherein the annotation information is the actual gait cycle phase of the target leg in the original video frame;

[0013] S104, extracting multiple video frames from a target video, where the target video is a video of a subject walking naturally from one end of a trail to the other end;

[0014] S105. Obtain frame information of the multiple video frames through steps a and b;

[0015] S106, inputting a plurality of frame information into the trained gait feature extraction model to obtain the gait features of the subject at each gait cycle stage.

[0016] As a second aspect of the present invention, a gait analysis method is provided, comprising:

[0017] Acquire the gait features of the subject at each gait cycle stage according to a gait feature extraction method of the first aspect above;

[0018] The gait characteristics are compared with standard gait characteristics to determine the gait symmetry and stability of the subject.

[0019] As a third aspect of the present invention, a method for identifying abnormal gait is provided, comprising:

[0020] Acquire the gait features of the subject at each gait cycle stage according to a gait feature extraction method of the first aspect above;

[0021] The gait features are input into a trained abnormal gait classification model to identify the abnormal gait category of the subject.

[0022] As a fourth aspect of the present invention, an electronic device is provided, comprising a storage module, wherein the storage module comprises instructions loaded and executed by a processor, wherein the instructions, when executed, cause the processor to execute any of the above methods.

[0023] As a fifth aspect of the present invention, a computer-readable storage medium is provided, which stores one or more programs, and when the one or more programs are executed by a processor, implements the method of any of the above aspects.

[0024] The present invention is different from the prior art in that it relies on the coordinate information of key human nodes, human contour information and time information to extract the gait characteristics of the subject at each gait cycle stage. The obtained gait characteristics are more accurate, and gait analysis or abnormal gait recognition based on this has higher accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The present invention is described in detail below with reference to the accompanying drawings and specific embodiments:

[0026] Figure 1 A flowchart of a gait feature extraction method provided by an embodiment of the present invention;

[0027] Figure 2 A schematic diagram of an electronic device is provided according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] The following will illustrate the implementation methods of the present invention in conjunction with the drawings in the specification. It should be noted that the implementation methods involved in this specification are not exhaustive and do not represent the only implementation methods of the present invention. The following corresponding embodiments are only for the purpose of clearly illustrating the invention content of the patent of the present invention, and are not intended to limit its implementation methods. For ordinary technicians in this field, different forms of changes and modifications can be made on the basis of the description of this embodiment. All obvious changes or modifications that belong to the technical concept and invention content of the present invention are also within the scope of protection of the present invention.

[0029] like Figure 1 As shown, the embodiment of the present application provides a gait feature extraction method, and its specific process is as follows:

[0030] S101. Extract multiple video frames from a sample video, and replace some of the multiple video frames with empty frames (marked as MASK).

[0031] The sample video is a video of a pedestrian walking naturally from one end of the trail to the other end from a side (left or right) perspective.

[0032] When extracting video frames, the corresponding frame rate can be set as needed, such as 12 frames per second. Each video frame includes its corresponding frame image and time.

[0033] Exemplarily, the number of partial video frames replaced by empty frames may be 10% of all extracted video frames.

[0034] S102, obtaining frame information of each video frame that has not been replaced by an empty frame:

[0035] a. Obtain the coordinate information of the key nodes of the human body, the human body contour information and the time information of the video frame:

[0036] The coordinate matrix of the key nodes of the human body is identified from the video frame, and the coordinate matrix is ​​encoded. The resulting code is the coordinate information of the key nodes of the human body. The video frame can be input into the posture recognition framework of OpenPose, the coordinate matrix of the key nodes of the human body can be identified in the form of a 25-point human body model, and the coordinate matrix can be input into the first encoding model (a fully connected layer) to obtain a key node code of the human body with a length of 256, that is, the vector is changed from sparse to dense.

[0037] The video frame is segmented to obtain a human body contour image, and the human body contour image is encoded, and the resulting code is the human body contour information. The video frame can be input into the UNet-based image segmentation model, the recognized human body contour is marked as black, and the surrounding background environment is marked as white, to obtain a binary human body contour image, and the human body contour image is input into the second encoding model (convolutional neural network) to obtain a human body contour code with a length of 256.

[0038] Get the corresponding time from the video frame, encode the time, and the resulting code is the above time information. The time can be expressed in milliseconds, and the position code is performed through sine and cosine trigonometric functions to obtain a time position code with a length of 256:

[0039] ,

[0040] Among them, pos represents the time corresponding to the video frame, dim represents the coding length, 2i represents the even frame, 2i+1 represents the odd frame, i is a natural number, PE(pos,2i) represents the time position coding of the even frame, and PE(pos,2i+1) represents the time position coding of the odd frame.

[0041] It can be seen that the lengths of the codes are equal. Of course, the length of the codes is not limited to 256. A longer code length can be used to improve the accuracy of the model, or a shorter length can be used to reduce resource requirements and improve model efficiency.

[0042] The purpose of the above encoding is to map information of different dimensions to vectors of the same length for representation, so as to facilitate subsequent model calculations.

[0043] b. Combine the human body key node coordinate information, human body contour information and time information corresponding to the video frame to obtain frame information.

[0044] In this embodiment, three codes corresponding to the same video frame are added together. Of course, the three codes may also be combined in other ways, such as horizontally splicing the three codes.

[0045] S103, training the gait feature extraction model:

[0046] The gait feature extraction model is connected to at least two fully connected layers to form a gait cycle stage prediction model. The frame information and annotation information are input into the gait cycle stage prediction model. The gait feature extraction model extracts gait features, and the extracted gait features are input into the fully connected layer to predict the gait cycle stage of the target leg in the original video frame corresponding to the empty frame. The parameters of the gait feature extraction model are updated using the loss function and training algorithm.

[0047] Among them, the gait feature extraction model is a deep learning model based on the self-attention mechanism.

[0048] It should be pointed out that, in the process of training the gait feature extraction model, the first encoding model and the second encoding model in step S102 and the fully connected layer in step S103 are actually also trained.

[0049] The gait cycle stages are the eight stages of gait during the entire walking process, including five stages of the support phase, namely the initial landing phase, the load-bearing response phase, the middle support phase, the end support phase, and the early swing phase, and three stages of the swing phase, namely the early swing phase, the middle swing phase, and the end swing phase. In this embodiment, the target leg is designated as the right leg, but it can also be the left leg. The annotation information is the actual gait cycle stage of the target leg in the original video frame.

[0050] It should be pointed out that the result output by the gait cycle stage prediction model is actually relative to the confidence of each gait cycle stage. The gait cycle stage with the highest confidence is taken as the predicted gait cycle stage. For the annotation information, assuming that the actual gait cycle stage of the target leg in the original video frame is the initial landing stage, the initial landing stage is marked as 1, and the other stages are marked as 0.

[0051] In this embodiment, the loss function adopts the cross entropy function, and the training algorithm adopts the gradient descent algorithm.

[0052] S104: extract multiple video frames from the target video.

[0053] To shoot the target video, you need to prepare a 10-meter-long straight trail. Use a monocular camera 5 meters away from the center of the trail and perpendicular to the trail to shoot a complete video of the subject walking naturally from one end of the trail to the other end from a fixed point on the side.

[0054] The frame rate of extracting multiple video frames can be adjusted according to the performance of the device, see S101.

[0055] S105. Obtain frame information of multiple video frames through the above steps a and b.

[0056] S106, inputting the multiple frame information into the trained gait feature extraction model to obtain the gait features of the subject at each gait cycle stage.

[0057] Among them, gait characteristics include the duration, step length and speed of each gait cycle stage.

[0058] In the above process, a video of a pedestrian walking naturally from one end of the trail to the other end from a side (left or right) perspective is selected as a sample video, and a gait feature extraction model corresponding to the side perspective is trained. It can be understood that a video of a pedestrian walking naturally from one end of the trail to the other end from a front perspective of the trail is selected as a sample video, and a gait feature extraction model corresponding to the front perspective can be trained by the above steps S101-S103. Similarly, a video of a pedestrian walking naturally from one end of the trail to the other end from a rear perspective of the trail is selected as a sample video, and a gait feature extraction model corresponding to the rear perspective can also be trained.

[0059] Therefore, when extracting gait features, a monocular camera can also be used to shoot a complete video of the subject walking naturally from one end of the trail to the other end from a fixed point on the front or back side of the trail, and use the video as the target video. Through steps S104-S106, the gait features of the subject at each gait cycle stage can be extracted from the target video by the gait feature extraction model of the corresponding perspective.

[0060] In order to further improve the accuracy of gait features, multiple videos of the subject walking naturally from one end of the trail to the other end at any multiple of the three perspectives (side, front and back, and back) mentioned above can be shot as target videos. Through steps S104 and S105, frame information corresponding to different target videos is obtained. In step S106, the frame information corresponding to different target videos is respectively input into the gait feature extraction models of the corresponding perspectives, and the gait features of the subject at each gait cycle stage output by each gait feature extraction model are spliced ​​to obtain the final gait features of the subject at each gait cycle stage.

[0061] For example, a monocular camera located on the side of the trail and a monocular camera located behind the trail can be used to simultaneously film the subject walking naturally from one end of the trail to the other end to obtain two target videos. The two target videos are respectively input into a gait feature extraction model corresponding to the side perspective and a gait feature extraction model corresponding to the rear perspective. When the output results of the two models are spliced, the gait features corresponding to the same gait cycle stage are horizontally spliced ​​to obtain the final gait features of the subject at each gait cycle stage.

[0062] Similar to the above concept, the embodiment of the present invention also provides a gait analysis method, the process of which is as follows:

[0063] S201. Obtain the gait features of the subject at each gait cycle stage by using the above gait feature extraction method.

[0064] S202. Compare the gait characteristics with standard gait characteristics to determine the gait symmetry and stability of the subject.

[0065] Similar to the above concept, an embodiment of the present invention also provides an abnormal gait recognition method, the process of which is as follows:

[0066] S301. Obtain the gait features of the subject at each gait cycle stage by using the above gait feature extraction method.

[0067] S302: Input the gait features into the trained abnormal gait classification model to identify the abnormal gait category of the subject.

[0068] Among them, abnormal gait categories include scissors gait, hemiplegic gait, ataxia gait and so on.

[0069] The above classification model can adopt a multi-classification model of softmax logistic regression, use the output of the feature extraction model as the input of the classification model, use cross entropy as the loss function, train the multi-classification model, and realize the classification of abnormal gait. Of course, other common classification and discrimination models can also be used.

[0070] From the above, it can be seen that this embodiment is different from the prior art. It relies on multi-dimensional information: coordinate information of key nodes of the human body, human body contour information and time information to extract the gait characteristics of the subject at each gait cycle stage. The obtained gait characteristics are more accurate, and gait analysis or abnormal gait recognition based on this has higher accuracy.

[0071] In addition, the present embodiments all rely on a monocular camera instead of other information collection devices (wearable sensors or professional detection equipment), and have obvious advantages in accessibility and ease of use.

[0072] Same as above idea, Figure 2 A schematic block diagram of the structure of an electronic device provided by an embodiment of the present invention is shown.

[0073] Exemplarily, the electronic device includes a storage module 21 and a processor 22, the storage module 21 includes instructions loaded and executed by the processor 22, and when the instructions are executed, the processor 22 executes any of the above methods in this specification.

[0074] It should be understood that the processor 22 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0075] A computer-readable storage medium is also provided in an embodiment of the present invention. The computer-readable storage medium stores one or more programs. When the one or more programs are executed by a processor, any of the above methods is implemented.

[0076] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware implementation, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable storage medium, which may include a computer-readable storage medium (or a non-transitory medium) and a communication medium (or a temporary medium).

[0077] As is known to those of ordinary skill in the art, the term computer-readable storage media includes volatile and nonvolatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer-readable storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. In addition, it is known to those of ordinary skill in the art that communication media typically contain computer-readable instructions, data structures, program modules or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and may include any information delivery medium.

[0078] Exemplarily, the computer-readable storage medium may be an internal storage module of the electronic device of the aforementioned embodiment, such as a hard disk or memory of the electronic device. The computer-readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash card (FlashCard), etc. equipped on the electronic device.

[0079] The electronic device and computer-readable storage medium provided in the aforementioned embodiments extract the gait characteristics of the subject at each gait cycle stage based on the coordinate information of key nodes of the human body, the contour information of the human body and the time information. The obtained gait characteristics are more accurate, and gait analysis or abnormal gait recognition based on this has higher accuracy.

[0080] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A gait feature extraction method, characterized in that: include: S101, extracting multiple video frames from a sample video, and replacing some of the multiple video frames with empty frames, wherein the sample video is a video of a pedestrian walking naturally from one end of a trail to the other end; S102, obtaining frame information of each video frame that has not been replaced by an empty frame: a. Obtain the coordinate information of key human nodes, human body contour information and time information of the video frame; b. Merge the coordinate information of the key nodes of the human body, the human body contour information and the time information corresponding to the video frame to obtain the frame information; S103, training the gait feature extraction model: The gait feature extraction model is connected to at least two fully connected layers to form a gait cycle phase prediction model, each frame information and annotation information is input into the gait cycle phase prediction model, the gait cycle phase of the target leg in the original video frame corresponding to the empty frame is predicted, and the parameters of the gait feature extraction model are updated using a loss function and a training algorithm, wherein the annotation information is the actual gait cycle phase of the target leg in the original video frame; S104, extracting multiple video frames from a target video, where the target video is a video of a subject walking naturally from one end of a trail to the other end; S105, obtaining frame information of the plurality of video frames through a and b; S106. Input multiple frame information into the trained gait feature extraction model to obtain the gait features of the subject at each gait cycle stage, wherein the gait features include the duration, step length and speed of each gait cycle stage, which are used for medical gait analysis or abnormal gait identification.

2. A gait feature extraction method according to claim 1, characterized in that: The a further comprises: Identifying a coordinate matrix of key human body nodes from the video frame, encoding the coordinate matrix, and the resulting code is the coordinate information of the key human body nodes; Performing image segmentation on the video frame to obtain a human body contour image, encoding the human body contour image, and the obtained code is the human body contour information; Obtaining corresponding time from the video frame, encoding the time, and the obtained code is the time information; Among them, the length of each code is equal; Said b further comprises: Add the three codes corresponding to the same video frame.

3. A gait feature extraction method according to claim 2, characterized in that: The encoding of the coordinate matrix further comprises: The coordinate matrix is ​​input into a fully connected layer to obtain a body key node encoding with a length of 256.

4. A gait feature extraction method according to claim 2, characterized in that: The encoding of the human body contour image further comprises: The human body contour image is input into a convolutional neural network to obtain a human body contour code with a length of 256.

5. A gait feature extraction method according to claim 2, characterized in that: The encoding of the time further comprises: The time is expressed in milliseconds and position-coded by sine and cosine trigonometric functions to obtain a time position code with a length of 256: , Among them, pos represents the time corresponding to the video frame, dim represents the coding length, 2i represents the even frame, 2i+1 represents the odd frame, i is a natural number, PE(pos,2i) represents the time position coding of the even frame, and PE(pos,2i+1) represents the time position coding of the odd frame.

6. A gait feature extraction method according to claim 2, characterized in that: Also includes: Three gait feature extraction models are respectively trained by the steps S101-S103 through sample videos of three perspectives, wherein the three perspectives are a side perspective of the trail, a front perspective of the trail, and a rear perspective of the trail; Selecting a video of a subject walking on a trail at any one of the three viewing angles as the target video, and extracting the gait features of the subject through steps S104-S106; Alternatively, a video of a subject walking on a trail under any multiple of the three perspectives is selected as the target video, and frame information corresponding to different target videos is obtained through steps S104 and S105. In step S106, the frame information corresponding to different target videos is respectively input into corresponding gait feature extraction models, and the gait features output by each gait feature extraction model are spliced ​​to obtain the gait features of the subject.

7. A gait analysis method, characterized in that: include: A gait feature extraction method according to any one of claims 1 to 6, obtaining gait features of a subject at each gait cycle stage; The gait characteristics are compared with standard gait characteristics to determine the gait symmetry and stability of the subject.

8. A method for identifying abnormal gait, characterized in that: include: A gait feature extraction method according to any one of claims 1 to 6, obtaining gait features of a subject at each gait cycle stage; The gait features are input into a trained abnormal gait classification model to identify the abnormal gait category of the subject.

9. An electronic device, characterized in that: The method comprises a storage module, wherein the storage module comprises instructions loaded and executed by a processor, wherein the instructions, when executed, cause the processor to perform the method according to any one of claims 1 to 8.

10. A computer-readable storage medium storing one or more programs, characterized in that: When the one or more programs are executed by a processor, the method according to any one of claims 1 to 8 is implemented.