A lightweight gait gender recognition method
By preprocessing and feature extraction of portrait gait images, effective gait feature combinations were selected, and gender classification was used by support vector machines, which solved the problems of low clarity and high computational complexity of long-distance acquisition of gait videos, and achieved high-precision and lightweight gender recognition effect.
Patent Information
- Application Number
- CN202211701569.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-28
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2042-12-28
AI Technical Summary
The existing gait recognition methods collect human gait videos at long distances have low clarity, poor recognition effect, and high computational complexity, which cannot meet the requirements of intelligent video surveillance systems for real-time and accuracy.
By graying, morphological processing, portrait contour and skeleton extraction of portrait gait images, gait features related to portrait aspect ratio, center of mass height, partition angle and partition distance were extracted, and one-way ANOVA screening features were used, and support vector machine was used for gender classification.
It realizes high-precision gender recognition, significantly reduces the amount of data, makes the model lightweight, and the classification accuracy rate reaches 91.94%, meeting the real-time and accuracy requirements of the intelligent video surveillance system.
Smart Images

Figure CN116168446B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of pattern recognition, and particularly relates to a lightweight gait gender recognition method. Background Art
[0002] Gait refers to the continuously changing posture of a person during walking and is one of the important biometric characteristics of humans. Gait recognition not only has the common advantages of biometric technologies such as uniqueness, easy to carry, and difficult to forget, but also has unique advantages such as long-distance recognition, difficult to hide, non-contact, and non-invasive, and plays an important role in fields such as biometric authentication, clinical medicine, intelligent monitoring, and legal assistance. In an intelligent video surveillance system, the distance between the camera and the person is usually relatively far, making it difficult to collect accurate biometric characteristics such as faces and fingerprints. Moreover, these biometric characteristics can be easily hidden by wearing masks, hats, etc. Collecting gait characteristics from blurred human motion videos has become an important way to obtain pedestrian identity information. Gender recognition based on gait analysis, as a sub-research field of gait recognition, has broad application prospects. The initial screening of gender classification for a large number of target objects can reduce the target range to be locked by half. This technology can also be applied to statistics of the male-female ratio of passenger flow in public places and perform data analysis related to gender.
[0003] Currently, researchers have proposed many gait recognition methods, such as those based on the positions of side luminous points during human walking, human structure information and dynamic information, pendulum models, ellipse models, neural networks, etc. Although the gender recognition accuracy of these methods has been improved, the computational complexity has also become larger. Kinematic data refers to the changes in angles and distances between various parts and joints of the human body during walking, that is, the change data of human postures. From the perspective of biomechanics, a person's gait is the comprehensive movement of hundreds of muscles and joints in the body, and the differences can be used for biometric recognition. Based on human kinematic data, this paper proposes a lightweight gait gender recognition method, which achieves a good gender recognition effect using simple-to-compute gait characteristics. There are mainly two challenges in this work: (1) The clarity of the human gait video collected by the camera at a long distance is low, and the recognition effect is poor. (2) The calculation amount of gait characteristics based on models, neural networks, and entropy is large, and the recognition effect of simple characteristics such as stride frequency and stride length is poor, and neither can meet the requirements of real-time performance and accuracy of the intelligent video surveillance system at the same time. Summary of the Invention
[0004] To overcome the deficiencies of the prior art, the present invention provides a lightweight gait gender recognition method. First, the original portrait gait images are grayscaled, binarized, morphologically processed, the portrait contour is extracted, and the portrait skeleton is extracted. Then, 41 gait features related to the aspect ratio of the portrait, the centroid height of the portrait, the lower limb partition angle, and the lower limb partition distance are extracted based on kinematics. Subsequently, the single-factor variance analysis method is used to analyze the influence of each feature on gender, and 7 features are selected to form the most effective feature combination. Finally, the support vector machine method is used for gender classification. The method of the present invention can effectively perform gender recognition, improve the recognition accuracy, and at the same time significantly reduce the data volume, making the model lightweight.
[0005] The technical solution adopted by the present invention to solve its technical problems includes the following steps:
[0006] Step 1: Use an open-source gait recognition dataset to preprocess the data and divide it into a training set, a validation set, and a test set;
[0007] Step 2: Image preprocessing;
[0008] (1) Grayscaling and binarization; Convert the RGB image into a grayscale image and then into a binary image, removing the color of the original image and only retaining the contour texture information of the portrait;
[0009] (2) Morphological processing; Perform morphological processing of opening and closing operations on the image to solve the problems of local defects and redundancies in the binary image, and at the same time smooth the boundary lines of the portrait;
[0010] (3) Portrait contour extraction: Use the Sobel operator to perform edge detection on the portrait to obtain the portrait contour map;
[0011] (4) Portrait skeleton extraction; Use the Zhang-Suen thinning algorithm to extract the human skeleton, and by means of logical operations, cyclically delete the non-skeleton pixel points in the image;
[0012] Step 3: Gait feature extraction;
[0013] Based on kinematic data, select gait features related to the aspect ratio of the portrait, the centroid height, the partition angle, and the partition distance for extraction;
[0014] (1) Gait features related to the aspect ratio;
[0015] The ratio of the width to the height of the minimum bounding rectangle of the portrait is the aspect ratio of the portrait; during human walking, the arms and legs swing back and forth periodically, so the width and height of the minimum bounding rectangle of the portrait will also change periodically with the swing of the legs;
[0016] Extract the aspect ratio data for each frame of the gait image, create a scatter plot and connect the dots to obtain the change curve of the human figure aspect ratio. Further calculate the gait cycle, maximum aspect ratio, maximum aspect ratio change rate, minimum aspect ratio, minimum aspect ratio change rate, aspect ratio change range, aspect ratio average value, and aspect ratio variance as gait feature values related to the human figure aspect ratio;
[0017] (2) Gait features related to the centroid height;
[0018] The average of the horizontal and vertical coordinates of the pixel points of the human figure contour or human figure skeleton is the centroid position, and the calculation method is as follows:
[0019]
[0020]
[0021] Among them, N is the number of pixel points of the human figure contour or skeleton, x i is the horizontal coordinate of the i-th pixel point, and y i is the vertical coordinate of the i-th pixel point; further calculate the maximum value, minimum value, change range, average value, and variance of the centroid vertical coordinate as gait feature values related to the human centroid height;
[0022] (3) Gait features related to the partition angle;
[0023] Taking the human figure centroid position as the origin, the horizontal direction as the x-axis, and the vertical direction as the y-axis to establish a new coordinate system; the partition angle feature refers to the swinging situation of the left and right legs of the human body during walking, that is, the angle change feature of the contour pixel points in the lower left area and the lower right area relative to the centroid in the new coordinate system; there are two steps to calculate the average value of the lower left partition angle:
[0024] First, find the angle between each pixel point in the lower left partition and the axis, and the calculation method is as follows:
[0025]
[0026] Among them, θ i 、x i 、y i are the angle, horizontal coordinate, and vertical coordinate of the i-th pixel point respectively;
[0027] Second, sum and average the angles obtained for each pixel point in the lower left partition to obtain the angle feature value of the partition of this image.
[0028] Calculate the average angle of the lower right partition; calculate the average angles of the lower left and lower right partitions for each gait sequence image of the same person, make a scatter plot of the average partition angle data and connect adjacent points to obtain the change curves of the average angles of the lower left and lower right partitions of the same person; further calculate the maximum value, minimum value, maximum change rate, minimum change rate, change range, average value, and variance of the partition angles as the gait feature values related to the body partition angles;
[0029] (4) Gait features related to partition distance;
[0030] The partition distance feature refers to the position change characteristics of the left and right legs of the human body during walking, that is, the position change characteristics of the lower left region contour and the lower right region contour relative to the centroid in the new coordinate system; the method for calculating the partition distance is divided into two steps:
[0031] First, find the distance between each pixel point in the partition and the centroid;
[0032] Second, calculate the average value of the distances;
[0033] For each gait sequence image of the same person, obtain the average distances of the lower left and lower right partitions respectively, make a scatter plot of the average partition distance data and connect adjacent points to obtain the change curves of the average distances of the lower left and lower right partitions of the same person; further calculate the maximum value, minimum value, maximum change rate, minimum change rate, change range, average value, and variance of the partition distance as the gait feature values related to the body partition distance;
[0034] Step 4: Gait feature screening;
[0035] Calculate the influence of features on gender through one-way ANOVA, and use Naive Bayes and Support Vector Machine classifiers to verify the classification effects of different feature combinations, so as to screen out the most effective feature combination;
[0036] Step 4-1: Sort the features according to the effectiveness of gender recognition; use the method of one-way ANOVA to calculate the significance values of each feature data for gender; calculate the significance results of each feature control factor for the gender dependent variable, and sort them in ascending order to obtain the ranking of feature effectiveness;
[0037] Step 4-2: Screen out the most effective feature combination; according to the ranking obtained in Step 4-1, the optimal feature combination should be the feature combination composed of the first n features starting from the first feature; use Naive Bayes and Support Vector Machine classifiers to calculate the gender recognition accuracy rates of different feature combinations respectively, and screen out the feature combination with the highest accuracy rate;
[0038] Step 5: Gait gender classification; use a Support Vector Machine classifier to classify the gender of gait images based on the best feature combination calculated in Step 4.
[0039] Preferably, the detection principle of the Sobel operator is to calculate the image gradient using a first-order differential equivalent operator, that is, to find the first-order gray derivative to determine the edge position; the gradient represents the edge strength and direction of an image f at the position (x, y), and is defined as follows:
[0040]
[0041] The magnitude of the gradient vector is expressed as follows:
[0042]
[0043] The direction of the gradient vector is expressed as follows:
[0044]
[0045] For a two-dimensional image with horizontal and vertical directions, the Sobel operator performs a convolution operation on the image using convolution templates in horizontal and vertical directions, specifically as follows:
[0046]
[0047] The gradient value of the position pixel is obtained by using the approximate calculation in the gradient vector magnitude calculation formula; the gradient image is subjected to threshold binarization processing. If the gradient value is greater than the threshold, the pixel point is an edge point; otherwise, it is not an edge point.
[0048] Preferably, in the extraction of the human figure skeleton, each iteration analyzes whether the pixel values of the eight neighboring pixel points of the pixel point meet the deletion conditions;
[0049] The iterative process is divided into the following two steps, and these two steps are executed in a loop until no pixel points need to be deleted. At this time, the region formed by the remaining points is the skeleton;
[0050] ① Loop through all the pixel points inside the region where the skeleton is to be extracted, and delete the pixel points that simultaneously meet the following 4 conditions:
[0051] 2 ≤ N(P1) ≤ 6
[0052] S(P1) = 1
[0053] P2·P3·P4 = 0
[0054] P4·P6·P8 = 0
[0055] ② Loop through all the pixel points inside the region where the skeleton is to be extracted, and delete the pixel points that simultaneously meet the following 4 conditions:
[0056] 2 ≤ N(P1) ≤ 6
[0057] S(P1) = 1
[0058] P2·P4·P8 = 0
[0059] P2·P6·P8 = 0
[0060] Among them, N(P1) represents the number of all pixel points inside the skeleton region to be extracted among the 8 neighborhood pixel points of P1; S(P1) represents the number of times the pixel values in the neighborhood of P1 change from 0 to 1 in the order of P2, P3, P4, P5, P6, P7, P8, P9, P2.
[0061] The beneficial effects of the present invention are as follows:
[0062] Based on human kinematics, the present invention extracts and screens gait features related to the aspect ratio of the human figure, the height of the centroid, the partition angle, and the partition distance when a person walks, and uses a support vector machine for gender classification. Experiments show that the classification accuracy of the model reaches up to 91.94%, 7 features are used, covering all feature types. This result shows that the four types of gait features extracted by the present invention all have a positive impact on gender recognition, and lightweight gait features can still achieve good gender recognition effects. Description of the Drawings
[0063] Figure 1 It is a flowchart of the method of the present invention.
[0064] Figure 2 It is a diagram of the neighborhood position relationship of the method of the present invention. Detailed Embodiment
[0065] The present invention will be further described below in conjunction with the drawings and embodiments.
[0066] A lightweight gait gender recognition method. The present invention utilizes the following principles: The gait of a person is the comprehensive movement of hundreds of muscles and joints in the body. There are differences in bones and muscles between different human bodies. Effectively extracting the posture change features when a person walks can achieve lightweight gender recognition: (1) Based on human kinematics, extracting gait features related to the aspect ratio of the human figure, the height of the centroid of the human figure, the partition angle of the lower limbs, and the partition distance of the lower limbs can effectively perform gender recognition; (2) One-way ANOVA can calculate the significance values of each feature data for gender, and thus screen features; (3) Performing morphological processing on the human figure, extracting the contour and skeleton of the human figure can improve the recognition accuracy and significantly reduce the amount of data at the same time, making the model lightweight.
[0067] A lightweight gait gender recognition method, including the following steps:
[0068] Step 1: Collect open-source datasets related to gait recognition, preprocess the data, and divide it into training sets, validation sets, and test sets to support the subsequent training of the model.
[0069] Step 2: Image preprocessing. The gait images of human figures collected at a distance are often of low clarity, with problems such as missing, redundant, and blurred outlines in the human figure area. Image preprocessing operations can repair the above-mentioned picture problems and greatly reduce the data volume of the images, thereby improving the recognition efficiency and accuracy.
[0070] (1) Grayscale conversion and binarization. Convert the RGB image into a grayscale image and then into a binary image, removing the color of the original picture and only retaining the contour texture information of the human figure.
[0071] (2) Morphological processing. Perform morphological processing of opening and closing operations on the image to solve the problems of local defects and redundancies in the binary image, and at the same time smooth the boundary lines of the human figure to make the contour clearer and more accurate.
[0072] (3) Extraction of human figure contours. Use the Sobel operator to perform edge detection on the human figure to obtain the human figure contour map. The detection principle is to calculate the image gradient using the first-order differential equivalent operator, that is, to find the first-order gray derivative to determine the edge position. The gradient represents the edge intensity and direction of an image f at the position (x, y), and is defined as follows:
[0073]
[0074] The magnitude of the gradient vector is expressed as follows:
[0075]
[0076] The direction of the gradient vector is expressed as follows:
[0077]
[0078] A two-dimensional image has horizontal and vertical directions. The Sobel operator uses convolution templates in the horizontal and vertical directions to perform convolution operations with the image, specifically as follows:
[0079]
[0080] Generally, the approximate calculation in the gradient vector magnitude calculation formula is used to obtain the position pixel gradient value. The directly calculated edge pixel points are not precise enough. In order to remove the pseudo-edges and obtain a clearer binary edge image, threshold binarization processing needs to be performed on the gradient image. If the gradient value is greater than the threshold, then the pixel point is an edge point; otherwise, it is not an edge point.
[0081] (4) Human skeleton extraction. The Zhang-Suen thinning algorithm is used to extract the human skeleton. By means of logical operations, non-skeleton pixel points in the image are cyclically deleted. In each iteration, it is analyzed whether the pixel values of the eight neighboring pixel points of the pixel point meet the deletion conditions, and the neighborhood positional relationship is as shown in Figure 2 shown:
[0082] The iterative process is divided into the following two steps, and these two steps are cyclically executed until no pixel points need to be deleted. At this time, the area formed by the remaining points is the skeleton.
[0083] ① Cycle through all pixel points inside the area where the skeleton is to be extracted, and delete the pixel points that simultaneously meet the following 4 conditions:
[0084] 2 ≤ N(P1) ≤ 6
[0085] S(P1) = 1
[0086] P2·P3·P4 = 0
[0087] P4·P6·P8 = 0
[0088] ② Cycle through all pixel points inside the area where the skeleton is to be extracted, and delete the pixel points that simultaneously meet the following 4 conditions:
[0089] 2 ≤ N(P1) ≤ 6
[0090] S(P1) = 1
[0091] P2·P4·P8 = 0
[0092] P2·P6·P8 = 0
[0093] Among them, N(P1) represents the number of all pixel points inside the area where the skeleton is to be extracted among the 8 neighboring pixel points of P1; S(P1) represents the number of times the pixel values in the neighborhood of P1 change from 0 to 1 in the order of P2, P3, P4, P5, P6, P7, P8, P9, P2.
[0094] Step 3: Gait feature extraction. Based on human kinematic data, according to the principle of high gender discrimination, easy acquisition, and easy calculation of features, 41 lightweight gait features related to the aspect ratio of the human figure, centroid height, partition angle, and partition distance are selected for extraction.
[0095] (5) Gait features related to the aspect ratio.
[0096] The ratio of the width to the height of the minimum bounding rectangle of a human figure is the aspect ratio of the human figure. During the walking process of a human body, the arms and legs swing back and forth periodically, so the width and height of the minimum bounding rectangle of the human figure will also change periodically with the swing of the legs. The aspect ratio is related to the height, body fat, swing amplitude of the arms, and swing amplitude of the legs of the human body.
[0097] Extract the aspect ratio data for each frame of the gait image, make a scatter plot and connect the dots to obtain the aspect ratio change curve of the human figure. Further calculate the gait cycle, maximum aspect ratio, maximum aspect ratio change rate, minimum aspect ratio, minimum aspect ratio change rate, aspect ratio change range, aspect ratio average value, and aspect ratio variance as gait feature values related to the aspect ratio of the human figure.
[0098] (6) Gait features related to the centroid height.
[0099] The average of the horizontal and vertical coordinates of the pixel points of the human figure contour or human figure skeleton is the centroid position, and the calculation method is as follows:
[0100]
[0101]
[0102] where N is the number of pixel points of the human figure contour or skeleton, x i is the horizontal coordinate of the i-th pixel point, and y i is the vertical coordinate of the i-th pixel point. Further calculate the maximum value, minimum value, change range, average value, and variance of the centroid vertical coordinate as gait feature values related to the centroid height of the human body.
[0103] (7) Gait features related to the partition angle.
[0104] Taking the centroid position of the human figure as the origin, the horizontal direction as the x-axis, and the vertical direction as the y-axis to establish a new coordinate system. The partition angle feature refers to the swing situation of the left leg and the right leg during the walking process of the human body, that is, the angle change feature of the contour pixel points in the lower left area and the lower right area relative to the centroid in the new coordinate system. There are two steps to calculate the average value of the lower left partition angle:
[0105] First, find the angle between each pixel point in the lower left partition and the axis, and the calculation method is as follows:
[0106]
[0107] where θ i 、x i 、y i are the angle, horizontal coordinate, and vertical coordinate of the i-th pixel point respectively.
[0108] Second, sum up all the angles and take the average to obtain the angle feature value of the partition of the image.
[0109] Similarly, the average angle of the lower right partition can be calculated. For each gait sequence image of the same person, the average angles of the lower left and lower right partitions are calculated. The average partition angle data is made into a scatter plot and adjacent points are connected to obtain the change curves of the average angles of the lower left and lower right partitions of the same person. Further, seven values, namely the maximum value, minimum value, maximum change rate, minimum change rate, change range, average value, and variance of the partition angle, are calculated as gait feature values related to the body partition angle.
[0110] (8) Gait features related to partition distance.
[0111] Similar to the partition angle, the partition distance feature refers to the position change feature of the left and right legs of the human body during walking, that is, the position change feature of the lower left region contour and the lower right region contour relative to the centroid in the new coordinate system. The method for calculating the partition distance is also divided into two steps:
[0112] First, calculate the distance between each pixel point in the partition and the centroid;
[0113] Second, calculate the average value of the distances.
[0114] For each gait sequence image of the same person, the average distances of the lower left and lower right partitions are obtained respectively. The average partition distance data is made into a scatter plot and adjacent points are connected to obtain the change curves of the average distances of the lower left and lower right partitions of the same person. Further, the maximum value, minimum value, maximum change rate, minimum change rate, change range, average value, and variance of the partition distance are calculated as gait feature values related to the body partition distance
[0115] Step 4: Gait feature screening. Calculate the influence of features on gender through one-way ANOVA, and verify the classification effects of different feature combinations using Naive Bayes and Support Vector Machine classifiers, so as to screen out the most effective feature combination.
[0116] (1) Sort the features according to the effectiveness of gender recognition. Use the method of one-way ANOVA to calculate the significance values of each feature data for gender. Theoretically, the smaller the significance value, the greater the influence. Thus, calculate the significance results of each feature control factor for the gender dependent variable and sort them in ascending order to obtain the ranking of feature effectiveness.
[0117] (2) Screen out the most effective feature combination. According to the ranking obtained in the previous step, the optimal feature combination should be the feature combination composed of the first n features starting from the first feature. If n is too small, effective features may be missed; if n is too large, invalid and negative features will be added, reducing the classification accuracy. Calculate the gender recognition accuracy rates of different feature combinations using Naive Bayes and Support Vector Machine classifiers respectively, and screen out the feature combination with the best effect.
[0118] Step 5: Gait gender classification. Use a support vector machine classifier to classify the gender of the gait images based on the optimal feature combination calculated in the previous step. Specific embodiments:
[0120] Step 1: Collect open-source datasets related to gait recognition, preprocess the data, divide the training set and the test set, and provide support for the subsequent training of the model. Taking the gait image sequence dataset at a 90° shooting angle and under the condition of normal walking of the subjects in the CASIA-Dataset B database as an example: This dataset has a total of 124 gait samples, including 31 females and 93 males. In order to enable the classifier to achieve better gender recognition results, the male-female ratio of the training sample set needs to reach 1:1. Sort the samples by height and screen them proportionally. First, divide the 93 male sample sets into two groups of 31 and 62; then further divide the training set and the test set according to the following two methods to obtain two training and prediction datasets: (1) 42 samples with an equal number of males and females are used to train the classifier, and 20 samples with an equal number of males and females are used as the prediction set to detect the effect of the classifier; (2) 62 samples with an equal number of males and females are used to train the classifier, and the remaining 62 male samples are used to verify the accuracy of the classifier.
[0121] Step 2: Image preprocessing. (1) Grayscale and binarization. Convert the RGB image into a grayscale image and then into a binary image, removing the color of the original image and only retaining the contour texture information of the human figure. (2) Morphological processing. Perform morphological processing of opening and closing operations on the image to solve the problems of local defects and redundancies in the binary image, and at the same time smooth the boundary lines of the human figure. (3) Human figure contour extraction. Use the Sobel operator to perform edge detection on the human figure to obtain the human figure contour map. (4) Human figure skeleton extraction. Adopt the Zhang-Suen thinning algorithm to extract the human body skeleton.
[0122] Step 3: Gait feature extraction. Based on human kinematic data, according to the principle of high gender discrimination, easy acquisition, and easy calculation of features, select 41 lightweight gait features related to the aspect ratio of the human figure, centroid height, partition angle, and partition distance for extraction.
[0123] Step 4: Gait feature screening. Calculate the influence of features on gender through one-way analysis of variance, and use the Naive Bayes and support vector machine classifiers to verify the classification effects of different feature combinations, so as to screen out the most effective feature combination.
[0124] (1) Sort the features according to the effectiveness of gender recognition. Use the method of one-way analysis of variance to calculate the significance values of each feature data for gender. Theoretically, the smaller the significance value, the greater the influence. Thus, calculate the significance results of each feature control factor for the gender dependent variable, and sort them in ascending order to obtain the ranking of feature effectiveness.
[0125] (2) Screen out the most effective feature combination. According to the ranking obtained in the previous step, the optimal feature combination should be the feature combination composed of the first n features starting from the first feature. If n is too small, effective features may be missed; if n is too large, invalid and negative features will be added, reducing the classification accuracy. Calculate the gender recognition accuracy of different feature combinations using the Naive Bayes and Support Vector Machine classifiers respectively, and screen out the feature combination with the best effect as shown in Table 1:
[0126] Table 1
[0127]
[0128] Step 5: Gait gender classification. Use the Support Vector Machine classifier to classify the gait images based on the optimal feature combination calculated in the previous step, and the classification accuracy reaches 92%.
Claims
1. A lightweight gait gender recognition method, characterized in that, It includes the following steps: Step 1: Use an open-source dataset related to gait recognition to preprocess the data and divide it into a training set, a validation set, and a test set; Step 2: Image preprocessing; (1) Grayscale conversion and binarization; Convert the RGB image into a grayscale image and then into a binary image, removing the color of the original image and only retaining the contour texture information of the human figure; (2) Morphological processing; Perform morphological processing of opening and closing operations on the image to solve the problems of local defects and redundancies in the binary image, and at the same time smooth the boundary lines of the human figure; (3) Human figure contour extraction: Use the Sobel operator to perform edge detection on the human figure to obtain the human figure contour map; (4) Human figure skeleton extraction; Adopt the Zhang-Suen thinning algorithm to extract the human skeleton, and by means of logical operations, repeatedly delete the non-skeleton pixel points in the image; Step 3: Gait feature extraction; Based on human kinematic data, select gait features related to the aspect ratio of the human figure, the centroid height, the partition angle, and the partition distance for extraction; (1) Gait features related to the aspect ratio; The ratio of the width to the height of the minimum bounding rectangle of the human figure is the aspect ratio of the human figure; During the walking process of the human body, the arms and legs swing back and forth periodically, so the width and height of the minimum bounding rectangle of the human figure will also change periodically with the swing of the legs; Extract the aspect ratio data for each frame of gait picture, make a scatter plot and connect the points to obtain the aspect ratio change curve of the human figure, and further calculate the gait cycle, the maximum aspect ratio, the maximum aspect ratio change rate, the minimum aspect ratio, the minimum aspect ratio change rate, the aspect ratio change range, the aspect ratio average value, and the aspect ratio variance as the gait feature values related to the aspect ratio of the human figure; (2) Gait features related to the centroid height; The average value of the horizontal and vertical coordinates of the pixel points of the human figure contour or the human figure skeleton is the centroid position, and the calculation method is: where N is the number of pixels of the human portrait contour or skeleton, and x i is the abscissa of the i-th pixel, and y i is the ordinate of the i-th pixel; further calculate the maximum value, minimum value, variation range, average value, and variance of the centroid ordinate as gait feature values related to the human centroid height; (3) Gait features related to the partition angle; Establish a new coordinate system with the centroid position of the human figure as the origin, the horizontal direction as the x-axis, and the vertical direction as the y-axis; The partition angle feature refers to the swinging situation of the left and right legs during the walking process of the human body, that is, the angle change feature of the contour pixel points in the lower left area and the lower right area relative to the centroid in the new coordinate system; There are two steps to calculate the average value of the lower left partition angle: First, find the angle between each pixel point in the lower left partition and the axis, and the calculation method is as follows: where θ i , x i , y i are respectively the included angle, abscissa, and ordinate of the i-th pixel point; Second, sum and average the angles obtained for each pixel point in the lower left partition to obtain the angle feature value of the partition of the image; Calculate the average value of the lower right partition angle; Calculate the average values of the angles of the lower left and lower right partitions for each gait sequence picture of the same person, make a scatter plot of the average value data of the partition angles and connect the adjacent points to obtain the average value change curves of the lower left and lower right partitions of the same person; Further calculate the maximum value, the minimum value, the maximum change rate, the minimum change rate, the change range, the average value, and the variance of the partition angle as the gait feature values related to the human body partition angle; (4) Gait features related to the partition distance; The partition distance feature refers to the position change feature of the left and right legs of the human body during walking, that is, the position change feature of the left lower region contour and the right lower region contour relative to the centroid in the new coordinate system; the method for calculating the partition distance is divided into two steps: First, calculate the distance between each pixel point in the partition and the centroid; Second, calculate the average value of the distances; For each gait sequence image of the same person, calculate the distance means of the left lower and right lower partitions respectively, make a scatter plot of the partition distance means data and connect adjacent points to obtain the change curves of the distance means of the left lower and right lower partitions of the same person; further calculate the maximum value, minimum value, maximum change rate, minimum change rate, change range, average value, and variance of the partition distance as gait feature values related to the human body partition distance; Step 4: Gait feature screening; Calculate the influence of features on gender through one-way ANOVA, and use Naive Bayes and Support Vector Machine classifiers to verify the classification effects of different feature combinations, so as to screen out the most effective feature combination; Step 4-1: Sort the features according to the effectiveness of gender recognition; use the method of one-way ANOVA to calculate the significance values of each feature data for gender; calculate the significance results of each feature control factor for the gender dependent variable, and sort them in ascending order to obtain the ranking of feature effectiveness; Step 4-2: Screen out the most effective feature combination; according to the ranking obtained in step 4-1, the optimal feature combination should be the feature combination composed of the first n features starting from the first feature; calculate the gender recognition accuracy rates of different feature combinations using Naive Bayes and Support Vector Machine classifiers respectively, and screen out the feature combination with the highest accuracy rate; Step 5: Gait gender classification; use a Support Vector Machine classifier to classify the gender of gait images based on the best feature combination calculated in step 4.
2. The lightweight gait gender recognition method according to claim 1, wherein The detection principle of the Sobel operator is to calculate the image gradient using a first-order differential equivalent operator, that is, to find the first-order gray derivative to determine the edge position; the gradient represents the edge strength and direction of an image f at the position (x, y), and is defined as follows: The magnitude of the gradient vector is represented as follows: The direction of the gradient vector is represented as follows: A two-dimensional image has two directions, horizontal and vertical. The Sobel operator performs convolution operations on the image using convolution templates in the horizontal and vertical directions, as follows: Use the approximate calculation in the gradient vector magnitude calculation formula to obtain the gradient value of the position pixel; perform threshold binary processing on the gradient image. If the gradient value is greater than the threshold, the pixel point is an edge point; Otherwise, it is not an edge point.
3. A lightweight gait gender recognition method according to claim 1, characterized in that In the extraction of the human figure skeleton, each time it is iteratively analyzed whether the pixel values of the eight neighboring pixel points of the pixel point meet the deletion conditions; The iterative process is divided into the following two steps, and these two steps are executed in a loop until there are no pixel points to be deleted. At this time, the region formed by the remaining points is the skeleton; ① Loop through all pixel points inside the region to be extracted for the skeleton, and delete pixel points that simultaneously meet the following 4 conditions: 2 ≤ N(P1) ≤ 6 S(P1) = 1 P2·P3·P4 = 0 P4·P6·P8 = 0 ② Loop through all pixel points inside the region to be extracted for the skeleton, and delete pixel points that simultaneously meet the following 4 conditions: 2 ≤ N(P1) ≤ 6 S(P1) = 1 P2·P4·P8 = 0 P2·P6·P8 = 0 Among them, N(P1) represents the number of all pixel points inside the skeleton region to be extracted among the 8 neighborhood pixel points of P1; S(P1) represents the number of times the pixel values in the neighborhood of P1 change from 0 to 1 in the order of P2, P3, P4, P5, P6, P7, P8, P9, P2.
Citation Information
Patent Citations
Video monitoring system and real-time gait recognition method
CN107766819A
Front-end facial image encryption and recognition method for biometric privacy protection
WO2021227349A1